def xyxy2xywh(bbox_xyxy):
    """
    Args:
        bbox_xyxy: [xim, yxim, xmax, ymax]
    Ruturns:
        bbox_xywh: [x, y, w, h]
    """
    xim, yxim, xmax, ymax = bbox_xyxy
    return [xim, yxim, xmax-xim, ymax-yxim]