that target_left, target_right, target_top and target_bottom refers the distance from centerness of bounding box to left side, right side, top side, and bottom of it.
But as for GIoU(https://arxiv.org/pdf/1902.09630.pdf), we need to find a rectangle that can cover both target bounding box and predicted bounding box. In the paper, the min and max operation is operated on the coordinate of (x,y,w,h) or (x1, y1, x2, y2). In the code above, the procedure is amost the same. But you left, right, top and bottom is not the coordinate. Is there something wrong with the GIoU Loss? Or am I misunderstood your code?
I find the calculation of GIoU in adet/layers/iou_loss.py
from the computing process of target area
that target_left, target_right, target_top and target_bottom refers the distance from centerness of bounding box to left side, right side, top side, and bottom of it.
But as for GIoU(https://arxiv.org/pdf/1902.09630.pdf), we need to find a rectangle that can cover both target bounding box and predicted bounding box. In the paper, the min and max operation is operated on the coordinate of (x,y,w,h) or (x1, y1, x2, y2). In the code above, the procedure is amost the same. But you left, right, top and bottom is not the coordinate. Is there something wrong with the GIoU Loss? Or am I misunderstood your code?