sangyun884 / HR-VITON

Official PyTorch implementation for the paper High-Resolution Virtual Try-On with Misalignment and Occlusion-Handled Conditions (ECCV 2022).
831 stars 171 forks source link

No such file on directory './datasets/test/cloth/**.jpg' #14

Closed dkl78167816 closed 1 year ago

dkl78167816 commented 2 years ago

Using test data from VITON-HD, python3 test_generator.py --occlusion --test_name $test_name --tocg_checkpoint $tocg_checkpoint_path --gpu_ids $gpu_ids --gen_checkpoint $gen_checkpoint_path --datasetting unpaired --dataroot $dataset_path --data_list $pair_list gives below error:

Original Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/worker.py", line 302, in _worker_loop
    data = fetcher.fetch(index)
  File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/usr/local/lib/python3.7/dist-packages/torch/utils/data/_utils/fetch.py", line 49, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/content/HR-VITON/cp_dataset_test.py", line 121, in __getitem__
    c[key] = Image.open(osp.join(self.data_path, 'cloth', c_name[key])).convert('RGB')
  File "/usr/local/lib/python3.7/dist-packages/PIL/Image.py", line 2843, in open
    fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: './datasets/test/cloth/08909_00.jpg'

I commented out this line of code and then worked fine

https://github.com/sangyun884/HR-VITON/blob/54c9b3c59faab90ea7b99b4c839197c1f2128e6b/cp_dataset_test.py#L42

koo616 commented 1 year ago

Hello @dkl78167816 . I just checked the dataset on my server and all the test images are paired with clothes and people images, so I don't think there will be an error you reported. Thank you for your report and I will let you know if I find the problem with it :)