Skip to content

Commit

Permalink
Use model_api action classification model wrapper class (#3610)
Browse files Browse the repository at this point in the history
* implement draft

* revert debug code

* update model api version

---------

Co-authored-by: Vladislav Sovrasov <[email protected]>
  • Loading branch information
eunwoosh and sovrasov authored Jul 2, 2024
1 parent 4a6d427 commit 3a44e46
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 113 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ base = [
"timm",
"openvino==2024.0",
"openvino-dev==2024.0",
"openvino-model-api==0.2.0",
"openvino-model-api==0.2.1",
"onnx==1.16.1",
"onnxconverter-common==1.14.0",
"nncf==2.9.0",
Expand Down
2 changes: 0 additions & 2 deletions src/otx/algo/action_classification/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@

from .backbones import MoViNetBackbone, X3DBackbone
from .heads import MoViNetHead, X3DHead
from .openvino_model import OTXOVActionCls
from .recognizers import BaseRecognizer, MoViNetRecognizer

__all__ = [
"OTXOVActionCls",
"BaseRecognizer",
"MoViNetBackbone",
"MoViNetHead",
Expand Down
109 changes: 0 additions & 109 deletions src/otx/algo/action_classification/openvino_model.py

This file was deleted.

2 changes: 1 addition & 1 deletion src/otx/core/model/action_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,4 +355,4 @@ def transform_fn(self, data_batch: ActionClsBatchDataEntity) -> np.array:
@property
def model_adapter_parameters(self) -> dict:
"""Model parameters for export."""
return {"input_layouts": "?NCTHW"}
return {"input_layouts": "NSCTHW"}
1 change: 1 addition & 0 deletions tests/unit/core/utils/test_tile.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def test_tile_transform_consistency(mocker):
mocker.patch.multiple(Tiler, __abstractmethods__=set())

tiler = Tiler(model=mock_model)
tiler.tile_with_full_img = True
tiler.tile_size = rnd_tile_size
tiler.tiles_overlap = rnd_tile_overlap

Expand Down

0 comments on commit 3a44e46

Please sign in to comment.