longcw / yolo2-pytorch

YOLOv2 in PyTorch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to understand the value we put in _iou_mask?

lizhe960118 opened this issue · comments

iou_penalty = 0 - iou_pred_np[best_ious < cfg.iou_thresh]
_iou_mask[best_ious <= cfg.iou_thresh] = cfg.noobject_scale * iou_penalty
iou_pred_cell_anchor = iou_pred_np[cell_ind, a, :]
_iou_mask[cell_ind, a, :] = cfg.object_scale * (1 - iou_pred_cell_anchor)

when there is no object or the best iou is smaller than thresh, why not just let the value in iou_mask is cfg.noobject_scale, when there is object, let _iou_mask[cell_ind, a, :] to be cfg.object_scale?

see the issue 23, i think this is a bug to be fixed