longcw / yolo2-pytorch

YOLOv2 in PyTorch
1.54k stars 421 forks source link

ground truth value for iou #19

Open JesseYang opened 7 years ago

JesseYang commented 7 years ago

In the code, the ground truth value for iou prediction is the iou between the anchor and the ground truth box (https://github.com/cory8249/yolo2-pytorch/blob/master/darknet.py#L111). But the paper says that " the objectness prediction still predicts the IOU of the ground truth and the proposed box ...". In my understanding the "proposed box" here is the predicted box, not the anchor box.

longcw commented 7 years ago

Thank you for pointing out this. I read the darknet code again and think that you are right. The darknet uses anchors to match gt_boxes and pred_boxes (https://github.com/pjreddie/darknet/blob/master/src/region_layer.c#L264) but uses ious between gt_boxes and pred_boxes as targets (https://github.com/pjreddie/darknet/blob/master/src/region_layer.c#L280).

I will fix this and try to train the network later.

datlife commented 7 years ago

@longcw I am curious if the bug has been fixed. Thanks!

acrosson commented 7 years ago

Any updated on this?

Haiyan-Chris-Wang commented 6 years ago

@longcw is the bug fixed? And what mAP do you get now?

YinlinHu commented 6 years ago

The bug has been fixed very early at commit edda7d48ecf67954414923bc94f05ea036e1a9c3