Skip to content

Commit

Permalink
Clarified IO in metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
snewman-aa committed Jan 25, 2024
1 parent 82bd6f3 commit d88959f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
6 changes: 0 additions & 6 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d88959f

Please sign in to comment.