def box_cxcywh_to_xyxy(x: "torch.Tensor"):
    """
    From DETR source: https://github.com/facebookresearch/detr
    (detr/util/box_ops.py)
    """

    x_c, y_c, width, height = x.unbind(1)
    box = [(x_c - 0.5 * width), (y_c - 0.5 * height), (x_c + 0.5 * width), (y_c + 0.5 * height)]
    return torch.stack(box, dim=1)

    From DETR source: https://github.com/facebookresearch/detr
    (detr/util/box_ops.py)
    
art/estimators/object_detection/detr.py