chensnathan / YOLOF

You Only Look One-level Feature (YOLOF), CVPR2021, Detectron2
MIT License
271 stars 28 forks source link

loss_cls #22

Closed x-x110 closed 3 years ago

x-x110 commented 3 years ago

during training, you get the index of box which iou more than 0.7 and less 0.10. however, using pred_class_logits[valid_idxs] to compute loss,to set more than 0.7 sanple are negative .why? i think that boxes greater than 0.7 should be classified accurately. So, may be set these box to get training?

chensnathan commented 3 years ago

Sorry for the late reply.

You can refer to this answer for details.

x-x110 commented 3 years ago

thank you for your reply and i meet a new question. During training, compared with ~0.5 of baseline, my total loss get 0.43 , 0.18 for box and 0.25 for cls, but the map get 35.9 at iter 30000. i am provided that overfit not happen. Since, the map is improve gradually at val. this scene has happens more than once.

chensnathan commented 3 years ago

What did you modify in this round?

x-x110 commented 3 years ago

sample matching method. box loss is mean and cls loss is loss_sum/num(positive)

x-x110 commented 3 years ago

so the loss reflect the average loss,it doesn't matter how you match box.

chensnathan commented 3 years ago

This is your own experiment. You may need to debug and analyze it by yourself.

x-x110 commented 3 years ago

OK, thanks for you reply

x-x110 commented 3 years ago

OK, thanks for you reply