Skip to content

Commit 06142b6

Browse files
jaegukhyuneunwoosh
andauthored
Update detection docs (#2335)
* Update detection docs * Revert template id changes * Fix wrong template id * Update docs/source/guide/explanation/algorithms/object_detection/object_detection.rst Co-authored-by: Eunwoo Shin <eunwoo.shin@intel.com> * Update docs/source/guide/explanation/algorithms/object_detection/object_detection.rst Co-authored-by: Eunwoo Shin <eunwoo.shin@intel.com> --------- Co-authored-by: Eunwoo Shin <eunwoo.shin@intel.com>
1 parent 4a8b079 commit 06142b6

File tree

18 files changed

+137
-101
lines changed

18 files changed

+137
-101
lines changed

docs/source/guide/explanation/algorithms/object_detection/object_detection.rst

+79-48
Large diffs are not rendered by default.

docs/source/guide/get_started/cli_commands.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ Example to find ready-to-use templates for the detection task:
3232
.. code-block::
3333
3434
(otx) ...$ otx find --task detection
35-
+-----------+-----------------------------------+-------+-------------------------------------------------------------------------------+
36-
| TASK | ID | NAME | BASE PATH |
37-
+-----------+-----------------------------------+-------+-------------------------------------------------------------------------------+
38-
| DETECTION | Custom_Object_Detection_Gen3_ATSS | ATSS | src/otx/algorithms/detection/configs/detection/mobilenetv2_atss/template.yaml |
39-
| DETECTION | Custom_Object_Detection_Gen3_SSD | SSD | src/otx/algorithms/detection/configs/detection/mobilenetv2_ssd/template.yaml |
40-
| DETECTION | Custom_Object_Detection_YOLOX | YOLOX | src/otx/algorithms/detection/configs/detection/cspdarknet_yolox/template.yaml |
41-
+-----------+-----------------------------------+-------+-------------------------------------------------------------------------------+
35+
+-----------+-----------------------------------------------+------------------+-------------------------------------------------------------------------------+
36+
| TASK | ID | NAME | BASE PATH |
37+
+-----------+-----------------------------------------------+------------------+-------------------------------------------------------------------------------+
38+
| DETECTION | Custom_Object_Detection_Gen3_SSD | SSD | src/otx/algorithms/detection/configs/detection/mobilenetv2_ssd/template.yaml |
39+
| DETECTION | Custom_Object_Detection_YOLOX | YOLOX | src/otx/algorithms/detection/configs/detection/cspdarknet_yolox/template.yaml |
40+
| DETECTION | Custom_Object_Detection_Gen3_ATSS | MobileNetV2-ATSS | src/otx/algorithms/detection/configs/detection/mobilenetv2_atss/template.yaml |
41+
+-----------+-----------------------------------------------+------------------+-------------------------------------------------------------------------------+
4242
4343
4444
Example to find supported torchvision backbones for the detection task:

docs/source/guide/tutorials/base/how_to_train/detection.rst

+9-9
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,13 @@ The list of supported templates for object detection is available with the comma
134134
.. code-block::
135135
136136
(otx) ...$ otx find --template --task DETECTION
137-
+-----------+-----------------------------------+-------+-------------------------------------------------------------------------------+
138-
| TASK | ID | NAME | PATH |
139-
+-----------+-----------------------------------+-------+-------------------------------------------------------------------------------+
140-
| DETECTION | Custom_Object_Detection_YOLOX | YOLOX | src/otx/algorithms/detection/configs/detection/cspdarknet_yolox/template.yaml |
141-
| DETECTION | Custom_Object_Detection_Gen3_SSD | SSD | src/otx/algorithms/detection/configs/detection/mobilenetv2_ssd/template.yaml |
142-
| DETECTION | Custom_Object_Detection_Gen3_ATSS | ATSS | src/otx/algorithms/detection/configs/detection/mobilenetv2_atss/template.yaml |
143-
+-----------+-----------------------------------+-------+-------------------------------------------------------------------------------+
137+
+-----------+-----------------------------------------------+------------------+-------------------------------------------------------------------------------+
138+
| TASK | ID | NAME | BASE PATH |
139+
+-----------+-----------------------------------------------+------------------+-------------------------------------------------------------------------------+
140+
| DETECTION | Custom_Object_Detection_Gen3_SSD | SSD | src/otx/algorithms/detection/configs/detection/mobilenetv2_ssd/template.yaml |
141+
| DETECTION | Custom_Object_Detection_YOLOX | YOLOX | src/otx/algorithms/detection/configs/detection/cspdarknet_yolox/template.yaml |
142+
| DETECTION | Custom_Object_Detection_Gen3_ATSS | MobileNetV2-ATSS | src/otx/algorithms/detection/configs/detection/mobilenetv2_atss/template.yaml |
143+
+-----------+-----------------------------------------------+------------------+-------------------------------------------------------------------------------+v
144144
145145
.. _detection_workspace:
146146

@@ -165,15 +165,15 @@ Let's prepare the object detection workspace running the following command:
165165
(otx) ...$ otx build Custom_Object_Detection_Gen3_ATSS --train-data-roots data/wgisd
166166
167167
# or its name
168-
(otx) ...$ otx build ATSS --train-data-roots data/wgisd
168+
(otx) ...$ otx build MobileNetV2-ATSS --train-data-roots data/wgisd
169169
170170
# or its path
171171
(otx) ...$ otx build otx/algorithms/detection/configs/detection/mobilenetv2_atss/template.yaml --train-data-roots data/wgisd
172172
173173
...
174174
[*] Workspace Path: otx-workspace-DETECTION
175175
[*] Load Model Template ID: Custom_Object_Detection_Gen3_ATSS
176-
[*] Load Model Name: ATSS
176+
[*] Load Model Name: MobileNetV2-ATSS
177177
[*] - Updated: otx-workspace-DETECTION/model.py
178178
[*] - Updated: otx-workspace-DETECTION/data_pipeline.py
179179
[*] - Updated: otx-workspace-DETECTION/tile_pipeline.py

src/otx/algorithms/detection/configs/detection/mobilenetv2_atss/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Initialization of ATSS model for Detection Task."""
1+
"""Initialization of MobileNetV2-ATSS model for Detection Task."""
22

33
# Copyright (C) 2022 Intel Corporation
44
#

src/otx/algorithms/detection/configs/detection/mobilenetv2_atss/data_pipeline.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Data Pipeline of ATSS model for Detection Task."""
1+
"""Data Pipeline of MobileNetV2-ATSS model for Detection Task."""
22

33
# Copyright (C) 2022 Intel Corporation
44
#

src/otx/algorithms/detection/configs/detection/mobilenetv2_atss/deployment.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""MMDeploy config of ATSS model for Detection Task."""
1+
"""MMDeploy config of MobileNetV2-ATSS model for Detection Task."""
22

33
_base_ = ["../../base/deployments/base_detection_dynamic.py"]
44

src/otx/algorithms/detection/configs/detection/mobilenetv2_atss/model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Model configuration of ATSS model for Detection Task."""
1+
"""Model configuration of MobileNetV2-ATSS model for Detection Task."""
22

33
# Copyright (C) 2022 Intel Corporation
44
#

src/otx/algorithms/detection/configs/detection/mobilenetv2_atss/semisl/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Initialization of ATSS model for Semi-SL Detection Task."""
1+
"""Initialization of MobileNetV2-ATSS model for Semi-SL Detection Task."""
22

33
# Copyright (C) 2022 Intel Corporation
44
#

src/otx/algorithms/detection/configs/detection/mobilenetv2_atss/semisl/data_pipeline.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Data Pipeline of ATSS model for Semi-Supervised Learning Detection Task."""
1+
"""Data Pipeline of MobileNetV2-ATSS model for Semi-Supervised Learning Detection Task."""
22

33
# Copyright (C) 2022 Intel Corporation
44
#

src/otx/algorithms/detection/configs/detection/mobilenetv2_atss/semisl/model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Model configuration of ATSS model for Detection Task."""
1+
"""Model configuration of MobileNetV2-ATSS model for Detection Task."""
22

33
# Copyright (C) 2022 Intel Corporation
44
#

src/otx/algorithms/detection/configs/detection/mobilenetv2_atss/template.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Description.
22
model_template_id: Custom_Object_Detection_Gen3_ATSS
3-
name: ATSS
3+
name: MobileNetV2-ATSS
44
task_type: DETECTION
55
task_family: VISION
66
instantiation: "CLASS"
7-
summary: Class-Incremental Object Detection for ATSS
7+
summary: Class-Incremental Object Detection for MobileNetV2-ATSS
88
application: ~
99

1010
# Algo backend.

src/otx/algorithms/detection/configs/detection/mobilenetv2_atss/tile_pipeline.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Tiling Pipeline of ATSS model for Detection Task."""
1+
"""Tiling Pipeline of MobileNetV2-ATSS model for Detection Task."""
22

33
# Copyright (C) 2022 Intel Corporation
44
#

tests/e2e/test_api_xai_sanity.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def test_inference_xai(self, multilabel, hierarchical):
147147

148148
class TestOVDetXAIAPI(DetectionTaskAPIBase):
149149
ref_raw_saliency_shapes = {
150-
"ATSS": (6, 8),
150+
"MobileNetV2-ATSS": (6, 8),
151151
}
152152

153153
@e2e_pytest_api
@@ -216,7 +216,7 @@ def test_inference_xai(self):
216216

217217
class TestOVDetTilXAIAPI(DetectionTaskAPIBase):
218218
ref_raw_saliency_shapes = {
219-
"ATSS": (6, 8),
219+
"MobileNetV2-ATSS": (6, 8),
220220
}
221221

222222
@e2e_pytest_api

tests/integration/cli/test_cli.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@
3939
"--model": "MobileNet-V3-large-1x",
4040
"--train-type": "Semisupervised",
4141
},
42-
"detection": {"default": "ATSS", "--task": "detection", "--model": "SSD", "--train-type": "Semisupervised"},
42+
"detection": {
43+
"default": "MobileNetV2-ATSS",
44+
"--task": "detection",
45+
"--model": "SSD",
46+
"--train-type": "Semisupervised",
47+
},
4348
}
4449

4550

tests/regression/regression_config.json

+20-20
Original file line numberDiff line numberDiff line change
@@ -325,27 +325,27 @@
325325
"train": {
326326
"YOLOX": 0.537,
327327
"SSD": 0.179,
328-
"ATSS": 0.446
328+
"MobileNetV2-ATSS": 0.446
329329
},
330330
"export": {
331331
"YOLOX": 0.534,
332332
"SSD": 0.179,
333-
"ATSS": 0.455
333+
"MobileNetV2-ATSS": 0.455
334334
},
335335
"deploy": {
336336
"YOLOX": 0.534,
337337
"SSD": 0.179,
338-
"ATSS": 0.455
338+
"MobileNetV2-ATSS": 0.455
339339
},
340340
"nncf": {
341341
"YOLOX": 0.517,
342342
"SSD": 0.181,
343-
"ATSS": 0.446
343+
"MobileNetV2-ATSS": 0.446
344344
},
345345
"pot": {
346346
"YOLOX": 0.531,
347347
"SSD": 0.18,
348-
"ATSS": 0.458
348+
"MobileNetV2-ATSS": 0.458
349349
}
350350
}
351351
},
@@ -354,7 +354,7 @@
354354
"train": {
355355
"YOLOX": 0.532,
356356
"SSD": 0.2,
357-
"ATSS": 0.443
357+
"MobileNetV2-ATSS": 0.443
358358
}
359359
}
360360
},
@@ -363,7 +363,7 @@
363363
"train": {
364364
"YOLOX": 0.398,
365365
"SSD": 0.142,
366-
"ATSS": 0.414
366+
"MobileNetV2-ATSS": 0.414
367367
}
368368
}
369369
},
@@ -372,27 +372,27 @@
372372
"train": {
373373
"YOLOX": 0.545,
374374
"SSD": 0.19,
375-
"ATSS": 0.459
375+
"MobileNetV2-ATSS": 0.459
376376
},
377377
"export": {
378378
"YOLOX": 0.549,
379379
"SSD": 0.19,
380-
"ATSS": 0.469
380+
"MobileNetV2-ATSS": 0.469
381381
},
382382
"deploy": {
383383
"YOLOX": 0.549,
384384
"SSD": 0.19,
385-
"ATSS": 0.469
385+
"MobileNetV2-ATSS": 0.469
386386
},
387387
"nncf": {
388388
"YOLOX": 0.0,
389389
"SSD": 0.0,
390-
"ATSS": 0.0
390+
"MobileNetV2-ATSS": 0.0
391391
},
392392
"pot": {
393393
"YOLOX": 0.531,
394394
"SSD": 0.192,
395-
"ATSS": 0.459
395+
"MobileNetV2-ATSS": 0.459
396396
}
397397
}
398398
}
@@ -1573,7 +1573,7 @@
15731573
"train": {
15741574
"YOLOX": 4226.84,
15751575
"SSD": 1992.196,
1576-
"ATSS": 1843.627
1576+
"MobileNetV2-ATSS": 1843.627
15771577
}
15781578
}
15791579
},
@@ -1582,7 +1582,7 @@
15821582
"train": {
15831583
"YOLOX": 3059.355,
15841584
"SSD": 1439.16,
1585-
"ATSS": 1531.103
1585+
"MobileNetV2-ATSS": 1531.103
15861586
}
15871587
}
15881588
},
@@ -1591,7 +1591,7 @@
15911591
"train": {
15921592
"YOLOX": 4962.307,
15931593
"SSD": 6410.017,
1594-
"ATSS": 6263.435
1594+
"MobileNetV2-ATSS": 6263.435
15951595
}
15961596
}
15971597
},
@@ -1600,7 +1600,7 @@
16001600
"train": {
16011601
"YOLOX": 1689.117,
16021602
"SSD": 2052.821,
1603-
"ATSS": 2074.501
1603+
"MobileNetV2-ATSS": 2074.501
16041604
}
16051605
}
16061606
}
@@ -1973,7 +1973,7 @@
19731973
"train": {
19741974
"YOLOX": 82.169,
19751975
"SSD": 86.989,
1976-
"ATSS": 73.888
1976+
"MobileNetV2-ATSS": 73.888
19771977
}
19781978
}
19791979
},
@@ -1982,7 +1982,7 @@
19821982
"train": {
19831983
"YOLOX": 59.154,
19841984
"SSD": 89.412,
1985-
"ATSS": 62.492
1985+
"MobileNetV2-ATSS": 62.492
19861986
}
19871987
}
19881988
},
@@ -1991,7 +1991,7 @@
19911991
"train": {
19921992
"YOLOX": 47.199,
19931993
"SSD": 76.703,
1994-
"ATSS": 50.34
1994+
"MobileNetV2-ATSS": 50.34
19951995
}
19961996
}
19971997
},
@@ -2000,7 +2000,7 @@
20002000
"train": {
20012001
"YOLOX": 146.561,
20022002
"SSD": 169.937,
2003-
"ATSS": 84.882
2003+
"MobileNetV2-ATSS": 84.882
20042004
}
20052005
}
20062006
}

tests/unit/algorithms/detection/test_xai_detection_validity.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@
2424

2525
class TestExplainMethods:
2626
ref_saliency_shapes = {
27-
"ATSS": (2, 4, 4),
27+
"MobileNetV2-ATSS": (2, 4, 4),
2828
"SSD": (81, 13, 13),
2929
"YOLOX": (80, 13, 13),
3030
}
3131

3232
ref_saliency_vals_det = {
33-
"ATSS": np.array([67, 216, 255, 57], dtype=np.uint8),
33+
"MobileNetV2-ATSS": np.array([67, 216, 255, 57], dtype=np.uint8),
3434
"YOLOX": np.array([80, 28, 42, 53, 49, 68, 72, 75, 69, 57, 65, 6, 157], dtype=np.uint8),
3535
"SSD": np.array([119, 72, 118, 35, 39, 30, 31, 31, 36, 28, 44, 23, 61], dtype=np.uint8),
3636
}
3737

3838
ref_saliency_vals_det_wo_postprocess = {
39-
"ATSS": -0.10465062,
39+
"MobileNetV2-ATSS": -0.10465062,
4040
"YOLOX": 0.04948914,
4141
"SSD": 0.6629989,
4242
}

tests/unit/cli/manager/test_config_manager.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ def test__check_rebuild(self, mocker):
433433
assert not config_manager._check_rebuild()
434434

435435
config_manager.args.model = "SSD"
436-
config_manager.template.name = "ATSS"
436+
config_manager.template.name = "MobileNetV2-ATSS"
437437
config_manager.args.train_type = "Semisupervised"
438438
assert config_manager._check_rebuild()
439439

0 commit comments

Comments
 (0)