|
26 | 26 |
|
27 | 27 | sys.path.append(str(Path(__file__).resolve().parents[2] / 'common/python'))
|
28 | 28 |
|
29 |
| -from openvino.model_zoo.model_api.models import MaskRCNNModel, OutputTransform, RESIZE_TYPES, YolactModel, BackgroundMattingWithBackground, VideoBackgroundMatting |
| 29 | +from openvino.model_zoo.model_api.models import MaskRCNNModel, OutputTransform, RESIZE_TYPES, YolactModel, ImageMattingWithBackground, VideoBackgroundMatting |
30 | 30 | from openvino.model_zoo.model_api.models.utils import load_labels
|
31 | 31 | from openvino.model_zoo.model_api.performance_metrics import PerformanceMetrics
|
32 | 32 | from openvino.model_zoo.model_api.pipelines import get_user_config, AsyncPipeline
|
@@ -116,14 +116,14 @@ def get_model(model_adapter, configuration, args):
|
116 | 116 | is_matting_model = True
|
117 | 117 | elif len(inputs) == 2 and len(outputs) in (2, 3) and 'bgr' in inputs.keys():
|
118 | 118 | if args.background is None:
|
119 |
| - raise ValueError('The BackgroundMattingWithBackground model expects the specified "--background" option.') |
120 |
| - model = BackgroundMattingWithBackground(model_adapter, configuration) |
| 119 | + raise ValueError('The ImageMattingWithBackground model expects the specified "--background" option.') |
| 120 | + model = ImageMattingWithBackground(model_adapter, configuration) |
121 | 121 | need_bgr_input = True
|
122 | 122 | is_matting_model = True
|
123 | 123 | else:
|
124 | 124 | model = MaskRCNNModel(model_adapter, configuration)
|
125 | 125 | if not need_bgr_input and args.background is not None:
|
126 |
| - log.warning('The \"--background\" option works only for BackgroundMattingWithBackground model. Option will be omitted.') |
| 126 | + log.warning('The \"--background\" option works only for ImageMattingWithBackground model. Option will be omitted.') |
127 | 127 |
|
128 | 128 | if args.raw_output_message and is_matting_model:
|
129 | 129 | log.warning('\'--raw_output_message\' argument is set but is used background-matting based model, nothing to show')
|
|
0 commit comments