Closed Shelomith closed 2 years ago
Hi,
You can check if your input image resolution is 128x128. It may be caused the input size is not a power of 2.
Thanks for your nice reply. After changed the image resolution to 128*128, I solve this error.
I've test 30 pic in FLW datasets by pretrained module. but the results looks not so good.
Are they reasonable outputs? What's the reason? I'd like to know the performance of this work in "in-the-wild" photo... any suggestion?
Hi,
You should align the images firstly. Or you can download the aligned lfw images from GoogleDrive or BaiduNetDisk (l98p).
ah, Thanks. I download the dataset wrongly. Aligned dataset performs excellent!
I notice that you use FACE++ to align the face data. Can I use other alignment tools instead of it? like Dlib? is there any requirement when align the face?
Hi,
You can also use the dlib to extract the 68 landmarks and then use them to align images. When you aligning the images, you should:
Hi, i've try to test it on flw datasets. but I got this error: The GPUs you are using: 0 Starting to load images via multiple imreaders 100%|████████████████████████████████████████████████████████████████████████████████████| 30/30 [00:00<00:00, 138884.24it/s] dataset [FaceDataset(test)] was created The number of test images = 30 loading the model from ./checkpoints/lightCNN_10_checkpoint.pth model [FFWMModel] was created loading the model from ./checkpoints/ffwm/latest_net_netG.pth loading the model from ./checkpoints/ffwm/latest_net_flowNetF.pth ---------- Networks initialized ------------- [Network netG] Total number of parameters : 16.245 M [Network flowNetF] Total number of parameters : 52.357 M
/home/shelomith/anaconda3/envs/ffwn/lib/python3.7/site-packages/torch/nn/functional.py:3226: UserWarning: Default grid_sample and affine_grid behavior has changed to align_corners=False since 1.3.0. Please specify align_corners=True if the old behavior is desired. See the documentation of grid_sample for details. warnings.warn("Default grid_sample and affine_grid behavior has changed " Traceback (most recent call last): File "test_ffwm.py", line 77, in
model.test(return_fea=False)
File "/home/shelomith/facerotator/FFWM/models/ffwm_model.py", line 193, in test
self.test_forward()
File "/home/shelomith/facerotator/FFWM/models/ffwm_model.py", line 187, in testforward
, _, self.fake_F128, att = self.netG(self.img_S, flow=[flow_F32, flow_F64, flow_F128], return_att=True)
File "/home/shelomith/anaconda3/envs/ffwn/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/home/shelomith/facerotator/FFWM/models/base_networks.py", line 339, in forward
res_in = torch.cat((skip, dec), 1)
RuntimeError: Sizes of tensors must match except in dimension 2. Got 62 and 64
Any one know the reason?