microsoft / SoftTeacher

Semi-Supervised Learning, Object Detection, ICCV2021
MIT License
904 stars 123 forks source link

在compute_pseudo_label_loss()的时候已经对teacher生成的伪标签做了坐标变换,为什么在unsup_rcnn_cls_loss()的时候还要变换一次呢? #229

Closed wzr0108 closed 2 years ago

wzr0108 commented 2 years ago

这里是对teacher生成的伪标签做了坐标变换吧?

def compute_pseudo_label_loss(self, student_info, teacher_info):
    M = self._get_trans_mat(
        teacher_info["transform_matrix"], student_info["transform_matrix"]
    )
    pseudo_bboxes = self._transform_bbox(
        teacher_info["det_bboxes"],
        M,
        [meta["img_shape"] for meta in student_info["img_metas"]],
    )

然后在unsup_rcnn_cls_loss()又做了一次坐标变换

M = self._get_trans_mat(student_transMat, teacher_transMat)
aligned_proposals = self._transform_bbox(
    selected_bboxes,
    M,
    [meta["img_shape"] for meta in teacher_img_metas],
)