fundamentalvision / Deformable-DETR

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

HungarianMatcher #102

Open mordechail opened 2 years ago

mordechail commented 2 years ago

hey, thank you for the project.

i didn't understand some of indexes in HungarianMatcher forward() function. this line: cost_class = pos_cost_class[:, tgt_ids] - neg_cost_class[:, tgt_ids]

should be: cost_class = pos_cost_class[:, tgt_ids - 1] - neg_cost_class[:, tgt_ids - 1]

i think so because labels starts from 1 and not from 0.

thank you for your help.