Overview of @fiftyone/video-annotation
developThe @fiftyone/video-annotation package provides a specialized UI surface for annotating video content one frame at a time. It allows users to draw bounding boxes, mark keyframes, and use propagation tools (like SAM2) to fill in gaps between keyframes.
Key architectural concepts:
- Surface vs. Engine: This package is a video-specific UI surface. It manages gestures, media tiles, streams, and the timeline. The actual label state (identity, transactions, undo, selection, and persistence) is managed by the underlying
@fiftyone/annotationengine. - Renderer Abstraction: The renderer (using
@fiftyone/lighter) does not interact with the video directly. Instead, it uses anExternalCanonicalMediaoverlay to determine frame position and size, while the actual video pixels are rendered by a standard<video>element or a<canvas>sitting behind the overlay layer. - Temporal Truth: Tracks are reconstructed entities. On disk, data exists as individual detections on specific frames tagged with an
instanceId. A 'track' is a reconstructed view of these detections grouped by ID across a clip.