MasterBin-IIAU / Unicorn

[ECCV'22 Oral] Towards Grand Unification of Object Tracking
MIT License
949 stars 87 forks source link

List index out of range in convert_to_coco_format #29

Open carsten12 opened 2 years ago

carsten12 commented 2 years ago

Hello @MasterBin-IIAU, thank you for your work and publishing it.

I am currently trying to setup an environment to benchmark Unicorn vs. another algorithm from someone in my company during a project to proof my expertise in an internal AI degree. So bear with me when I am not 100% sure about wording and what I am doing :-).

In a first step, I intend to run a MOT only test on MOT Challenge 17 data, as in the beginning BDD data was not completely loaded. I installed the python environment, although I use python 3.8 and CUDA 11.6 as well as PyTorch 1.12 (just to let you know)

Then I was able to run

python launch_uni-py --name unicorn_track_tiny_mot_only.py --nproc_per_node=2 --batch 16 --mode multiple

but as training would take 10 days, I want to use your provided model zoo. Therefore I created a directory called Unicorn_outputs/unicorn_track_tiny_mot_only and placed the pre-trained latest_ckpt.pth from model zoo in it. I also changed mot_test_name to motchallenge in exp/unicorn_track.py but there is anyhow no difference when I don't change it (after I now loaded all BDD data as well).

When I call

python tools/track.py -f expos/default/unicorn_track_tiny_mot_only.py -c Unicorn_outputs/unicorn_track_tiny_mot_only/latest_ckpt.pth -b 1 -d 1

it throws an list index out of range error in the function convert_to_coco_format where it retrieves the label, as the data loader.dataset.class_ids is only of dimension 1, which means it only knows one I think this is expected, as MOT 17 only knows one class. But the actual output it is working on contains label-numbers 0,1,2,3,6, and 7. Variable cls is a tensor starting with 10 '0' values that work, but certainly the '7' in the next position is throwing the error.

My assumption is that something is still wrong with the number of classes but don't know how to proceed. I did some debugging but currently I don't find the solution.

Thanks for an answer, Carsten.

knightron0 commented 1 year ago

I'm facing the same issue as well – is there any fix available?