facebookresearch / detr

End-to-End Object Detection with Transformers
Apache License 2.0
13.42k stars 2.42k forks source link

Why class_error always = 100 when training #550

Open hailuu684 opened 1 year ago

hailuu684 commented 1 year ago

Hi everyone, I am training the dert model using the coco dataset to see how it is going, I saw the class_error=100 in every batch when training in the first epoch. I just do not understand why is that? image

Flyooofly commented 1 year ago

Hello, I also encountered this problem. The result of each batch is all 0, how do you solve this problem?

hailuu684 commented 1 year ago

The reason could be at this line of code, the accuracy between src_logit and target_class = 0, so it still 100

image

Flyooofly commented 1 year ago

The reason could be at this line of code, the accuracy between src_logit and target_class = 0, so it still 100

image

Hello, thanks for the reply. I have also seen similar answers, but I think this is just a display result. Will it affect the final map and various indicators? I trained dozens of epochs but the indicators are all 0 image

xuecheng990531 commented 1 year ago

The reason could be at this line of code, the accuracy between src_logit and target_class = 0, so it still 100 image

Hello, thanks for the reply. I have also seen similar answers, but I think this is just a display result. Will it affect the final map and various indicators? I trained dozens of epochs but the indicators are all 0 image

你好,请问您解决这个全0的问题了吗?

alexHxun commented 1 year ago

modify the 71 line of datasets/coco.py : classes = [obj["category_id"] for obj in anno] to classes = [int(obj["category_id"]) for obj in anno]

1749anonymous commented 1 year ago

If your class_error is always = 100, try to increase the batchSize, which is useful to me

nothing7744 commented 9 months ago

i met the same question.i guess you can decrease the number of object querry.for me, it's useful.