def create_parser(do_training=False): """ Convenience function for creating a Python argument parser for ORK :param do_training: if True, it is a parser for a training pipeline: it only adds a commit argument that allows you to commit to a database """ parser = ObjectRecognitionParser() parser.add_argument('-c', '--config_file', help='Config file') if do_training: parser.add_argument('--commit', dest='commit', action='store_true', default=False, help='Commit the data to the database.') return parser
def create_parser(do_training=False): """ Convenience function for creating a Python argument parser for ORK :param do_training: if True, it is a parser for a training pipeline: it only adds a commit argument that allows you to commit to a database """ parser = ObjectRecognitionParser() parser.add_argument('-c', '--config_file', help='Config file') parser.add_argument('--object_ids', help='If set, it overrides the list of object_ids in the config file. E.g.: \'["1ef112f21f12"]\'') parser.add_argument('--object_names', help='If set, it overrides the list of object names in the config file') if do_training: parser.add_argument('--commit', dest='commit', action='store_true', default=False, help='Commit the data to the database.') return parser
def create_parser(do_training=False): """ Convenience function for creating a Python argument parser for ORK :param do_training: if True, it is a parser for a training pipeline: it only adds a commit argument that allows you to commit to a database """ parser = ObjectRecognitionParser() parser.add_argument('-c', '--config_file', help='Config file') parser.add_argument('--visualize', help='If set and the pipeline supports it, it will display some windows ' 'with temporary results', default=False, action='store_true') if do_training: parser.add_argument('--commit', dest='commit', action='store_true', default=False, help='Commit the data to the database.') return parser
def create_parser(do_training=False): """ Convenience function for creating a Python argument parser for ORK :param do_training: if True, it is a parser for a training pipeline: it only adds a commit argument that allows you to commit to a database """ parser = ObjectRecognitionParser() parser.add_argument('-c', '--config_file', help='Config file') parser.add_argument( '--visualize', help='If set and the pipeline supports it, it will display some windows ' 'with temporary results', default=False, action='store_true') if do_training: parser.add_argument('--commit', dest='commit', action='store_true', default=False, help='Commit the data to the database.') return parser