Queries on Weights for Classification Loss on Background Boxes
See original GitHub issueHi,
First of all congratulations for the great work and many thanks for sharing the code !!
I have been checking out the code, and have a query regarding the weight for classification loss on background proposals.
The classification loss on pseudo labels seems to be done here https://github.com/microsoft/SoftTeacher/blob/bef9a256e5c920723280146fc66b82629b3ee9d4/ssod/models/soft_teacher.py#L240
where the bbox_targets
are computed a couple of lines earlier here https://github.com/microsoft/SoftTeacher/blob/bef9a256e5c920723280146fc66b82629b3ee9d4/ssod/models/soft_teacher.py#L215
which I understand refers to the bbox_head.py
in mmdetection here https://github.com/open-mmlab/mmdetection/blob/bde7b4b7eea9dd6ee91a486c6996b2d68662366d/mmdet/models/roi_heads/bbox_heads/bbox_head.py#L183
which further calls _get_target_single()
here https://github.com/open-mmlab/mmdetection/blob/bde7b4b7eea9dd6ee91a486c6996b2d68662366d/mmdet/models/roi_heads/bbox_heads/bbox_head.py#L117
But in this, the negative proposals are assigned weight of 1.0, which should have been cls_score
for the proposals after running them through the Teacher, as mentioned in the paper.
Maybe I am missing something in the code. It would be really great if you could kindly clarify the above query or point me to where it uses the cls-score from the teacher into the classification loss for background proposals.
Thank You !!
Best Regards, Anuj
Issue Analytics
- State:
- Created 2 years ago
- Comments:7
Top GitHub Comments
@anuj-sharma-19 @Jack-Hu-2001 The correct equation, as I understand it, is: @MendelXu please check it.
In the final classification loss here https://github.com/microsoft/SoftTeacher/blob/bef9a256e5c920723280146fc66b82629b3ee9d4/ssod/models/soft_teacher.py#L243
it seems loss is:
So,
avg_factor
is not asN_fg
in the paper. Also, thew_j
as used in the paper (Eq 5) does not seem to be used in the code.It would be really great if you could you please clarify these couple of doubts.
Thank You !!
Anuj