def main(args): if not (args.run_train or args.run_test or args.run_reshape or args.download_data): print( 'Set atleast one of the options --train | --test | --reshape | --download-data' ) parser.print_help() return if args.run_test or args.run_train or args.run_reshape: session = get_session(args.gpu_limit) if args.run_train: trainer = HEDTrainer(args.config_file) trainer.setup() trainer.run(session) if args.run_test: tester = HEDTester(args.config_file) tester.setup(session) tester.run(session) if args.run_reshape: reshaper = HEDReshaper(args.config_file) reshaper.setup(session) reshaper.run(session) if args.download_data: io = IO() cfgs = io.read_yaml_file(args.config_file) io.download_data(cfgs['rar_file'], cfgs['download_path'])
def main(args): if not (args.run_train or args.run_test): print('Set AtLeast one of the options --train | --test ') parser.print_help() return if args.run_test or args.run_train: session = get_session(args.gpu_limit) if args.run_train: trainer = HEDTrainer(args.datadir,args.savedir,args.initmodelfile,args.configfile) trainer.setup() trainer.run(session) if args.run_test: tester = HEDTester(args.datadir,args.savedir,args.configfile) tester.setup(session) tester.run(session)