diff --git a/ppdet/modeling/losses/diou_loss_yolo.py b/ppdet/modeling/losses/diou_loss_yolo.py index c627c178e9df186b6e48997b8238884c94b69ba7..d85154d085e0f7873f86e87f031320db9f16b724 100644 --- a/ppdet/modeling/losses/diou_loss_yolo.py +++ b/ppdet/modeling/losses/diou_loss_yolo.py @@ -65,9 +65,10 @@ class DiouLossYolo(IouLoss): eps (float): the decimal to prevent the denominator eqaul zero ''' x1, y1, x2, y2 = self._bbox_transform( - x, y, w, h, anchors, downsample_ratio, batch_size, False) - x1g, y1g, x2g, y2g = self._bbox_transform( - tx, ty, tw, th, anchors, downsample_ratio, batch_size, True) + x, y, w, h, anchors, downsample_ratio, batch_size, False, 1.0, eps) + x1g, y1g, x2g, y2g = self._bbox_transform(tx, ty, tw, th, anchors, + downsample_ratio, batch_size, + True, 1.0, eps) #central coordinates cx = (x1 + x2) / 2