training_extensions icon indicating copy to clipboard operation
training_extensions copied to clipboard

Refactoring instance segmentation modules

Open sungchul1 opened this issue 1 year ago • 0 comments

Summary

This PR includes:

  • [x] Remove mmdet and torchvision directory & Refactor duplicated functions

        <table>
        <tr>
        <td> before </td> <td> after </td>
        </tr>
        <tr>
        <td>
    
        ```shell
        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
        ```
    
        </td>
        <td>
    
        ```shell
        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
            ├── structures
            └── utils.py
        ```
    
        </td>
        </tr>
        </table>
    

How to test

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

sungchul1 avatar Jun 28 '24 08:06 sungchul1