From 78b7eaecf0d282f2297e40d56de77e72512cf391 Mon Sep 17 00:00:00 2001 From: martvanrijthoven Date: Thu, 25 Jul 2024 21:56:05 +0200 Subject: [PATCH] add keypoint when building annotation data --- darwin/exporter/formats/darwin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/darwin/exporter/formats/darwin.py b/darwin/exporter/formats/darwin.py index becf4a179..14ef2f5f8 100644 --- a/darwin/exporter/formats/darwin.py +++ b/darwin/exporter/formats/darwin.py @@ -60,6 +60,8 @@ def _build_v2_annotation_data(annotation: dt.Annotation) -> Dict[str, Any]: polygon_data = _build_polygon_data(annotation.data) annotation_data["polygon"] = polygon_data annotation_data["bounding_box"] = _build_bounding_box_data(annotation.data) + elif annotation.annotation_class.annotation_type == "keypoint": + annotation_data["keypoint"] = annotation.data return annotation_data