shrubb / latent-pose-reenactment

The authors' implementation of the "Neural Head Reenactment with Latent Pose Descriptors" (CVPR 2020) paper.
https://shrubb.github.io/research/latent-pose-reenactment/
Apache License 2.0
180 stars 34 forks source link

preprocess_dataset.sh error please help #16

Closed molo32 closed 3 years ago

molo32 commented 3 years ago

!sudo bash /content/latent-pose-reenactment/utils/preprocess_dataset.sh

/content/latent-pose-reenactment/utils Got 2 folders, will process from 0-th to 999999999-th 0 images /content/dataset//images/id00017 id00017 WARNING: /content/dataset//images-cropped/id00017/ already exists, contains 0 files 0% 0/2 [00:00<?, ?it/s]Traceback (most recent call last): File "crop_as_in_dataset.py", line 684, in for input_image in tqdm(image_loader): File "/usr/local/lib/python3.7/dist-packages/tqdm/std.py", line 1104, in iter for obj in iterable: File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py", line 517, in next data = self._next_data() File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py", line 1199, in _next_data return self._process_data(data) File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/dataloader.py", line 1225, in _process_data data.reraise() File "/usr/local/lib/python3.7/dist-packages/torch/_utils.py", line 429, in reraise raise self.exc_type(msg) TypeError: Caught TypeError in DataLoader worker process 0. Original Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/worker.py", line 202, in _worker_loop data = fetcher.fetch(index) File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 47, in fetch return self.collate_fn(data) File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/collate.py", line 85, in default_collate raise TypeError(default_collate_err_msg_format.format(elem_type)) TypeError: default_collate: batch must contain tensors, numpy arrays, numbers, dicts or lists; found <class 'NoneType'>

0% 0/2 [00:00<?, ?it/s]

errr

shrubb commented 3 years ago

/content/dataset//images/id00017 doesn't contain any images

I think the wrong line is IDENTITIES=(*)

molo32 commented 3 years ago

I do not understand, clearly / content / dataset // images / id00017 is not empty, what is wrong?

shrubb commented 3 years ago

Either this directory doesn't contain images (only other directories for example), or the images are broken, or you're running the script with wrong parameters (which I don't know, so it's hard to guess).

molo32 commented 3 years ago

Does it have something to do with image resolution? Can the image be any size?

shrubb commented 3 years ago

Can the image be any size?

Yes.

Your error looks like OpenCV tried to load some image file and returned None, which may mean that file was empty/broken/invalid/directory.

molo32 commented 3 years ago

hey I solved it, the problem was that there was a hidden file.ipynb_checkpoints so i did ! rm -r /content/latent_pose_reenactment/utils/dataset/images/monalisa/.ipynb_checkpoints and it worked but now I get

inference_folder.py file not found

where do i find this file?

shrubb commented 3 years ago

You'll get it by following the setup instructions