facebookresearch / detr

End-to-End Object Detection with Transformers
Apache License 2.0
13.09k stars 2.37k forks source link

Why drop the last dim for classification #539

Closed idejie closed 1 year ago

idejie commented 1 year ago

Hi,

As the format of coco, the id 0 is non-sense or means background.

I'm confused about why drop the last dim for classification.

https://github.com/facebookresearch/detr/blob/8a144f83a287f4d3fece4acdf073f387c5af387d/models/detr.py#L274-L275