Skip to content

Commit c95dfa4

Browse files
sungmancSongki Choieunwoosheugene123twashwinvaidya17
authored
[OTX]Feature/otx mpa integ (#1464)
* Initial commit: integrate MPA intothe OTX * Update Self-SL for seg * Enable pre-commit tests by ignoring imports, remove useless requirements * Edit the requirements * Add dist folder * fix black * [OTX] Rebase latest changes for MPA merge (#1468) * make logfile saved in save-model-to directory * enable train * make main process train also * bugfix * refactor multi gpu training * make all processs have same output path * prevent child process from being termated by fokred main process * refactor multigpu implementation * refactor multi gpu implementation * modify argument help sentence * add multi gpu test code * align with pre-commit test * separate multi GPU manager class * modify train cli argument 'save-logs-to' to 'output-path' * remove tray excpet during killing child process * apply output_path to all tasks * change print to logger * skip multi gpu test if number of gpu is insufficient * fix typo * multi gpu test bugfix * isort fix * test case bugfix * fix typo and change some variable name * [OTX] Apply changes in develop to feature/otx branch (#1436) * Add tiling module (#1200) * Update submodule branch (#1222) * Enhance training schedule for multi-label classification (#1212) * [CVS-88098] Remove initialize from export functions (#1226) * Train graph added (#1211) * Add @attrs decorator for base configs (#1229) * Pretrained weight download error in MobilenetV3-large-1 of deep-object-reid in SC (#1233) * [Anomaly Task] Revert hpo template (#1230) * 🐞 [Anomaly Task] Fix progress bar (#1223) * [CVS-90555] Fix NaN value in classification (#1244) * update hpo_config.yaml (#1240) * [CVS-90400, CVS-91015] NNCF pruning supported tweaks (#1248) * [Anomaly Task] 🐞 Fix inference when model backbone changes (#1242) * [CVS-91472] Add pruning_supported value (#1263) * Pruning supported tweaks (#1256) * [CVS-90400, CVS-91015] NNCF pruning supported tweaks (#1248) * Revert "[CVS-90400, CVS-91015] NNCF pruning supported tweaks (#1248)" (#1269) * [OTE-TEST] Disable obsolete test cases (#1220) * [OTE-TEST] hot-fix for MPA performance tests (#1273) * [Anomaly Task] ✨ Upgrade anomalib (#1243) * Expose early stopping hyper-parameters for all tasks (#1241) * Resolve pre-commit issues (#1272) * Remove LazyEarlyStopHook in model_multilabel.py (#1281) * Removed xfail (#1239) * Implement IB loss for incremental learning in multi-class classification (#1289) * Edit num_workers and change MPA repo as a latest (#1314) * fix annotation bug (#1320) * Valid POT configs for small HRNet models (#1313) * Disable NNCF optimization for FP16 models (#1312) * fliter object less than 1 pixel (#1305) * Fix some tests (#1322) * [Develop] Move drop_last into MPA (#1357) * Apply changes from releases/v0.3.1-geti1.0.0 (#1337) * anomaly save_model bugfix (#1300) * upgrade networkx module version (#1303) * Forward CVS-94422 size bug fix PR to release branch (#1326) * Valid POT configs for small HRNet models (#1317) * [Release branch] Disable NNCF optimization for FP16 models (#1319) * [RELEASE] CVS-95549 - Hierarchical classification training failed without obvious reason (#1329) * Fix h-label: per-group softmax (#1332) * Fix dataset length bug in mpa task (#1338) * Fix drop_last key issue for det/set (#1340) * Hot-fix for OV inference for iseg output (#1345) * Fix nncf model export bug (#1346) * Fixed merge error (#1359) * Update evaluation iou_thr of ins-seg (#1354) * fix pre-commit test (#1366) * Fix dataset item tests (#1360) * Fix OV Inference issues (tiling tests & detection tests) (#1361) * fix black & add xfail test cases (#1367) * Update check_nncf_graph. (#1330) * [Develop] Hot-fix OV inference issue in rotated detection (#1375) * [Develop] updated documents (#1383) * [CVS-94911] Fix difference between train and validation normalization pipeline (#1310) * Update configs for padim model (#1378) * updated QUICK_START_GUIDE.md (#1397) * Change ote threshold of openvino test for cls (#1401) * Normalize top-1 metrics to [0, 1] (#1394) * Tiling deployment (#1387) * Replace current saliency map generation with Recipro-CAM for cls (#1363) * Class-wise saliency map generation for the detection task (#1402) * Change submodule to develop (#1410) * Send full dataset to POT optimization function (#1379) & Convert NaN to num to make visible in geti UI (#1413) * Add active score evaluation to the classification task * [release/0.4.0][OTX] Enabling GPU execution for exported code (#1416) * [OTE][Release][XAI] Detection fix two stage bbox_head error (#1414) * Update SDK commit for exportable code (#1423) * HRNet-x and HRNe-18--mod2 configs update (#1419) * [Release] Enable tiling oriented detection for v0.4.0/geti1.1.0 (#1427) * [OTE][Releases v0.4.0][XAI] Hot-fix for Detection fix two stage error (#1433) * Temporary MPA branch while dev->otx merge process * Update doc & install for dev->otx changes * Update ote_sdk -> otx.api * Update ote_cli -> otx.cli * Update external/mmsegmentation -> otx/algorithms/segmentation * Align saliency map media instantiation over tasks (#1447) * Update external/d-o-r -> otx/algorithms/classification * Update external/mmdetection -> otx/algorithms/detection * Update external/mpa -> otx/algorithms/* * Fix CLI test run for better error message * Numpy constraint for deprecated np.bool error * Capture stderr only * Align numpy requirement * [OTX/Anomaly] Add changes from external to otx (#1452) * Add changes from external to otx * Address PR comments * Update config files + remove backbone from base * Fix pre-merge checks * Fix pre-commit issues * Update exportable code commit * Fix indent error * Fix flake8 issue * Resolve softmax issue w/ FIXME for future work * Add tiling tests * Revert MPA branch to otx Signed-off-by: Songki Choi <songki.choi@intel.com> Co-authored-by: Eugene Liu <eugene.liu@intel.com> Co-authored-by: Ashwin Vaidya <ashwin.vaidya@intel.com> Co-authored-by: Jaeguk Hyun <jaeguk.hyun@intel.com> Co-authored-by: Nikita Savelyev <nikita.savelyev@intel.com> Co-authored-by: Jihwan Eom <jihwan.eom@intel.com> Co-authored-by: Harim Kang <harim.kang@intel.com> Co-authored-by: Soobee Lee <soobee.lee@intel.com> Co-authored-by: Lee, Soobee <soobeele@intel.com> Co-authored-by: Emily Chun <emily.chun@intel.com> Co-authored-by: ljcornel <ludo.cornelissen@intel.com> Co-authored-by: Eunwoo Shin <eunwoo.shin@intel.com> Co-authored-by: dlyakhov <daniil.lyakhov@intel.com> Co-authored-by: kprokofi <kirill.prokofiev@intel.com> Co-authored-by: Sungman Cho <sungman.cho@intel.com> Co-authored-by: Yunchu Lee <yunchu.lee@intel.com> Co-authored-by: Ashwin Vaidya <ashwinitinvaidya@gmail.com> Co-authored-by: Alexander Dokuchaev <alexander.dokuchaev@intel.com> Co-authored-by: Vladislav Sovrasov <vladislav.sovrasov@intel.com> Co-authored-by: Evgeny Tsykunov <e.tsykunov@gmail.com> Co-authored-by: Galina Zalesskaya <galina.zalesskaya@intel.com> Co-authored-by: dongkwan-kim <dongkwan.kim@intel.com> * Apply latest MPA openvinotoolkit/model_preparation_algorithm#105 Signed-off-by: Songki Choi <songki.choi@intel.com> Signed-off-by: Songki Choi <songki.choi@intel.com> Co-authored-by: eunwoosh <eunwoo.shin@intel.com> Co-authored-by: Eugene Liu <eugene.liu@intel.com> Co-authored-by: Ashwin Vaidya <ashwin.vaidya@intel.com> Co-authored-by: Jaeguk Hyun <jaeguk.hyun@intel.com> Co-authored-by: Nikita Savelyev <nikita.savelyev@intel.com> Co-authored-by: Jihwan Eom <jihwan.eom@intel.com> Co-authored-by: Harim Kang <harim.kang@intel.com> Co-authored-by: Soobee Lee <soobee.lee@intel.com> Co-authored-by: Lee, Soobee <soobeele@intel.com> Co-authored-by: Emily Chun <emily.chun@intel.com> Co-authored-by: ljcornel <ludo.cornelissen@intel.com> Co-authored-by: dlyakhov <daniil.lyakhov@intel.com> Co-authored-by: kprokofi <kirill.prokofiev@intel.com> Co-authored-by: Sungman Cho <sungman.cho@intel.com> Co-authored-by: Yunchu Lee <yunchu.lee@intel.com> Co-authored-by: Ashwin Vaidya <ashwinitinvaidya@gmail.com> Co-authored-by: Alexander Dokuchaev <alexander.dokuchaev@intel.com> Co-authored-by: Vladislav Sovrasov <vladislav.sovrasov@intel.com> Co-authored-by: Evgeny Tsykunov <e.tsykunov@gmail.com> Co-authored-by: Galina Zalesskaya <galina.zalesskaya@intel.com> Co-authored-by: dongkwan-kim <dongkwan.kim@intel.com> * Resolve some flake8 issues * Fix semisl trainer import (#1471) Co-authored-by: Lee, Soobee <soobeele@intel.com> * Fixisort * Rebase and fix isort Signed-off-by: Songki Choi <songki.choi@intel.com> Co-authored-by: Songki Choi <songki.choi@intel.com> Co-authored-by: eunwoosh <eunwoo.shin@intel.com> Co-authored-by: Eugene Liu <eugene.liu@intel.com> Co-authored-by: Ashwin Vaidya <ashwin.vaidya@intel.com> Co-authored-by: Jaeguk Hyun <jaeguk.hyun@intel.com> Co-authored-by: Nikita Savelyev <nikita.savelyev@intel.com> Co-authored-by: Jihwan Eom <jihwan.eom@intel.com> Co-authored-by: Harim Kang <harim.kang@intel.com> Co-authored-by: Soobee Lee <soobee.lee@intel.com> Co-authored-by: Lee, Soobee <soobeele@intel.com> Co-authored-by: Emily Chun <emily.chun@intel.com> Co-authored-by: ljcornel <ludo.cornelissen@intel.com> Co-authored-by: dlyakhov <daniil.lyakhov@intel.com> Co-authored-by: kprokofi <kirill.prokofiev@intel.com> Co-authored-by: Yunchu Lee <yunchu.lee@intel.com> Co-authored-by: Ashwin Vaidya <ashwinitinvaidya@gmail.com> Co-authored-by: Alexander Dokuchaev <alexander.dokuchaev@intel.com> Co-authored-by: Vladislav Sovrasov <vladislav.sovrasov@intel.com> Co-authored-by: Evgeny Tsykunov <e.tsykunov@gmail.com> Co-authored-by: Galina Zalesskaya <galina.zalesskaya@intel.com> Co-authored-by: dongkwan-kim <dongkwan.kim@intel.com>
1 parent 138bf73 commit c95dfa4

File tree

417 files changed

+26873
-65
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

417 files changed

+26873
-65
lines changed

.pre-commit-config.yaml

+15-13
Original file line numberDiff line numberDiff line change
@@ -26,38 +26,40 @@ repos:
2626
name: "flake8"
2727
files: '^(otx|tests)/.*\.py'
2828
args: ["--config", ".flake8", "--max-complexity", "20"]
29-
exclude: "^(.*/protobuf|tests/ote_cli)"
29+
exclude: "^(.*/protobuf|tests/ote_cli)|otx/mpa|otx/recipes"
3030

3131
# yaml formatting
3232
- repo: https://github.com/pre-commit/mirrors-prettier
3333
rev: v2.7.1
3434
hooks:
3535
- id: prettier
36-
exclude: "external"
36+
exclude: "external|otx/mpa|otx/recipes"
3737

3838
- repo: https://github.com/pre-commit/mirrors-mypy
3939
rev: "v0.971"
4040
hooks:
4141
- id: mypy
4242
files: '^(otx)/.*\.py'
4343
additional_dependencies:
44-
- numpy==1.19.5
45-
- types-PyYAML
46-
- attrs==21.2.*
47-
- types-requests
48-
- types-Deprecated
49-
- types-docutils
50-
- types_futures
51-
- types-python-dateutil
52-
exclude: "^otx/algorithms/anomaly/tests"
44+
[
45+
numpy==1.19.5,
46+
types-PyYAML,
47+
attrs==21.2.*,
48+
types-requests,
49+
types-Deprecated,
50+
types-docutils,
51+
types_futures,
52+
types-python-dateutil,
53+
]
54+
exclude: "^otx/algorithms/anomaly/tests|otx/recipes|otx/mpa"
5355

5456
- repo: https://github.com/PyCQA/pylint
5557
rev: "v2.14.5"
5658
hooks:
5759
- id: pylint
5860
name: "pylint"
5961
files: '^(otx)/.*\.py'
60-
exclude: "tests"
62+
exclude: "tests|otx/mpa|otx/recipes"
6163
entry: pylint
6264
language: system
6365
types: [python]
@@ -73,7 +75,7 @@ repos:
7375
language: python
7476
types: [python]
7577
files: '^otx/.*\.py'
76-
exclude: "otx/algorithms/anomaly/tests|external/anomaly/tests|otx/cli/utils/tests.py"
78+
exclude: "otx/algorithms/anomaly/tests|external/anomaly/tests|otx/cli/utils/tests.py|otx/mpa|otx/recipes"
7779

7880
# Will use rst
7981
# - repo: https://github.com/jumanjihouse/pre-commit-hooks

otx/algorithms/classification/adapters/mmcls/data/datasets.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
from mmcls.datasets.builder import DATASETS, PIPELINES
1313
from mmcls.datasets.pipelines import Compose
1414
from mmcv.utils.registry import build_from_cfg
15-
from mpa.utils.logger import get_logger
1615
from sklearn.metrics import confusion_matrix as sklearn_confusion_matrix
1716
from torch.utils.data import Dataset
1817

1918
from otx.algorithms.common.utils import get_cls_img_indices, get_old_new_img_indices
19+
from otx.mpa.utils.logger import get_logger
2020

2121
logger = get_logger()
2222

otx/algorithms/classification/adapters/mmcls/models/classifiers/byol.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414
import torch
1515
import torch.distributed as dist
1616
from mmcls.models.builder import CLASSIFIERS, build_backbone, build_head, build_neck
17-
from mpa.utils.logger import get_logger
1817
from torch import nn
1918

19+
from otx.mpa.utils.logger import get_logger
20+
2021
logger = get_logger()
2122

2223

otx/algorithms/classification/tasks/__init__.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@
1414
# See the License for the specific language governing permissions
1515
# and limitations under the License.
1616

17-
import mpa.cls as MPAClassification
18-
1917
import otx.algorithms.classification.adapters.mmcls as MPAData
2018
import otx.algorithms.common.adapters.mmcv.models as OTXBackbones
19+
import otx.mpa.cls as MPAClassification
2120

2221
from .inference import ClassificationInferenceTask
2322
from .nncf import OTXClassificationNNCFTask

otx/algorithms/classification/tasks/inference.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99

1010
import numpy as np
1111
from mmcv.utils import ConfigDict
12-
from mpa import MPAConstants
13-
from mpa.stage import Stage
14-
from mpa.utils.config_utils import MPAConfig
15-
from mpa.utils.logger import get_logger
1612

1713
from otx.algorithms.classification.configs import ClassificationConfig
1814
from otx.algorithms.classification.utils import (
@@ -46,6 +42,10 @@
4642
from otx.api.usecases.tasks.interfaces.unload_interface import IUnload
4743
from otx.api.utils.dataset_utils import add_saliency_maps_to_dataset_item
4844
from otx.api.utils.labels_utils import get_empty_label
45+
from otx.mpa import MPAConstants
46+
from otx.mpa.stage import Stage
47+
from otx.mpa.utils.config_utils import MPAConfig
48+
from otx.mpa.utils.logger import get_logger
4949

5050
# pylint: disable=invalid-name
5151

otx/algorithms/classification/tasks/train.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
import torch
1414
from mmcv.utils import ConfigDict
15-
from mpa.utils.logger import get_logger
1615

1716
from otx.algorithms.classification.configs import ClassificationConfig
1817
from otx.algorithms.common.adapters.mmcv import OTXLoggerHook
@@ -36,6 +35,7 @@
3635
default_progress_callback as train_default_progress_callback,
3736
)
3837
from otx.api.serialization.label_mapper import label_schema_to_bytes
38+
from otx.mpa.utils.logger import get_logger
3939

4040
from .inference import ClassificationInferenceTask
4141

otx/algorithms/common/adapters/mmcv/hooks.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
from mmcv.runner.dist_utils import master_only
2626
from mmcv.runner.hooks import HOOKS, Hook, LoggerHook, LrUpdaterHook
2727
from mmcv.utils import print_log
28-
from mpa.utils.logger import get_logger
2928

3029
from otx.api.usecases.reporting.time_monitor_callback import TimeMonitorCallback
3130
from otx.api.utils.argument_checks import check_input_parameters_type
31+
from otx.mpa.utils.logger import get_logger
3232

3333
logger = get_logger()
3434

otx/algorithms/common/adapters/mmcv/models/backbones/efficientnet.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@
1818
from mmcv.cnn import build_activation_layer
1919
from mmcv.cnn.bricks import ConvModule
2020
from mmcv.runner import load_checkpoint
21-
from mpa.utils.logger import get_logger
2221
from torch import nn
2322
from torch.nn import init
2423

24+
from otx.mpa.utils.logger import get_logger
25+
2526
from ..builder import BACKBONES
2627

2728
logger = get_logger()

otx/algorithms/common/adapters/mmcv/models/backbones/efficientnetv2.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515

1616
import timm
1717
from mmcv.runner import load_checkpoint
18-
from mpa.utils.logger import get_logger
1918
from torch import nn
2019

20+
from otx.mpa.utils.logger import get_logger
21+
2122
from ..builder import BACKBONES
2223

2324
logger = get_logger()

otx/algorithms/common/adapters/mmcv/models/backbones/mobilenetv3.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717
import torch.nn.functional as F
1818
from mmcls.models.utils import make_divisible
1919
from mmcv.runner import load_checkpoint
20-
from mpa.utils.logger import get_logger
2120
from torch import nn
2221

22+
from otx.mpa.utils.logger import get_logger
23+
2324
from ..builder import BACKBONES
2425

2526
logger = get_logger()

otx/algorithms/common/tasks/training_base.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@
2525
import numpy as np
2626
import torch
2727
from mmcv.utils.config import Config, ConfigDict
28-
from mpa.builder import build
29-
from mpa.modules.hooks.cancel_interface_hook import CancelInterfaceHook
30-
from mpa.stage import Stage
31-
from mpa.utils.config_utils import remove_custom_hook, update_or_add_custom_hook
32-
from mpa.utils.logger import get_logger
3328

3429
from otx.algorithms.common.adapters.mmcv.hooks import OTXLoggerHook
3530
from otx.algorithms.common.configs import TrainType
@@ -44,6 +39,11 @@
4439
from otx.api.usecases.tasks.interfaces.inference_interface import IInferenceTask
4540
from otx.api.usecases.tasks.interfaces.unload_interface import IUnload
4641
from otx.api.utils.argument_checks import check_input_parameters_type
42+
from otx.mpa.builder import build
43+
from otx.mpa.modules.hooks.cancel_interface_hook import CancelInterfaceHook
44+
from otx.mpa.stage import Stage
45+
from otx.mpa.utils.config_utils import remove_custom_hook, update_or_add_custom_hook
46+
from otx.mpa.utils.logger import get_logger
4747

4848
logger = get_logger()
4949

otx/algorithms/detection/adapters/mmdet/utils/config_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import torch
2222
from mmcv import Config, ConfigDict
2323
from mmdet.models.detectors import BaseDetector
24-
from mpa.utils.logger import get_logger
2524

2625
from otx.algorithms.common.adapters.mmcv.utils import (
2726
get_meta_keys,
@@ -44,6 +43,7 @@
4443
DirectoryPathCheck,
4544
check_input_parameters_type,
4645
)
46+
from otx.mpa.utils.logger import get_logger
4747

4848
try:
4949
from sklearn.cluster import KMeans

otx/algorithms/detection/configs/detection/cspdarknet_yolox/semisl/data_pipeline.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
# pylint: disable=invalid-name
1818

19-
# This is from mpa/recipes/stages/_base_/data/pipelines/ubt.py
19+
# This is from otx/mpa/recipes/stages/_base_/data/pipelines/ubt.py
2020
# This could be needed sync with incr-learning's data pipeline
2121
__img_scale = (992, 736)
2222
__img_norm_cfg = dict(mean=[0, 0, 0], std=[255, 255, 255], to_rgb=True)

otx/algorithms/detection/configs/detection/mobilenetv2_atss/semisl/data_pipeline.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
# pylint: disable=invalid-name
1818

19-
# This is from mpa/recipes/stages/_base_/data/pipelines/ubt.py
19+
# This is from otx/mpa/recipes/stages/_base_/data/pipelines/ubt.py
2020
# This could be needed sync with incr-learning's data pipeline
2121
__img_scale = (992, 736)
2222
__img_norm_cfg = dict(mean=[0, 0, 0], std=[255, 255, 255], to_rgb=True)

otx/algorithms/detection/configs/detection/mobilenetv2_ssd/semisl/data_pipeline.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
# pylint: disable=invalid-name
1818

19-
# This is from mpa/recipes/stages/_base_/data/pipelines/ubt.py
19+
# This is from otx/mpa/recipes/stages/_base_/data/pipelines/ubt.py
2020
# This could be needed sync with incr-learning's data pipeline
2121
__img_scale = (864, 864)
2222
__img_norm_cfg = dict(mean=[0, 0, 0], std=[255, 255, 255], to_rgb=True)

otx/algorithms/detection/tasks/__init__.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414
# See the License for the specific language governing permissions
1515
# and limitations under the License.
1616

17-
import mpa.det as MPADetection
18-
1917
import otx.algorithms.common.adapters.mmcv.models as OTXBackbones
18+
import otx.mpa.det as MPADetection
2019

2120
from .inference import DetectionInferenceTask
2221
from .nncf import DetectionNNCFTask

otx/algorithms/detection/tasks/inference.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020
import cv2
2121
import numpy as np
2222
from mmcv.utils import ConfigDict
23-
from mpa import MPAConstants
24-
from mpa.utils.config_utils import MPAConfig
25-
from mpa.utils.logger import get_logger
2623

2724
from otx.algorithms.common.adapters.mmcv.utils import patch_data_pipeline
2825
from otx.algorithms.common.configs.training_base import TrainType
@@ -65,6 +62,9 @@
6562
check_input_parameters_type,
6663
)
6764
from otx.api.utils.dataset_utils import add_saliency_maps_to_dataset_item
65+
from otx.mpa import MPAConstants
66+
from otx.mpa.utils.config_utils import MPAConfig
67+
from otx.mpa.utils.logger import get_logger
6868

6969
logger = get_logger()
7070

otx/algorithms/detection/tasks/nncf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@
3636
)
3737
from mmdet.integration.nncf.config import compose_nncf_config
3838
from mmdet.models import build_detector
39-
from mpa.utils.config_utils import remove_custom_hook
40-
from mpa.utils.logger import get_logger
4139

4240
from otx.algorithms.common.adapters.mmcv.hooks import OTXLoggerHook
4341
from otx.algorithms.common.adapters.mmcv.utils import remove_from_config
@@ -75,6 +73,8 @@
7573
DatasetParamTypeCheck,
7674
check_input_parameters_type,
7775
)
76+
from otx.mpa.utils.config_utils import remove_custom_hook
77+
from otx.mpa.utils.logger import get_logger
7878

7979
from .inference import DetectionInferenceTask
8080

otx/algorithms/detection/tasks/openvino.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
from compression.graph import load_model, save_model
3333
from compression.graph.model_utils import compress_model_weights, get_nodes_by_type
3434
from compression.pipeline.initializer import create_pipeline
35-
from mpa.utils.logger import get_logger
3635
from openvino.model_zoo.model_api.adapters import OpenvinoAdapter, create_core
3736
from openvino.model_zoo.model_api.models import Model
3837

@@ -83,6 +82,7 @@
8382
)
8483
from otx.api.utils.dataset_utils import add_saliency_maps_to_dataset_item
8584
from otx.api.utils.detection_utils import detection2array
85+
from otx.mpa.utils.logger import get_logger
8686

8787
logger = get_logger()
8888

otx/algorithms/detection/tasks/train.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import numpy as np
2121
import torch
2222
from mmcv.utils import ConfigDict
23-
from mpa.utils.logger import get_logger
2423

2524
from otx.algorithms.common.adapters.mmcv.hooks import OTXLoggerHook
2625
from otx.algorithms.common.utils.callback import TrainingProgressCallback
@@ -46,6 +45,7 @@
4645
from otx.api.serialization.label_mapper import label_schema_to_bytes
4746
from otx.api.usecases.evaluation.metrics_helper import MetricsHelper
4847
from otx.api.usecases.tasks.interfaces.training_interface import ITrainingTask
48+
from otx.mpa.utils.logger import get_logger
4949

5050
from .inference import DetectionInferenceTask
5151

otx/algorithms/segmentation/tasks/__init__.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414
# See the License for the specific language governing permissions
1515
# and limitations under the License.
1616

17-
import mpa.seg as MPASegmentation
18-
1917
import otx.algorithms.common.adapters.mmcv.models as OTXBackbones
18+
import otx.mpa.seg as MPASegmentation
2019

2120
from .inference import SegmentationInferenceTask
2221
from .nncf import SegmentationNNCFTask

otx/algorithms/segmentation/tasks/inference.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@
1919

2020
import numpy as np
2121
from mmcv.utils import ConfigDict
22-
from mpa import MPAConstants
23-
from mpa.utils.config_utils import MPAConfig
24-
from mpa.utils.logger import get_logger
2522

2623
from otx.algorithms.common.adapters.mmcv.utils import (
2724
patch_data_pipeline,
@@ -64,6 +61,9 @@
6461
create_annotation_from_segmentation_map,
6562
create_hard_prediction_from_soft_prediction,
6663
)
64+
from otx.mpa import MPAConstants
65+
from otx.mpa.utils.config_utils import MPAConfig
66+
from otx.mpa.utils.logger import get_logger
6767

6868
logger = get_logger()
6969

otx/algorithms/segmentation/tasks/nncf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
)
3737
from mmseg.integration.nncf.config import compose_nncf_config
3838
from mmseg.models import build_segmentor
39-
from mpa.utils.config_utils import remove_custom_hook
4039

4140
from otx.algorithms.common.adapters.mmcv.hooks import OTXLoggerHook
4241
from otx.algorithms.common.utils.callback import OptimizationProgressCallback
@@ -71,6 +70,7 @@
7170
DatasetParamTypeCheck,
7271
check_input_parameters_type,
7372
)
73+
from otx.mpa.utils.config_utils import remove_custom_hook
7474

7575
logger = logging.getLogger(__name__)
7676

otx/algorithms/segmentation/tasks/openvino.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
from compression.graph import load_model, save_model
3030
from compression.graph.model_utils import compress_model_weights, get_nodes_by_type
3131
from compression.pipeline.initializer import create_pipeline
32-
from mpa.utils.logger import get_logger
3332
from openvino.model_zoo.model_api.adapters import OpenvinoAdapter, create_core
3433
from openvino.model_zoo.model_api.models import Model
3534

@@ -76,6 +75,7 @@
7675
DatasetParamTypeCheck,
7776
check_input_parameters_type,
7877
)
78+
from otx.mpa.utils.logger import get_logger
7979

8080
logger = get_logger()
8181

0 commit comments

Comments
 (0)