def coco2yolo(image_height, image_width, bboxes):
    '\n    coco => [xmin, ymin, w, h]\n    yolo => [xmid, ymid, w, h] (normalized)\n    '
    bboxes = bboxes.copy().astype(float)
    bboxes[(..., [0, 2])] = (bboxes[(..., [0, 2])] / image_width)
    bboxes[(..., [1, 3])] = (bboxes[(..., [1, 3])] / image_height)
    bboxes[(..., [0, 1])] = (bboxes[(..., [0, 1])] + (bboxes[(..., [2, 3])] / 2))
    return bboxes
coco => [xmin, ymin, w, h]
yolo => [xmid, ymid, w, h] (normalized)
def coco2yolo(image_height, image_width, bboxes):
    '\n    coco => [xmin, ymin, w, h]\n    yolo => [xmid, ymid, w, h] (normalized)\n    '
    bboxes = bboxes.copy().astype(float)
    bboxes[(..., [0, 2])] = (bboxes[(..., [0, 2])] / image_width)
    bboxes[(..., [1, 3])] = (bboxes[(..., [1, 3])] / image_height)
    bboxes[(..., [0, 1])] = (bboxes[(..., [0, 1])] + (bboxes[(..., [2, 3])] / 2))
    return bboxes