foamliu / Deep-Image-Matting-PyTorch

Deep Image Matting implementation in PyTorch
MIT License
817 stars 185 forks source link

pretrained tar archive is broken? #15

Closed eps696 closed 5 years ago

eps696 commented 5 years ago

i've downloaded the model but both 7z and tar reports unknown format.

any suggestions what to check? i'm on windows, if it matters

madhukirand commented 5 years ago

you don't have to unzip the tarfile for loading weights, "torch.load" loads weights from tarfile itself. like

checkpoint = 'BEST_checkpoint.tar'
checkpoint = torch.load(checkpoint,map_location='cpu')
model = checkpoint['model'].module
model = model.to(device)
foamliu commented 5 years ago

Thanks @madhukirand.