/content/NYU-SuperGAN/SuperGAN
Downloading: "https://download.pytorch.org/models/resnet152-394f9c45.pth" to /root/.cache/torch/hub/checkpoints/resnet152-394f9c45.pth
100% 230M/230M [00:06<00:00, 35.6MB/s]
=> using GPU devices: 0
=> Loading face pose model: "hopenet_robust_alpha1.pth"...
=> Loading face landmarks model: "hr18_wflw_landmarks.pth"...
=> Loading face segmentation model: "celeba_unet_256_1_2_segmentation_v2.pth"...
=> Loading face reenactment model: "nfv_msrunet_256_1_2_reenactment_v2.1.pth"...
=> Loading face completion model: "ijbc_msrunet_256_1_2_inpainting_v2.pth"...
=> Loading face blending model: "ijbc_msrunet_256_1_2_blending_v2.pth"...
=> Loading face restoring model:"GFPGANCleanv1-NoCE-C2.pth"...
Downloading: "https://github.com/xinntao/facexlib/releases/download/v0.1.0/detection_Resnet50_Final.pth" to /usr/local/lib/python3.7/dist-packages/facexlib/weights/detection_Resnet50_Final.pth
100% 104M/104M [00:10<00:00, 10.4MB/s]
=> Detecting faces in video: "shinzo_abe.mp4..."
100% 600/600 [11:40<00:00, 1.17s/frames]
=> Extracting sequences from detections in video: "shinzo_abe.mp4"...
100% 601/601 [00:00<00:00, 11473.57it/s]
=> Cropping video sequences from video: "shinzo_abe.mp4"...
100% 600/600 [00:03<00:00, 155.42it/s]
=> Computing face poses for video: "shinzo_abe_seq00.mp4"...
100% 5/5 [00:04<00:00, 1.14batches/s]
=> Computing face landmarks for video: "shinzo_abe_seq00.mp4"...
100% 10/10 [00:10<00:00, 1.06s/batches]
=> Computing face segmentation for video: "shinzo_abe_seq00.mp4"...
0% 0/10 [00:00<?, ?batches/s]
Traceback (most recent call last):
File "faceswap.py", line 76, in <module>
select_source, select_target, finetune)
File "/content/NYU-SuperGAN/SuperGAN/fsgan/inference/swap.py", line 283, in __call__
source_cache_dir, source_seq_file_path, _ = self.cache(source_path)
File "/content/NYU-SuperGAN/SuperGAN/fsgan/preprocess/preprocess_video.py", line 480, in cache
self.process_segmentation(input_path, output_dir, seq_file_path)
File "/content/NYU-SuperGAN/SuperGAN/fsgan/preprocess/preprocess_video.py", line 384, in process_segmentation
raw_segmentation = self.S(frame)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/content/NYU-SuperGAN/SuperGAN/fsgan/models/simple_unet_02.py", line 71, in forward
up4 = self.up_concat4(conv4, center)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/content/NYU-SuperGAN/SuperGAN/fsgan/models/simple_unet_02.py", line 135, in forward
outputs2 = self.conv1d(outputs2,)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/conv.py", line 302, in forward
return self._conv_forward(input, self.weight, self.bias)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/conv.py", line 299, in _conv_forward
self.padding, self.dilation, self.groups)
RuntimeError: Expected 2D (unbatched) or 3D (batched) input to conv1d, but got input of size: [64, 1024, 32, 32]