Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

torch.cat() #36

Open
zedsharifi opened this issue Dec 30, 2023 · 1 comment
Open

torch.cat() #36

zedsharifi opened this issue Dec 30, 2023 · 1 comment

Comments

@zedsharifi
Copy link

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_pxl_scores
, q_anns = self.feature_extraction(query_loader)
File "/content/bpbreid/torchreid/engine/image/part_based_engine.py", line 159, in feature_extraction
parts_visibility
= torch.cat(parts_visibility
, 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
Copy link
Owner

VlSomers commented Dec 31, 2023

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants