Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation refactoring #1977

Merged
merged 11 commits into from
Apr 7, 2023
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file.
- Enhance DetCon logic and SupCon for semantic segmentation(<https://github.com/openvinotoolkit/training_extensions/pull/1958>)
- Classification task refactoring (<https://github.com/openvinotoolkit/training_extensions/pull/1972>)
- Extend OTX explain CLI (<https://github.com/openvinotoolkit/training_extensions/pull/1941>)
- Segmentation task refactoring (<https://github.com/openvinotoolkit/training_extensions/pull/1977>)

### Bug fixes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ Tasks
:maxdepth: 3
:caption: Contents:

.. automodule:: otx.algorithms.segmentation.tasks
.. automodule:: otx.algorithms.segmentation.task
:members:
:undoc-members:
1 change: 1 addition & 0 deletions otx/algorithms/common/tasks/base_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class OTXTask(IInferenceTask, IExportTask, IEvaluationTask, IUnload, ABC):
def __init__(self, task_environment: TaskEnvironment, output_path: Optional[str] = None):
self._config: Dict[Any, Any] = {}
self._task_environment = task_environment
self._model_name = task_environment.model_template.name
jaegukhyun marked this conversation as resolved.
Show resolved Hide resolved
self._task_type = task_environment.model_template.task_type
self._labels = task_environment.get_labels(include_empty=False)
self._work_dir_is_temp = False
Expand Down
4 changes: 4 additions & 0 deletions otx/algorithms/segmentation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@

# Copyright (C) 2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

from .task import OTXSegmentationTask

__all__ = ["OTXSegmentationTask"]
3 changes: 2 additions & 1 deletion otx/algorithms/segmentation/adapters/mmseg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# See the License for the specific language governing permissions
# and limitations under the License.


from .datasets import MPASegDataset
from .models import (
ClassIncrEncoderDecoder,
Expand All @@ -33,6 +32,7 @@
StepScalarScheduler,
SupConDetConB,
)
from .nncf import CustomstepLrUpdaterHook
harimkang marked this conversation as resolved.
Show resolved Hide resolved

# fmt: off
# isort: off
Expand All @@ -49,6 +49,7 @@
"LiteHRNet",
"MMOVBackbone",
"CustomFCNHead",
"CustomstepLrUpdaterHook",
"MMOVDecodeHead",
"DetConLoss",
"SelfSLMLP",
Expand Down
Loading