implus / GFocal

Generalized Focal Loss: Learning Qualified and Distributed Bounding Boxes for Dense Object Detection, NeurIPS2020
Apache License 2.0
587 stars 73 forks source link

在计算iou_target的一点疑问? #39

Open hyq12358 opened 1 year ago

hyq12358 commented 1 year ago
norm_anchor_center = self.anchor_center(pos_anchors) / stride

pos_bbox_pred_distance = self.distribution_project(pos_bbox_pred)

pos_decode_bbox_pred = distance2bbox(norm_anchor_center,
                             pos_bbox_pred_distance)
pos_decode_bbox_targets = pos_bbox_targets / stride

target_ltrb = bbox2distance(norm_anchor_center,
                            pos_decode_bbox_targets, 
                            self.reg_max).reshape(-1)
score[pos_inds] = self.iou_target(pos_decode_bbox_pred.detach(),
                            pos_decode_bbox_targets)

请问在计算iou的时候,为什么norm_anchor_centerpos_bbox_targets要除以stride呢?计算iou通常不都是在原图上计算吗?