def resize_img(img, input_size=600):
    '\n    resize img and limit the longest side of the image to input_size\n    '
    img = np.array(img)
    im_shape = img.shape
    im_size_max = np.max(im_shape[0:2])
    im_scale = (float(input_size) / float(im_size_max))
    img = cv2.resize(img, None, None, fx=im_scale, fy=im_scale)
    return img
resize img and limit the longest side of the image to input_size
def resize_img(img, input_size=600):
    '\n    \n    '
    img = np.array(img)
    im_shape = img.shape
    im_size_max = np.max(im_shape[0:2])
    im_scale = (float(input_size) / float(im_size_max))
    img = cv2.resize(img, None, None, fx=im_scale, fy=im_scale)
    return img