def __init__(self, model_info, preprocessor, launcher): super().__init__(model_info, preprocessor) model_xml, model_bin = self.prepare_model(launcher) self.network = launcher.create_ie_network(str(model_xml), str(model_bin)) self.exec_network = launcher.ie_core.load_network( self.network, launcher.device) self.launcher = launcher self.input_feeder = InputFeeder(model_info.get('inputs', []), self.inputs, self.fit_to_input)
def __init__(self, model_info, preprocessor, launcher): super().__init__(model_info, preprocessor) if not hasattr(launcher, 'plugin'): launcher.create_ie_plugin(True) model_xml, model_bin = self.prepare_model(launcher) self.network = launcher.create_ie_network(str(model_xml), str(model_bin)) self.exec_network = launcher.plugin.load(self.network) self.launcher = launcher self.input_feeder = InputFeeder(model_info.get('inputs', []), self.inputs, self.fit_to_input)
def __init__(self, launcher, adapter=None, preproc=None, postproc=None, input_feeder=None): self._launcher = launcher self._input_feeder = input_feeder or InputFeeder( launcher.config.get('inputs', []), launcher.inputs, launcher.fit_to_input, launcher.default_layout ) self._adapter = adapter self._preproc = preproc self._postproc = postproc self._categories = self._init_categories()
def __init__(self, model_info, preprocessor, launcher): super().__init__(model_info, preprocessor) self.net = launcher.create_network(self.model_info['model'], self.model_info['weights']) self.input_feeder = InputFeeder(model_info.get('inputs', []), self.inputs, self.fit_to_input) pnet_outs = model_info['outputs'] pnet_adapter_config = launcher.config.get('adapter', { 'type': 'mtcnn_p', **pnet_outs }) pnet_adapter_config.update({'regions_format': 'hw'}) self.adapter = create_adapter(pnet_adapter_config)
def __init__(self, model_info, preprocessor, launcher): super().__init__(model_info, preprocessor) model_xml, model_bin = self.prepare_model(launcher) self.network = launcher.create_ie_network(str(model_xml), str(model_bin)) self.exec_network = launcher.ie_core.load_network( self.network, launcher.device) self.launcher = launcher self.input_feeder = InputFeeder(model_info.get('inputs', []), self.inputs, self.fit_to_input) pnet_outs = model_info['outputs'] pnet_adapter_config = launcher.config.get('adapter', { 'type': 'mtcnn_p', **pnet_outs }) # pnet_adapter_config.update({'regions_format': 'hw'}) self.adapter = create_adapter(pnet_adapter_config)
def __init__(self, model_info, preprocessor, launcher): super().__init__(model_info, preprocessor) self.net = launcher.create_network(self.model_info['model'], self.model_info['weights']) self.input_feeder = InputFeeder(model_info.get('inputs', []), self.inputs, self.fit_to_input)