weishibo-mudanglu / MobilenetV3_Multi-Label-Image-Classification-vehicle-pedestrain-

基于MobileNetV3的车辆和行人的多标签分类
2 stars 0 forks source link

data annotation format #1

Closed Adrian-Yan16 closed 1 year ago

Adrian-Yan16 commented 1 year ago

Can you explain your data annotation format? 0001_c001_00016460_0.jpg 1 1 1 What do the second, third, and fourth columns represent?

weishibo-mudanglu commented 1 year ago

three label,second:direction,third:type,fourth:color

Adrian-Yan16 commented 1 year ago

The data you used to train 0002_c002_00030600_0.jpg 2 1 1 0 What do the fifth columns represent?

Adrian-Yan16 commented 1 year ago

What should I change in train.py to train my data?

Adrian-Yan16 commented 1 year ago

I have three premier classes, and every class has two labels, Is that right to set the num_classes to 6?

Adrian-Yan16 commented 1 year ago

I got a problem, how can I solve it?

Traceback (most recent call last):

File "train_nmv.py", line 315, in

train()

File "train_nmv.py", line 156, in train

loss1=criterion_d(out1[index_dirction],label[:,0][index_dirction])#\u5f97\u5230\u635f\u5931\u51fd\u6570

File "/home/qiyang/anaconda3/envs/mobilenet/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl

result = self.forward(*input, **kwargs)

File "/home/qiyang/PycharmProjects/MobilenetV3_Multi-Label-Image-Classification/MobileNetV3/my_utils.py", line 25, in forward

targets = torch.zeros_like(log_probs).scatter_(1, targets.unsqueeze(1), 1)

RuntimeError: index -1 is out of bounds for dimension 1 with size 2

Adrian-Yan16 commented 1 year ago

兄弟,帮帮忙,有个项目要做多标签分类,现在卡住了