From c1c537b77e897a57fc2b6d93b527b1a1ae2557a5 Mon Sep 17 00:00:00 2001 From: Kaipeng Deng Date: Tue, 18 Aug 2020 20:53:18 +0800 Subject: [PATCH] fix diou_loss_yolo.py scale_x_y & eps not set (#1239) --- ppdet/modeling/losses/diou_loss_yolo.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ppdet/modeling/losses/diou_loss_yolo.py b/ppdet/modeling/losses/diou_loss_yolo.py index c627c178e..d85154d08 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 -- GitLab