Skip to content

Commit

Permalink
Modify detection docs and remove unused initial detectors (#3186)
Browse files Browse the repository at this point in the history
* Modify detection docs and remove unused initial detectors

* Update unit tests
  • Loading branch information
jaegukhyun authored Mar 25, 2024
1 parent 6858a41 commit 8bb7fc1
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 330 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,6 @@ We trained each model with a single Nvidia GeForce RTX3090.
+----------------------------+------------------+-----------+-----------+-----------+-----------+--------------+
| ResNeXt101-ATSS | 45.1 (63.8) | 45.5 | 99.3 | 69.3 | 93.1 | 99.1 |
+----------------------------+------------------+-----------+-----------+-----------+-----------+--------------+
| ResNet50-Deformable-DETR | 44.3 (63.2) | 44.8 | 97.7 | 60.7 | 93.4 | 99.2 |
+----------------------------+------------------+-----------+-----------+-----------+-----------+--------------+
| ResNet50-DINO | 49.0 (66.4) | 47.2 | 99.5 | 62.9 | 93.5 | 99.1 |
+----------------------------+------------------+-----------+-----------+-----------+-----------+--------------+
| ResNet50-Lite-DINO | 48.1 (64.4) | 47.0 | 99.0 | 62.5 | 93.6 | 99.4 |
+----------------------------+------------------+-----------+-----------+-----------+-----------+--------------+
| YOLOX-S | 40.3 (59.1) | 37.1 | 93.6 | 54.8 | 92.7 | 98.8 |
+----------------------------+------------------+-----------+-----------+-----------+-----------+--------------+
| YOLOX-L | 49.4 (67.1) | 44.5 | 94.6 | 55.8 | 91.8 | 99.0 |
Expand Down
2 changes: 0 additions & 2 deletions docs/source/guide/tutorials/base/how_to_train/detection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ The list of supported templates for object detection is available with the comma
┃ Task ┃ Model Name ┃ Recipe Path ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ DETECTION │ atss_mobilenetv2_tile │ src/otx/recipe/detection/atss_mobilenetv2_tile.yaml │
│ DETECTION │ atss_r50_fpn │ src/otx/recipe/detection/atss_r50_fpn.yaml │
│ DETECTION │ atss_resnext101 │ src/otx/recipe/detection/atss_resnext101.yaml │
│ DETECTION │ atss_mobilenetv2 │ src/otx/recipe/detection/atss_mobilenetv2.yaml │
└───────────┴───────────────────────┴────────────────────────────────────────────────────────────────┘
Expand All @@ -151,7 +150,6 @@ The list of supported templates for object detection is available with the comma
print(model_lists)
'''
[
'atss_r50_fpn',
'atss_mobilenetv2',
'atss_mobilenetv2_tile',
'atss_resnext101',
Expand Down
21 changes: 0 additions & 21 deletions src/otx/algo/detection/atss.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,3 @@ def _export_parameters(self) -> dict[str, Any]:
def load_from_otx_v1_ckpt(self, state_dict: dict, add_prefix: str = "model.model.") -> dict:
"""Load the previous OTX ckpt according to OTX2.0."""
return OTXv1Helper.load_det_ckpt(state_dict, add_prefix)


class ATSSR50FPN(ATSS):
"""ATSSR50FPN Model."""

def __init__(self, num_classes: int) -> None:
super().__init__(num_classes=num_classes, variant="r50_fpn")
self.image_size = (1, 3, 800, 1333)
self.tile_image_size = self.image_size

@property
def _export_parameters(self) -> dict[str, Any]:
"""Parameters for an exporter."""
export_params = super()._export_parameters
export_params["deploy_cfg"] = "otx.algo.detection.mmdeploy.atss_r50_fpn"
export_params["input_size"] = self.image_size
export_params["resize_mode"] = "standard" # [TODO](@Eunwoo): need to revert it to fit_to_window after resolving
export_params["pad_value"] = 0
export_params["swap_rgb"] = False

return export_params
39 changes: 0 additions & 39 deletions src/otx/algo/detection/rtmdet.py

This file was deleted.

93 changes: 0 additions & 93 deletions src/otx/recipe/detection/atss_r50_fpn.yaml

This file was deleted.

146 changes: 0 additions & 146 deletions src/otx/recipe/detection/rtmdet_tiny.yaml

This file was deleted.

4 changes: 1 addition & 3 deletions tests/unit/algo/detection/test_atss.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""Test of OTX SSD architecture."""

import pytest
from otx.algo.detection.atss import ATSS, ATSSR50FPN
from otx.algo.detection.atss import ATSS
from otx.algo.utils.support_otx_v1 import OTXv1Helper


Expand All @@ -12,9 +12,7 @@ class TestATSS:
"model",
[
ATSS(num_classes=2, variant="mobilenetv2"),
ATSS(num_classes=2, variant="r50_fpn"),
ATSS(num_classes=2, variant="resnext101"),
ATSSR50FPN(num_classes=2),
],
)
def test(self, model, mocker) -> None:
Expand Down
20 changes: 0 additions & 20 deletions tests/unit/algo/detection/test_rtmdet.py

This file was deleted.

0 comments on commit 8bb7fc1

Please sign in to comment.