Skip to content

Commit 0a94582

Browse files
authored
ITEP-70797 Fix failing KP bdd test (#534)
1 parent 044c86f commit 0a94582

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

interactive_ai/tests/e2e/features/steps/annotation_management.py

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -204,18 +204,17 @@ def _annotate_image_or_frame( # noqa: C901, PLR0912, PLR0915
204204
)
205205
)
206206
case ProjectType.KEYPOINT_DETECTION:
207-
raise NotImplementedError("Keypoint annotations are not yet supported")
208-
# for label_name in labels:
209-
# x, y = _generate_random_keypoint_coords(media_width=media_width, media_height=media_height)
210-
# annotations.append(
211-
# create_annotations_inner(
212-
# id=str(uuid4()),
213-
# shape=CreateImageAnnotationRequestAnnotationsInnerShape(
214-
# Keypoint(type="KEYPOINT", x=x, y=y, is_visible=random.choice([True, False]))
215-
# ),
216-
# labels=[label_req_obj_by_name[label_name]],
217-
# )
218-
# )
207+
for label_name in labels:
208+
x, y = _generate_random_keypoint_coords(media_width=media_width, media_height=media_height)
209+
annotations.append(
210+
create_annotations_inner(
211+
id=str(uuid4()),
212+
shape=CreateImageAnnotationRequestAnnotationsInnerShape(
213+
Keypoint(type="KEYPOINT", x=x, y=y, is_visible=random.choice([True, False]))
214+
),
215+
labels=[label_req_obj_by_name[label_name]],
216+
)
217+
)
219218
case ProjectType.TASK_CHAIN_DETECTION_CLASSIFICATION:
220219
x, y, w, h = _generate_random_bbox_coords(
221220
media_width=media_width,

0 commit comments

Comments
 (0)