From d88959f83ab1b12c6f970ceb724548a808ffb818 Mon Sep 17 00:00:00 2001 From: snewman-aa Date: Thu, 25 Jan 2024 13:38:21 -0500 Subject: [PATCH] Clarified IO in metadata --- app.py | 6 ------ metadata.py | 1 + 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/app.py b/app.py index 4a8ec41..3949fff 100644 --- a/app.py +++ b/app.py @@ -33,10 +33,6 @@ def _annotate(self, mmif: Union[str, dict, Mmif], **parameters) -> Mmif: config = self.get_configuration(**parameters) new_view: View = mmif.new_view() self.sign_view(new_view, parameters) - new_view.new_contain( - AnnotationTypes.Relation, - document=video_doc.id, - ) for timeframe in input_view.get_annotations(AnnotationTypes.TimeFrame): self.logger.debug(timeframe.properties) @@ -71,8 +67,6 @@ def _annotate(self, mmif: Union[str, dict, Mmif], **parameters) -> Mmif: timepoint.add_property("timePoint", timeframe.properties["start"]) bbox_annotation.add_property("coordinates", coord) bbox_annotation.add_property("boxType", "text") - # For now, we're gonna use the start time of the timeframe as the timePoint because vdh extract - # midframe doesn't return the frame number text_align = new_view.new_annotation(AnnotationTypes.Alignment) text_align.add_property("source", bbox_annotation.id) text_align.add_property("target", text_document.id) diff --git a/metadata.py b/metadata.py index 8d7d421..f1f7337 100644 --- a/metadata.py +++ b/metadata.py @@ -32,6 +32,7 @@ def appmetadata() -> AppMetadata: analyzer_license="Apache 2.0", ) metadata.add_input(DocumentTypes.VideoDocument) + metadata.add_input(AnnotationTypes.TimeFrame) metadata.add_output(DocumentTypes.TextDocument) metadata.add_output(AnnotationTypes.Alignment) metadata.add_output(AnnotationTypes.BoundingBox)