def x1y1x2y2_to_x1y1wh(boxes):
    """
    Converts boxes from x1y1x2y2 (upper left, bottom right) format 
    to x1y1wh (upper left, width and height) format
    """
    boxes[:,2] = boxes[:,2] - boxes[:,0]
    boxes[:,3] = boxes[:,3] - boxes[:,1]
    return boxes