dest="devices", help="GPU id of running. if more than one, use spacing to separate.", nargs="+", default=[0], type=int) args = parser.parse_args() devices = [str(x) for x in args.devices] train(flags=["--cfg", cfg, "--use_gpu", "--log_steps", "10"], options=[ "SOLVER.NUM_EPOCHS", "1", "TRAIN.PRETRAINED_MODEL_DIR", test_model, "TRAIN.MODEL_SAVE_DIR", saved_model, "DATASET.TRAIN_FILE_LIST", os.path.join(DATASET_PATH, "mini_pet", "file_list", "train_list.txt"), "DATASET.VAL_FILE_LIST", os.path.join(DATASET_PATH, "mini_pet", "file_list", "val_list.txt"), "DATASET.TEST_FILE_LIST", os.path.join(DATASET_PATH, "mini_pet", "file_list", "test_list.txt"), "DATASET.DATA_DIR", os.path.join(DATASET_PATH, "mini_pet"), "BATCH_SIZE", "1" ], devices=devices) eval(flags=["--cfg", cfg, "--use_gpu"], options=[ "TEST.TEST_MODEL", os.path.join(saved_model, "final"), "DATASET.VAL_FILE_LIST", os.path.join(DATASET_PATH, "mini_pet", "file_list", "val_list.txt"), "DATASET.DATA_DIR", os.path.join(DATASET_PATH, "mini_pet") ],
default=0, type=int) args = parser.parse_args() devices = [str(x) for x in args.devices] export_model( flags=["--cfg", cfg], options=[ "TEST.TEST_MODEL", test_model, "FREEZE.SAVE_DIR", freeze_save_dir ], devices=devices) # Final eval results should be #image=500 acc=0.9615 IoU=0.7804 eval( flags=["--cfg", cfg, "--use_gpu"], options=["TEST.TEST_MODEL", test_model], devices=devices) vis(flags=["--cfg", cfg, "--use_gpu", "--local_test", "--vis_dir", vis_dir], options=["TEST.TEST_MODEL", test_model], devices=devices) train( flags=["--cfg", cfg, "--use_gpu", "--log_steps", "10"], options=[ "SOLVER.NUM_EPOCHS", "1", "TRAIN.PRETRAINED_MODEL", test_model, "TRAIN.MODEL_SAVE_DIR", saved_model ], devices=devices)