Commit ffb97889 authored by Bucky Lee's avatar Bucky Lee
Browse files

feat: sync

parent d6550b10
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -7,3 +7,5 @@
**/.DS_Store
*.pth
*.pyc
OSAP_web/OSAP_flask/data/processed/**
OSAP_web/OSAP_flask/data/unprocessed/**
 No newline at end of file
+2 −2
Original line number Diff line number Diff line
@@ -46,9 +46,9 @@ def upload_file(model_name):
        # shutil.copy(src_path, 'data/processed')
        # msg = core.main.process(src_path, model_name)
        # if msg == 'Success':
        return jsonify({'id':file_name})
        return jsonify({'filename':file_name})
    app.logger.info("Failed to deal with image!\n", msg)
    return jsonify({'id':file_name})
    return jsonify({'filename':file_name})

def find_next():
    file_list = os.listdir(UPLOAD_FOLDER)
+0 −21
Original line number Diff line number Diff line
@@ -17,27 +17,6 @@ torch.cuda.empty_cache()


def predict(model):
    # TODO: 模型预测,结果储存到特定文件夹中
    # test(file_path, '00_low_quality_dir')
    # opt = test_options.TestOptions()
    # os.system(
    #     'python ../models/res_dg/test.py --dataroot ../data/dataset/'
    #     ' --name RCDG_drive --model RCDG --dataset_mode cataract_guide_padding --eval')
    # os.system(
    #     'python ../models/res/test.py --dataroot ../data/unprocessed/'
    #     ' --name arcnet --model arcnet --dataset_mode cataract_guide_padding --eval')

    # dic = dict()
    # dic['dataroot'] = '../data/dataset'
    # dic['name'] = 'RCDG_drive'
    # dic['model'] = 'RCDG'
    # dic['dataset_mode'] = 'cataract_guide_padding'
    # dic['eval'] = True
    # parser = argparse.ArgumentParser()
    test()

    # model = RCDGModel()
    # model.set_input()
    # model.test()

+5.57 KiB (200 KiB)
Loading image diff...
−33 B (2.82 KiB)
Loading image diff...
Loading