def scale_image(image, scale=1, interpolation='linear'):
    ' resize image using cv2 '
    if (interpolation == 'linear'):
        return cv2.resize(image, None, fx=scale, fy=scale, interpolation=cv2.INTER_LINEAR)
    if (interpolation == 'nearest'):
        return cv2.resize(image, None, fx=scale, fy=scale, interpolation=cv2.INTER_NEAREST)
resize image using cv2
def scale_image(image, scale=1, interpolation='linear'):
    '  '
    if (interpolation == 'linear'):
        return cv2.resize(image, None, fx=scale, fy=scale, interpolation=cv2.INTER_LINEAR)
    if (interpolation == 'nearest'):
        return cv2.resize(image, None, fx=scale, fy=scale, interpolation=cv2.INTER_NEAREST)