def METHOD_NAME(annotations):
    boxes, labels = annotations
    if boxes.numel() == 0:
        return torch.zeros(0, 5)
    cx = (boxes[:, 0] + boxes[:, 2]) / 2
    cy = (boxes[:, 1] + boxes[:, 3]) / 2
    w = boxes[:, 2] - boxes[:, 0]
    h = boxes[:, 3] - boxes[:, 1]
    return torch.stack((labels, cx, cy, w, h)).T