pjl1995 / CTracker

Other
247 stars 47 forks source link

The size of tensor a (512) must match the size of tensor b (12) at non-singleton dimension 1 #12

Open GaoXinJian-USTC opened 3 years ago

GaoXinJian-USTC commented 3 years ago

My labels.csv has 12 categories of num_classes. When it was raining, an error “The size of tensor a (512) must match the size of tensor b (12) at non-singleton dimension 1” occured.

pjl1995 commented 3 years ago

Could you succeed to run the code if you only use 1 category in train_annots.csv and train_labels.csv?

GaoXinJian-USTC commented 3 years ago

Could you succeed to run the code if you only use 1 category in train_annots.csv and train_labels.csv?

Yes,but 12 categories can't

pjl1995 commented 3 years ago

I am sorry that this version of CTracker may not support the multi-category tracking. Maybe you need to modify the code if you want to use CTracker to solve it.

GaoXinJian-USTC commented 3 years ago

I am sorry that this version of CTracker may not support the multi-category tracking. Maybe you need to modify the code if you want to use CTracker to solve it.

Can you give me some tips on how to modify it? I'm so confused ..XoX

pjl1995 commented 3 years ago

For the detection part, you can refer to the source code of retinanet: https://github.com/yhenon/pytorch-retinanet For the tracking part, you need to rewrite test.py and modify the logic. For example, only the objects of the same category can be associated.