def data_preprocess(img_path, config):
    img = cv2.imread(img_path, 1)
    img, ori_image_shape = _reshape_data(img, config.test_img_shape)
    img = img.transpose(2, 0, 1)

    return img, ori_image_shape
示例#2
0
def data_preprocess(ori_img, config):
    img, ori_image_shape = _reshape_data(ori_img, config.test_img_shape)
    img = img.transpose(2, 0, 1)
    return img, ori_image_shape