Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loss cardinality does not make sense in the setting when using focal loss #3

Open
RomStriker opened this issue May 31, 2023 · 1 comment
Assignees

Comments

@RomStriker
Copy link

Hi,

I see that starting from deformable DETR, it doesn't make sense to have cardinality loss. In the original DETR paper, the class_embed head outputs num_classes + 1, to also output a value for the no object class, and if we keep the same structure then the Cardinality loss specifically the line would work as commented in the code. However, in all the versions of DETR from IDEA-Research that uses focal loss, uses class_embed head that only outputs num_classes, so no output for the no object class, and then the Cardinality loss instead considers the last class the no object class. Can you explain its use?

Also, why did you make the choice to not use the no-object class for focal loss, is there some explanation that I am missing?

@Chrazqee
Copy link

Chrazqee commented Aug 14, 2023

I have the same question like that! I guess if add no-object classes to class-embed, it will cause class unbalance question, as I met the question. It causes the network more and more focusing on no-object class, since DINO has lots of queries than DETR, the situation will be more serious I guess! Owning to their code is quite complicated to me, so I do not modified their code to validate my guess. Also, I do not know how the authors calculates the AP in their project! Have you understanding the question? If so, wish you can share it for me, thanks a lot!

best!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants