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

Refactoring instance segmentation modules #3696

Merged

Conversation

sungchul2
Copy link
Contributor

@sungchul2 sungchul2 commented Jun 28, 2024

Summary

This PR includes:

  • Remove mmdet and torchvision directory & Refactor duplicated functions
before after
src/otx/algo/instance_segmentation/
├── losses
│   ├── accuracy.py
│   ├── dice_loss.py
│   └── __init__.py
├── maskrcnn.py
├── maskrcnn_tv.py
├── mmdet
│   ├── __init__.py
│   ├── models
│   │   ├── backbones
│   │   ├── __init__.py
│   │   └── swin.py
│   ├── base_roi_head.py
│   ├── bbox_heads
│   │   ├── bbox_head.py
│   │   ├── convfc_bbox_head.py
│   │   └── __init__.py
│   ├── custom_roi_head.py
│   ├── dense_heads
│   │   ├── __init__.py
│   │   ├── rpn_head.py
│   │   ├── rtmdet_ins_head.py
│   │   └── utils.py
│   ├── detectors
│   │   ├── base.py
│   │   ├── __init__.py
│   │   ├── mask_rcnn.py
│   │   ├── rtmdet.py
│   │   └── two_stage.py
│   ├── __init__.py
│   ├── layers
│   │   ├── bbox_nms.py
│   │   ├── __init__.py
│   │   └── transformer.py
│   ├── mask_heads
│   │   ├── fcn_mask_head.py
│   │   └── __init__.py
│   ├── necks
│   │   ├── fpn.py
│   │   └── __init__.py
│   └── roi_extractors
│       ├── base_roi_extractor.py
│       ├── __init__.py
│       ├── roi_align.py
│       └── single_level_roi_extractor.py
├── structures
│       ├── bbox
│       │   ├── __init__.py
│       │   └── transforms.py
│       └── mask
│            ├── __init__.py
│            └── mask_target.py
├── rtmdet_inst.py
├── torchvision
│   ├── maskrcnn.py
│   └── roi_head.py
└── utils
    ├── __init__.py
    ├── roi_extractors
    ├── structures
    └── utils.py
src/otx/algo/instance_segmentation/
├── backbones
│   ├── __init__.py
│   └── swin.py
├── heads
│   ├── base_roi_head.py
│   ├── bbox_head.py
│   ├── convfc_bbox_head.py
│   ├── custom_roi_head.py
│   ├── fcn_mask_head.py
│   ├── __init__.py
│   ├── roi_head_tv.py
│   ├── rpn_head.py
│   ├── rtmdet_ins_head.py
│   └── utils.py
├── __init__.py
├── layers
│   ├── bbox_nms.py
│   ├── __init__.py
│   └── transformer.py
├── losses
│   ├── accuracy.py
│   ├── dice_loss.py
│   └── __init__.py
├── maskrcnn.py
├── maskrcnn_tv.py
├── necks
│   ├── fpn.py
│   └── __init__.py
├── rtmdet_inst.py
├── two_stage.py
└── utils
    ├── __init__.py
    ├── roi_extractors
    │   ├── base_roi_extractor.py
    │   ├── __init__.py
    │   ├── roi_align.py
    │   └── single_level_roi_extractor.py
    ├── structures
    │   ├── bbox
    │   │   ├── __init__.py
    │   │   └── transforms.py
    │   └── mask
    │       ├── __init__.py
    │       └── mask_target.py
    └── utils.py
  • Update docstring
  • Remove DictConfig

How to test

xai related tests will be fixed soon. (#3706)

$ tox -vv -e integration-test-instance_segmentation
===== 47 passed, 24 skipped, 1 xfailed, 267 warnings in 1484.14s (0:24:44) =====

$ tox -vv -e integration-test-detection
FAILED tests/integration/api/test_xai.py::test_forward_explain[.tox/integration-test-detection/lib/python3.11/site-packages/otx/recipe/detection/yolox_s.yaml]                                                                                                                      FAILED tests/integration/api/test_xai.py::test_forward_explain[.tox/integration-test-detection/lib/python3.11/site-pack$ges/otx/recipe/detection/yolox_l.yaml]
FAILED tests/integration/api/test_xai.py::test_forward_explain[.tox/integration-test-detection/lib/python3.11/site-packages/otx/recipe/detection/yolox_x_tile.yaml]
FAILED tests/integration/api/test_xai.py::test_forward_explain[.tox/integration-test-detection/lib/python3.11/site-packages/otx/recipe/detection/yolox_l_tile.yaml]
FAILED tests/integration/api/test_xai.py::test_forward_explain[.tox/integration-test-detection/lib/python3.11/site-packages/otx/recipe/detection/yolox_tiny.yaml]
FAILED tests/integration/api/test_xai.py::test_forward_explain[.tox/integration-test-detection/lib/python3.11/site-packages/otx/recipe/detection/yolox_s_tile.yaml]
FAILED tests/integration/api/test_xai.py::test_forward_explain[.tox/integration-test-detection/lib/python3.11/site-packages/otx/recipe/detection/yolox_tiny_tile.yaml]
FAILED tests/integration/api/test_xai.py::test_forward_explain[.tox/integration-test-detection/lib/python3.11/site-packages/otx/recipe/detection/yolox_x.yaml]
===== 8 failed, 71 passed, 16 skipped, 2 xfailed, 456 warnings in 1784.93s (0:29:44) =====

Checklist

  • I have added unit tests to cover my changes.​
  • I have added integration tests to cover my changes.​
  • I have ran e2e tests and there is no issues.
  • I have added the description of my changes into CHANGELOG in my target branch (e.g., CHANGELOG in develop).​
  • I have updated the documentation in my target branch accordingly (e.g., documentation in develop).
  • I have linked related issues.

License

  • I submit my code changes under the same Apache License that covers the project.
    Feel free to contact the maintainers if that's a concern.
  • I have updated the license header for each file (see an example below).
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

@github-actions github-actions bot removed BUILD DOC Improvements or additions to documentation labels Jun 28, 2024
Copy link
Collaborator

@eugene123tw eugene123tw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sungchul2 Thank you for your effort! The refactor looks great.

@sungchul2 sungchul2 enabled auto-merge (squash) July 2, 2024 13:56
@sungchul2 sungchul2 disabled auto-merge July 2, 2024 13:56
@sungchul2 sungchul2 enabled auto-merge (squash) July 2, 2024 13:56
@sungchul2 sungchul2 merged commit 6281089 into openvinotoolkit:releases/2.1.0 Jul 2, 2024
6 checks passed
@sungchul2 sungchul2 deleted the refactoring-iseg-modules branch July 3, 2024 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TEST Any changes in tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants