From e6ae9f2adce894dcc9c1edb7286255cbc56e9572 Mon Sep 17 00:00:00 2001 From: Vladislav Sovrasov Date: Wed, 17 May 2023 11:58:08 +0900 Subject: [PATCH] Fix tiling IS tests --- CHANGELOG.md | 3 --- .../common/adapters/mmdeploy/apis.py | 21 +++++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef2a7557afb..f544c001b84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,11 +16,8 @@ All notable changes to this project will be documented in this file. - Make semantic segmentation OpenVINO models compatible with ModelAPI (). - Support label hierarchy through LabelTree in LabelSchema for classification task (, ). -<<<<<<< HEAD - Enhance exportable code file structure, video inference and default value for demo (). -======= - Refactoring of ONNX export functionality (). ->>>>>>> 81db95455 (Update changelog) ### Bug fixes diff --git a/otx/algorithms/common/adapters/mmdeploy/apis.py b/otx/algorithms/common/adapters/mmdeploy/apis.py index 3cb27904abd..53c4a36e7dc 100644 --- a/otx/algorithms/common/adapters/mmdeploy/apis.py +++ b/otx/algorithms/common/adapters/mmdeploy/apis.py @@ -226,6 +226,7 @@ def helper(*args, **kwargs): input_data, cfg, deploy_cfg, + export_type, model_name=model_name, ) @@ -255,6 +256,7 @@ def extract_partition( input_data: Any, cfg: mmcv.Config, deploy_cfg: mmcv.Config, + export_type: str, *, model_name: str = "model", ): @@ -276,15 +278,16 @@ def extract_partition( partition_cfgs, ) - deploy_cfg_ = deepcopy(deploy_cfg) - update_deploy_cfg(partition_onnx[0], deploy_cfg_) - MMdeployExporter.onnx2openvino( - output_dir, - partition_onnx[0], - deploy_cfg_, - ) - deploy_cfg["partition_config"]["apply_marks"] = False - reset_mark_function_count() + if "ONNX" not in export_type: + deploy_cfg_ = deepcopy(deploy_cfg) + update_deploy_cfg(partition_onnx[0], deploy_cfg_) + MMdeployExporter.onnx2openvino( + output_dir, + partition_onnx[0], + deploy_cfg_, + ) + deploy_cfg["partition_config"]["apply_marks"] = False + reset_mark_function_count() @staticmethod def torch2onnx(