From eb54d4233f1074c87dcb995d3b4b3621304e31f1 Mon Sep 17 00:00:00 2001 From: ljcornel Date: Wed, 17 Apr 2024 13:08:33 +0200 Subject: [PATCH] Update `Video` data model with annotation statistics --- geti_sdk/data_models/media.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/geti_sdk/data_models/media.py b/geti_sdk/data_models/media.py index 649386a0..a189fab1 100644 --- a/geti_sdk/data_models/media.py +++ b/geti_sdk/data_models/media.py @@ -273,6 +273,22 @@ def numpy(self) -> Optional[np.ndarray]: return self._data +@attr.define(slots=False) +class VideoAnnotationStatistics: + """ + Annotation statistics for a video in Intel® Geti™. + + :var annotated: Number of frames in the video that have been fully annotated + :var partially_annotated: Number of frames in the video that have been partially + annotated, meaning that one task in the task chain is still missing annotations + :var unannotated: Number of frames in the video that have not yet been annotated + """ + + annotated: int + partially_annotated: int + unannotated: int + + @attr.define(slots=False) class Video(MediaItem): """ @@ -284,6 +300,9 @@ class Video(MediaItem): media_information: VideoInformation = attr.field(kw_only=True) matched_frames: Optional[int] = attr.field(kw_only=True, default=None, repr=False) + annotation_statistics: Optional[VideoAnnotationStatistics] = attr.field( + kw_only=True, default=None, repr=False + ) def __attrs_post_init__(self): """