Skip to content

Commit

Permalink
Fix KP task to work in Geti scenario (#4189)
Browse files Browse the repository at this point in the history
* fix KP task to work in Geti

* minor
  • Loading branch information
kprokofi authored Jan 28, 2025
1 parent 0c624a4 commit 40b82f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/otx/core/data/dataset/keypoint_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,12 @@ def _get_single_bbox_dataset(self, dm_subset: DatasetSubset) -> Dataset:
if isinstance(ann, Points) and max(ann.points) <= 0:
continue
available_types.append(ann.type)
if available_types != [AnnotationType.points, AnnotationType.bbox]:
if AnnotationType.points not in available_types:
continue
dm_items.append(item.wrap(id=item.id + "_" + str(ann_id), annotations=anns))
if len(dm_items) == 0:
msg = "No keypoints found in the dataset. Please, check dataset annotations."
raise ValueError(msg)
return Dataset.from_iterable(dm_items, categories=self.dm_subset.categories())

def _get_item_impl(self, index: int) -> KeypointDetDataEntity | None:
Expand Down
2 changes: 1 addition & 1 deletion src/otx/tools/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
# KEYPOINT_DETECTION
"Keypoint_Detection_RTMPose_Tiny": {
"task": OTXTaskType.KEYPOINT_DETECTION,
"model_name": "rtmpose_tiny",
"model_name": "rtmpose_tiny_single_obj",
},
}

Expand Down

0 comments on commit 40b82f6

Please sign in to comment.