Exemple #1
0
def lowlight_test(lowlight_enhance):
    if args.test_dir == None:
        print("[!] please provide --test_dir")
        exit(0)

    if not os.path.exists(args.save_dir):
        os.makedirs(args.save_dir)
        os.makedirs(args.save_dir + "/R_low")
        os.makedirs(args.save_dir + "/I_low")
        os.makedirs(args.save_dir + "/I_delta")
        os.makedirs(args.save_dir + "/S_delta")
        os.makedirs(args.save_dir + "/e")

    test_low_data_name = glob(os.path.join(args.test_dir) + '/*.*')
    test_low_data = []
    test_high_data = []
    for idx in range(len(test_low_data_name)):
        test_low_im = load_images(test_low_data_name[idx])
        test_low_data.append(test_low_im)

    start = time.time()
    lowlight_enhance.test(test_low_data,
                          test_high_data,
                          test_low_data_name,
                          load_dir=args.ckpt_dir,
                          save_dir=args.save_dir,
                          decom_flag=args.decom)
    print("End---------------,time:{},average{}".format(
        time.time() - start, (time.time() - start) / 50))
Exemple #2
0
def lowlight_test(input_file, lowlight_enhance):
    test_low_data_name = [input_file]
    test_low_data = []
    test_high_data = []
    for i in range(1):
        print('fileload', test_low_data_name[i])
        test_low_im = load_images(test_low_data_name[i])
        print('fileload return', test_low_im)
        test_low_data.append(test_low_im)

    lowlight_enhance.test(test_low_data,
                          test_high_data,
                          test_low_data_name,
                          save_dir='test_results',
                          decom_flag=0)
Exemple #3
0
def lowlight_test(lowlight_enhance):
    if args.test_dir == None:
        print("[!] please provide --test_dir")
        exit(0)

    if not os.path.exists(args.save_dir):
        os.makedirs(args.save_dir)

    test_low_data_name = glob(os.path.join(args.test_dir) + '/*.*')
    test_low_data = []
    test_high_data = []
    for idx in range(len(test_low_data_name)):
        test_low_im = load_images(test_low_data_name[idx])
        test_low_data.append(test_low_im)

    lowlight_enhance.test(test_low_data, test_high_data, test_low_data_name, save_dir=args.save_dir, decom_flag=args.decom)