def convert(img_size, coords):
    """Convert from xmin,xmax,ymin,ymax to xywh normalised format
    Args:
        img_size(array): array of (img_width, img_height)
        coords(array): Array of class_id, xmin, xmax, ymin, ymax
    Returns:
        xywh(array): Array of normalised xywh coords
    """
    img_width = img_size[0]
    img_height = img_size[1]
    #Calculate Bounding box dimensions from xml
    class_id = str(coords[0])
    x_centre = str(((coords[1]+coords[2])/2)/img_width)
    y_centre = str(((coords[3]+coords[4])/2)/img_height)
    height = str((coords[4]-coords[3])/img_height)
    width = str((coords[2]-coords[1])/img_width)
    
    xywh = (class_id, x_centre, y_centre, width, height)
    return xywh