The test_pair.txt contains the following:
00006_00.jpg 06396_00.jpg
in which, the person image is 00006_00.jpg and cloth image is 06396_00.jpg .
Note: I have verified the file path in all the folders and it is correct.
When I ran the inference.py file, I got the following error:
Traceback (most recent call last): File "F:\stableviton\StableVITON\inference.py", line 111, in <module> main(args) File "F:\stableviton\myenv\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "F:\stableviton\StableVITON\inference.py", line 67, in main for batch_idx, batch in enumerate(dataloader): File "F:\stableviton\myenv\lib\site-packages\torch\utils\data\dataloader.py", line 634, in __next__ data = self._next_data() File "F:\stableviton\myenv\lib\site-packages\torch\utils\data\dataloader.py", line 1346, in _next_data return self._process_data(data) File "F:\stableviton\myenv\lib\site-packages\torch\utils\data\dataloader.py", line 1372, in _process_data data.reraise() File "F:\stableviton\myenv\lib\site-packages\torch\_utils.py", line 644, in reraise raise exception ValueError: Caught ValueError in DataLoader worker process 0. Original Traceback (most recent call last): File "F:\stableviton\myenv\lib\site-packages\torch\utils\data\_utils\worker.py", line 308, in _worker_loop data = fetcher.fetch(index) File "F:\stableviton\myenv\lib\site-packages\torch\utils\data\_utils\fetch.py", line 51, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "F:\stableviton\myenv\lib\site-packages\torch\utils\data\_utils\fetch.py", line 51, in <listcomp> data = [self.dataset[idx] for idx in possibly_batched_index] File "F:\stableviton\StableVITON\dataset.py", line 197, in __getitem__ transformed_image = self.transform_crop_person(**data_dict) File "F:\stableviton\myenv\lib\site-packages\albumentations\core\composition.py", line 255, in __call__ self._check_args(**data) File "F:\stableviton\myenv\lib\site-packages\albumentations\core\composition.py", line 324, in _check_args raise ValueError(msg) ValueError: Key agn is not in available keys.
I am using the following repo to reproduce the inference results. https://github.com/rlawjdghek/StableVITON
I have created my test dataset with file structures as follows:
test |-- image |-- image-densepose |-- agnostic |-- agnostic-mask |-- cloth |-- cloth_mask test_pair.txt
(Note: test_pair.txt is outside the test folder)
The test_pair.txt contains the following: 00006_00.jpg 06396_00.jpg
in which, the person image is 00006_00.jpg and cloth image is 06396_00.jpg . Note: I have verified the file path in all the folders and it is correct.
When I ran the inference.py file, I got the following error:
Traceback (most recent call last): File "F:\stableviton\StableVITON\inference.py", line 111, in <module> main(args) File "F:\stableviton\myenv\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "F:\stableviton\StableVITON\inference.py", line 67, in main for batch_idx, batch in enumerate(dataloader): File "F:\stableviton\myenv\lib\site-packages\torch\utils\data\dataloader.py", line 634, in __next__ data = self._next_data() File "F:\stableviton\myenv\lib\site-packages\torch\utils\data\dataloader.py", line 1346, in _next_data return self._process_data(data) File "F:\stableviton\myenv\lib\site-packages\torch\utils\data\dataloader.py", line 1372, in _process_data data.reraise() File "F:\stableviton\myenv\lib\site-packages\torch\_utils.py", line 644, in reraise raise exception ValueError: Caught ValueError in DataLoader worker process 0. Original Traceback (most recent call last): File "F:\stableviton\myenv\lib\site-packages\torch\utils\data\_utils\worker.py", line 308, in _worker_loop data = fetcher.fetch(index) File "F:\stableviton\myenv\lib\site-packages\torch\utils\data\_utils\fetch.py", line 51, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "F:\stableviton\myenv\lib\site-packages\torch\utils\data\_utils\fetch.py", line 51, in <listcomp> data = [self.dataset[idx] for idx in possibly_batched_index] File "F:\stableviton\StableVITON\dataset.py", line 197, in __getitem__ transformed_image = self.transform_crop_person(**data_dict) File "F:\stableviton\myenv\lib\site-packages\albumentations\core\composition.py", line 255, in __call__ self._check_args(**data) File "F:\stableviton\myenv\lib\site-packages\albumentations\core\composition.py", line 324, in _check_args raise ValueError(msg) ValueError: Key agn is not in available keys.
My environment description: Python: 3.10.0 torch==2.0.0+cu118 pytorch-lightning==1.5.0 einops opencv-python==4.7.0.72 matplotlib omegaconf albumentations transformers==4.33.2 xformers==0.0.19 open-clip-torch==2.19.0 diffusers==0.20.2 scipy==1.10.1
I am using VITONHD.yaml and VITONHD.ckpt as config and weight files.
I am not sure what am I doing wrong.
Can anyone help me?? Thanks