def normalize_bbox(coords, ymax, scaler=2):
    """
    scales all coordinates and flip y axis due to different
    origin coordinates (top left vs. bottom left)
    """
    return [
        coords[0] * scaler,
        ymax - (coords[3] * scaler),
        coords[2] * scaler,
        ymax - (coords[1] * scaler),
    ]