Skip to content

Commit 40b82f6

Browse files
authored
Fix KP task to work in Geti scenario (#4189)
* fix KP task to work in Geti * minor
1 parent 0c624a4 commit 40b82f6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/otx/core/data/dataset/keypoint_detection.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,12 @@ def _get_single_bbox_dataset(self, dm_subset: DatasetSubset) -> Dataset:
8181
if isinstance(ann, Points) and max(ann.points) <= 0:
8282
continue
8383
available_types.append(ann.type)
84-
if available_types != [AnnotationType.points, AnnotationType.bbox]:
84+
if AnnotationType.points not in available_types:
8585
continue
8686
dm_items.append(item.wrap(id=item.id + "_" + str(ann_id), annotations=anns))
87+
if len(dm_items) == 0:
88+
msg = "No keypoints found in the dataset. Please, check dataset annotations."
89+
raise ValueError(msg)
8790
return Dataset.from_iterable(dm_items, categories=self.dm_subset.categories())
8891

8992
def _get_item_impl(self, index: int) -> KeypointDetDataEntity | None:

src/otx/tools/converter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@
199199
# KEYPOINT_DETECTION
200200
"Keypoint_Detection_RTMPose_Tiny": {
201201
"task": OTXTaskType.KEYPOINT_DETECTION,
202-
"model_name": "rtmpose_tiny",
202+
"model_name": "rtmpose_tiny_single_obj",
203203
},
204204
}
205205

0 commit comments

Comments
 (0)