SoftTeacher icon indicating copy to clipboard operation
SoftTeacher copied to clipboard

Queries regarding the code

Open sobujmaroon opened this issue 4 years ago • 4 comments

Thank you very much for the amazing repository. I have 2 Questions.

  1. Can you please tell me in the function https://github.com/microsoft/SoftTeacher/blob/bef9a256e5c920723280146fc66b82629b3ee9d4/ssod/models/soft_teacher.py#L182 where can I find the student generated foreground bounding box candidates and background bounding box candidates.
  2. What is the significance of neg_inds in the following code snippet and what does it represent? https://github.com/microsoft/SoftTeacher/blob/bef9a256e5c920723280146fc66b82629b3ee9d4/ssod/models/soft_teacher.py#L232-L235

sobujmaroon avatar Jan 28 '22 19:01 sobujmaroon

  1. See here. https://github.com/open-mmlab/mmdetection/blob/ff9bc39913cb3ff5dde79d3933add7dc2561bab7/mmdet/core/bbox/assigners/max_iou_assigner.py#L61
  2. it indicates boxes which are assigned to background class

MendelXu avatar Jan 29 '22 10:01 MendelXu

So bg_score[neg_inds] indicates scores of boxes which are assigned to background class. So how do I get the scores of the boxes which are assigned to foreground class?

sobujmaroon avatar Jan 29 '22 19:01 sobujmaroon

Those who satisfy assigned_label !=self.student.roi_head.bbox_head.num_classes

MendelXu avatar Jan 30 '22 04:01 MendelXu

I have a problem here https://github.com/microsoft/SoftTeacher/blob/bef9a256e5c920723280146fc66b82629b3ee9d4/ssod/models/soft_teacher.py#L224-L232 the _score here is actually labels? according to the mmdet codes

        det_bboxes, det_labels = self.simple_test_bboxes(
            x, img_metas, proposal_list, self.test_cfg, rescale=rescale)

if so, the _score should be in the first place of the returned tuple, _score, _ = self.teacher.roi_head.simple_test_bboxes

I currently can't run this project directly, so didn't check if this is a bug. Post it here, and look forward to response

DeclK avatar Jul 13 '22 08:07 DeclK