Skip to content

Commit a8c6658

Browse files
authored
Update action detection (#2346)
* Remove skip mark for PTQ test of action detection * Update action detection documentation
1 parent bb3ab4c commit a8c6658

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

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

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Let's prepare an OpenVINO™ Training Extensions action detection workspace runn
8989

9090
.. code-block::
9191
92-
(otx) ...$ otx build --train-data-roots ./data/JHMDB_5%/train --val-data-roots ./data/JHMDB_5%/test --model X3D_FAST_RCNN
92+
(otx) ...$ otx build x3d_fast_rcnn --train-data-roots ./data/JHMDB_5%/train --val-data-roots ./data/JHMDB_5%/test
9393
9494
[*] Workspace Path: otx-workspace-ACTION_DETECTION
9595
[*] Load Model Template ID: Custom_Action_Detection_X3D_FAST_RCNN
@@ -146,9 +146,9 @@ We will get a similar to this validation output after some validation time (abou
146146
2023-02-21 22:42:14,749 - mmaction - INFO - Done.
147147
2023-02-21 22:44:24,345 - mmaction - INFO - Inference completed
148148
2023-02-21 22:44:24,347 - mmaction - INFO - called evaluate()
149-
2023-02-21 22:44:26,349 - mmaction - INFO - Final model performance: Performance(score: 0.537625754527163, dashboard: (1 metric groups))
149+
2023-02-21 22:44:26,349 - mmaction - INFO - Final model performance: Performance(score: 0.5086285195277019, dashboard: (1 metric groups))
150150
2023-02-21 22:44:26,349 - mmaction - INFO - Evaluation completed
151-
Performance(score: 0.537625754527163, dashboard: (1 metric groups))
151+
Performance(score: 0.5086285195277019, dashboard: (1 metric groups))
152152
153153
.. note::
154154

@@ -160,7 +160,7 @@ Export
160160
*********
161161

162162
1. ``otx export`` exports a trained Pytorch `.pth` model to the OpenVINO™ Intermediate Representation (IR) format.
163-
It allows running the model on the Intel hardware much more efficiently, especially on the CPU. Also, the resulting IR model is required to run POT optimization. IR model consists of two files: ``openvino.xml`` for weights and ``openvino.bin`` for architecture.
163+
It allows running the model on the Intel hardware much more efficiently, especially on the CPU. Also, the resulting IR model is required to run PTQ optimization. IR model consists of two files: ``openvino.xml`` for weights and ``openvino.bin`` for architecture.
164164

165165
2. Run the command line below to export the trained model
166166
and save the exported model to the ``openvino`` folder.
@@ -192,24 +192,19 @@ using ``otx eval`` and passing the IR model path to the ``--load-weights`` param
192192
193193
...
194194
195-
Performance(score: 0.0, dashboard: (3 metric groups))
196-
197-
.. note::
198-
199-
Unfortunately, openvino has trouble in export from ONNX file, which comes from torch 1.13.
200-
You can get proper openvino IR when you downgrade torch version to 1.12.1 when exporting.
195+
Performance(score: 0.47351524879614754, dashboard: (3 metric groups))
201196
202197
203198
*************
204199
Optimization
205200
*************
206201

207202
1. You can further optimize the model with ``otx optimize``.
208-
Currently, only POT is supported for action detection. NNCF will be supported in near future.
203+
Currently, only PTQ is supported for action detection. NNCF will be supported in near future.
209204
Refer to :doc:`optimization explanation <../../../explanation/additional_features/models_optimization>` section for more details on model optimization.
210205

211206
2. Example command for optimizing
212-
OpenVINO™ model (.xml) with OpenVINO™ POT.
207+
OpenVINO™ model (.xml) with OpenVINO™ PTQ.
213208

214209
.. code-block::
215210
@@ -218,9 +213,11 @@ OpenVINO™ model (.xml) with OpenVINO™ POT.
218213
219214
...
220215
221-
Performance(score: 0.0, dashboard: (3 metric groups))
216+
[*] Update data configuration file to: data.yaml
217+
Statistics collection: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 300/300 [04:16<00:00, 1.17it/s]Biases correction: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 168/168 [00:15<00:00, 10.63it/s][>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 1572/1572, 7.3 task/s, elapsed: 216s, ETA: 0s
218+
Performance(score: 0.4621155288822204, dashboard: (1 metric groups))
222219
223-
Keep in mind that POT will take some time (generally less than NNCF optimization) without logging to optimize the model.
220+
Keep in mind that PTQ will take some time (generally less than NNCF optimization) without logging to optimize the model.
224221

225222
3. Now, you have fully trained, optimized and exported an
226223
efficient model representation ready-to-use action detection model.

tests/e2e/cli/action/test_action_detection.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ def test_otx_eval_openvino(self, template, tmp_dir_path):
102102
@e2e_pytest_component
103103
@pytest.mark.skipif(TT_STABILITY_TESTS, reason="This is TT_STABILITY_TESTS")
104104
@pytest.mark.parametrize("template", templates, ids=templates_ids)
105-
@pytest.mark.skip(reason="Issue#2279: Exported action detection model shows 0.0 on a toy dataset")
106105
def test_pot_optimize(self, template, tmp_dir_path):
107106
tmp_dir_path = tmp_dir_path / "action_det"
108107
pot_optimize_testing(template, tmp_dir_path, otx_dir, args)

0 commit comments

Comments
 (0)