fundamentalvision / Deformable-DETR

Deformable DETR: Deformable Transformers for End-to-End Object Detection.
Apache License 2.0
3.22k stars 520 forks source link

Does the model always output 100 detection results on one image? #149

Open ZM-Zhou opened 2 years ago

ZM-Zhou commented 2 years ago

Hi, Thanks for the great work! When I tried to use the Deformable-DETR on my own dataset, I found that the PostProcess() in models/deformable_detr.py always selected the top-100 predictions as the final results for an input image. Because of using the focal loss, there was no non-object class in Deformable-DETR, so the 100 results were all the objects. Did I misunderstand something? However, only several objects per image on my dataset, so the 100 predicted objects would lead to a very low 'precision'. How could I select the 'real' objects from all the outputs? Maybe set a confidence threshold based on the score?

brent88310070 commented 4 months ago

Same question here!