Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed bugs on handling timeframe #12

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ def run_on_video(self, mmif: Mmif, videodocument: Document, new_view: View, **co
+ mmif, annotated with boundingboxes
"""
cap = vdh.capture(videodocument)
views_with_tframe = [v for v in mmif.get_views_for_document(videodocument.id)
if v.metadata.contains[AnnotationTypes.TimeFrame]]
views_with_tframe = mmif.get_views_contain(AnnotationTypes.TimeFrame)
if views_with_tframe:
frame_type = set(config["frameType"])
frame_type.discard("") # after this, if this set is empty, the next step will use "all" types
Expand Down
1 change: 0 additions & 1 deletion metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def appmetadata() -> AppMetadata:
metadata.add_parameter(
name="frameType",
type="string",
choices=["", "slate", "chyron", "rolling-credit"],
default="",
multivalued=True,
description="Segments of video to run on. Only works with VideoDocument input and TimeFrame input. Empty value means run on the every frame types.",
Expand Down
Loading