Skip to content

Commit ad21ecd

Browse files
author
Dmitry Sidnev
committed
Rename class
1 parent 1486050 commit ad21ecd

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

demos/background_subtraction_demo/python/background_subtraction_demo.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
sys.path.append(str(Path(__file__).resolve().parents[2] / 'common/python'))
2828

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
3030
from openvino.model_zoo.model_api.models.utils import load_labels
3131
from openvino.model_zoo.model_api.performance_metrics import PerformanceMetrics
3232
from openvino.model_zoo.model_api.pipelines import get_user_config, AsyncPipeline
@@ -116,14 +116,14 @@ def get_model(model_adapter, configuration, args):
116116
is_matting_model = True
117117
elif len(inputs) == 2 and len(outputs) in (2, 3) and 'bgr' in inputs.keys():
118118
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)
121121
need_bgr_input = True
122122
is_matting_model = True
123123
else:
124124
model = MaskRCNNModel(model_adapter, configuration)
125125
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.')
127127

128128
if args.raw_output_message and is_matting_model:
129129
log.warning('\'--raw_output_message\' argument is set but is used background-matting based model, nothing to show')

demos/common/python/openvino/model_zoo/model_api/models/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717

1818
from .bert import BertEmbedding, BertNamedEntityRecognition, BertQuestionAnswering
19-
from .background_matting import BackgroundMattingWithBackground, VideoBackgroundMatting
19+
from .background_matting import ImageMattingWithBackground, VideoBackgroundMatting
2020
from .centernet import CenterNet
2121
from .classification import Classification
2222
from .deblurring import Deblurring
@@ -38,7 +38,6 @@
3838
from .yolo import YOLO, YoloV3ONNX, YoloV4, YOLOF, YOLOX
3939

4040
__all__ = [
41-
'BackgroundMattingWithBackground',
4241
'BertEmbedding',
4342
'BertNamedEntityRecognition',
4443
'BertQuestionAnswering',
@@ -51,6 +50,7 @@
5150
'DETR',
5251
'FaceBoxes',
5352
'HpeAssociativeEmbedding',
53+
'ImageMattingWithBackground',
5454
'ImageModel',
5555
'InputTransform',
5656
'MaskRCNNModel',

demos/common/python/openvino/model_zoo/model_api/models/background_matting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def initialize_rec(self):
8989
return rec
9090

9191

92-
class BackgroundMattingWithBackground(ImageModel):
92+
class ImageMattingWithBackground(ImageModel):
9393
__model__ = 'Background-matting'
9494

9595
def __init__(self, model_adapter, configuration, preload=False):

0 commit comments

Comments
 (0)