def get_box_coordinates(box,img_shape):
    """#convert model coordinates format to (xmin,ymin,width,height)

    Args:
        box ((xmin,xmax,ymin,ymax)): the coordinates are relative [0,1]
        img_shape ((height,width,channels)): the frame size

    Returns:
        (xmin,ymin,width,height): (xmin,ymin,width,height): converted coordinates
    """
    height,width, = img_shape[:2]
    xmin=max(int(box[0]*width),0)
    ymin=max(0,int(box[1]*height))
    xmax=min(int(box[2]*width),width-1)
    ymax=min(int(box[3]*height),height-1)
    return (
        xmin,#xmin
        ymin,#ymin
        xmax-xmin,#box width
        ymax-ymin#box height
    )