I think there are some errors in the posted code
Author: nothing7744Created Dec 7, 2023Updated Mar 8, 2024
Instructions To Reproduce the Bug:
- the dataset process boxes[:, 2:] += boxes[:, :2] boxes[:, 0::2].clamp_(min=0, max=w) boxes[:, 1::2].clamp_(min=0, max=h)
we can easily see that the annotations of bounding box is format like (x,y,x,y) 2. but when we use annotation to calculate loss loss_giou = 1 - torch.diag(box_ops.generalized_box_iou( box_ops.box_cxcywh_to_xyxy(src_boxes), box_ops.box_cxcywh_to_xyxy(target_boxes))) you use box_ops.box_cxcywh_to_xyxy(target_boxes)) that means the annotations of bounding box is format like (cx,cy,w,h),This is a serious contradiction, am I misinterpreting it or is there a real problem with the code.
Source: facebookresearch/detr