Skip to content

Commit 3c949c5

Browse files
authored
Update keypoint detection export with explain (#4192)
* Revert "Fix KP Export (single obj case) (#4191)" This reverts commit 35fdb7f. * Update aouto configuration to support kp format * Relax KP explain export checks
1 parent 35fdb7f commit 3c949c5

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

src/otx/algo/keypoint_detection/rtmpose.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
from __future__ import annotations
77

8+
import logging
89
from typing import TYPE_CHECKING
910

1011
from otx.algo.common.backbones import CSPNeXt
@@ -25,6 +26,9 @@
2526
from otx.core.types.label import LabelInfoTypes
2627

2728

29+
logger = logging.getLogger()
30+
31+
2832
class RTMPose(OTXKeypointDetectionModel):
2933
"""OTX keypoint detection model class for RTMPose."""
3034

@@ -37,7 +41,7 @@ def _exporter(self) -> OTXModelExporter:
3741

3842
if self.explain_mode:
3943
msg = "Export with explain is not supported for RTMPose model."
40-
raise ValueError(msg)
44+
logger.warning(msg)
4145

4246
return OTXNativeModelExporter(
4347
task_level_export_parameters=self._export_parameters,

src/otx/engine/utils/auto_configurator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
TASK_PER_DATA_FORMAT = {
5656
"imagenet_with_subset_dirs": [OTXTaskType.MULTI_CLASS_CLS, OTXTaskType.H_LABEL_CLS],
5757
"datumaro": [OTXTaskType.MULTI_LABEL_CLS],
58+
"coco_person_keypoints": [OTXTaskType.KEYPOINT_DETECTION],
5859
"coco_instances": [
5960
OTXTaskType.DETECTION,
6061
OTXTaskType.ROTATED_DETECTION,

src/otx/recipe/keypoint_detection/openvino_model.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ overrides:
2626
batch_size: 1
2727
num_workers: 2
2828
transforms:
29+
- class_path: otx.core.data.transform_libs.torchvision.GetBBoxCenterScale
2930
- class_path: otx.core.data.transform_libs.torchvision.TopdownAffine
3031
init_args:
3132
input_size: $(input_size)
@@ -34,6 +35,7 @@ overrides:
3435
batch_size: 1
3536
num_workers: 2
3637
transforms:
38+
- class_path: otx.core.data.transform_libs.torchvision.GetBBoxCenterScale
3739
- class_path: otx.core.data.transform_libs.torchvision.TopdownAffine
3840
init_args:
3941
input_size: $(input_size)
@@ -42,6 +44,7 @@ overrides:
4244
batch_size: 64
4345
num_workers: 2
4446
transforms:
47+
- class_path: otx.core.data.transform_libs.torchvision.GetBBoxCenterScale
4548
- class_path: otx.core.data.transform_libs.torchvision.TopdownAffine
4649
init_args:
4750
input_size: $(input_size)

0 commit comments

Comments
 (0)