VlSomers / bpbreid

[WACV23] A strong baseline for body part-based person re-identification
Other
166 stars 16 forks source link

torch.cat() #36

Open zedsharifi opened 10 months ago

zedsharifi commented 10 months ago

Hey I got this error after executing this command: !python /content/bpbreid/torchreid/scripts/main.py --config-file configs/bpbreid/bpbreid_market1501_train.yaml This error is displayed after the completion of train steps: Traceback (most recent call last): File "/content/bpbreid/torchreid/scripts/main.py", line 274, in main() File "/content/bpbreid/torchreid/scripts/main.py", line 183, in main engine.run(*engine_run_kwargs(cfg)) File "/content/bpbreid/torchreid/engine/engine.py", line 245, in run evalate_on_sources_only=False File "/content/bpbreid/torchreid/engine/engine.py", line 349, in test save_features=save_features File "/usr/local/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context return func(args, **kwargs) File "/content/bpbreid/torchreid/engine/image/part_based_engine.py", line 188, in _evaluate qf, q_pids, q_camids, qf_parts_visibility, q_parts_masks, q_pxlscores, q_anns = self._feature_extraction(query_loader) File "/content/bpbreid/torchreid/engine/image/part_based_engine.py", line 159, in _feature_extraction partsvisibility = torch.cat(partsvisibility, 0) RuntimeError: torch.cat(): expected a non-empty list of Tensors

This is the dataset path: /root/datasets/reid/Market-1501-v15.09.15

VlSomers commented 10 months ago

Hi, the error occurred probably because the dataloader was empty. It probably happened because there was an issue loading the dataset on disk. Can you check inside "torchreid/data/datasets/image/market1501.py", at the end of the "init" function, that the three lists {train, query, gallery} and not empty? Seeing your error, I believe one of the three list is likely empty (you then need to check that your dataset is at the proper location)