def get_export_parser(self, config_path): parser = argparse.ArgumentParser( parents=[export_args_parser(config_path)], add_help=False) parser.add_argument( '--classes', required=False, help='Comma-separated list of classes (e.g. "cat,dog,mouse").') return parser
def get_export_parser(self, config_path): return export_args_parser(config_path)
# See the License for the specific language governing permissions # and limitations under the License. # pylint: disable=W0511 import os from subprocess import run import yaml from mmcv import Config from ote import MODEL_TEMPLATE_FILENAME, MMDETECTION_TOOLS from ote.api import export_args_parser args = vars(export_args_parser(MODEL_TEMPLATE_FILENAME).parse_args()) if args['openvino']: run(f'python3 {os.path.join(MMDETECTION_TOOLS, "export.py")} ' f'{args["config"]} ' f'{args["load_weights"]} ' f'{args["save_model_to"]} ' f'openvino ' f'--input_format {args["openvino_input_format"]}', shell=True, check=True) # FIXME(ikrylov): remove alt_ssd_export block as soon as it becomes useless. with open(MODEL_TEMPLATE_FILENAME) as read_file: config = Config.fromfile(yaml.load(read_file, yaml.SafeLoader)['config']) if hasattr(config.model, 'bbox_head'):
def get_export_parser(self, config_path): parser = argparse.ArgumentParser( parents=[export_args_parser(config_path)], add_help=False) parser = self._add_aux_weights_load_arg(parser) parser = self._add_classes_arg(parser) return parser
def get_export_parser(self, config_path): parser = argparse.ArgumentParser(parents=[export_args_parser(config_path)], add_help=False) return self._add_classes_arg(parser)