Qiulin-W / SAFA

Official Pytorch Implementation of 3DV2021 paper: SAFA: Structure Aware Face Animation.
Other
177 stars 29 forks source link

Which implementation of Resnet do you use for Face Swap Demo? #10

Closed VisionaryMind closed 2 years ago

VisionaryMind commented 2 years ago

I have downloaded face-parsing.PyTorch, however it attempted to import Resnet18, which is not possible in the publicly available PyTorch versions. The proper way to import is:

from resnet_pytorch import ResNet model = ResNet.from_pretrained('resnet18', num_classes=10)

The following error is thrown if attempting to use pytorch-resnet:

File "/SAFA/face_parsing/model.py", line 112, in forward feat8, feat16, feat32 = self.resnet(x) ValueError: not enough values to unpack (expected 3, got 1)

The face-parsing project does not indicate how Resnet has been implemented. How have you installed it on your system?

VisionaryMind commented 2 years ago

This problem has been resolved by changing the resnet import to .resnet (to reference the file within the library).