def parse_args(): parser = argparse.ArgumentParser(description='Test a R-FCN network') # general parser.add_argument('--cfg', help='experiment configure file name', required=True, type=str) parser.add_argument('--usePhilly', help='experiment is on the philly', action='store_true') args, rest = parser.parse_known_args() update_config(args.cfg) config.USE_PHILLY = args.usePhilly # modfication for philly if config.USE_PHILLY: parser.add_argument('--dataDir', help='input directory for Philly jobs', required=True, type=str) parser.add_argument('--modelDir', help='output directory for Philly jobs', required=True, type=str) args, rest = parser.parse_known_args() update_philly_config(args.modelDir, args.dataDir) # rcnn parser.add_argument('--vis', help='turn on visualization', action='store_true') parser.add_argument('--show_gt', help='turn on visualization on gt', action='store_true') parser.add_argument('--ignore_cache', help='ignore cached results boxes', action='store_true') parser.add_argument('--thresh', help='valid detection threshold', default=1e-4, type=float) parser.add_argument('--shuffle', help='shuffle data on visualization', action='store_true') args = parser.parse_args() return args
def parse_args(): parser = argparse.ArgumentParser(description='Train R-FCN network') # general parser.add_argument('--cfg', help='experiment configure file name', required=True, type=str) parser.add_argument('--usePhilly', help='experiment is on the philly', action='store_true') args, rest = parser.parse_known_args() # update config update_config(args.cfg) config.USE_PHILLY = args.usePhilly # modfication for philly if config.USE_PHILLY: parser.add_argument('--dataDir', help='input directory for Philly jobs', required=True, type=str) parser.add_argument('--modelDir', help='output directory for Philly jobs', required=True, type=str) args, rest = parser.parse_known_args() update_philly_config(args.modelDir, args.dataDir) # training parser.add_argument('--frequent', help='frequency of logging', default=config.default.frequent, type=int) args = parser.parse_args() return args