Introduction
Rekall is a library designed to bridge the gap between low-level computer vision primitives and high-level semantic video events. While modern models excel at detecting individual objects or transcribing speech, real-world analysis often requires identifying complex, domain-specific events like news interviews or specific cinematic shots. Rekall enables users to define these events programmatically by composing the outputs of existing pre-trained models.
The Data Labeling Bottleneck
Traditional video analysis workflows rely on supervised learning, which requires collecting and labeling thousands of examples for every new event type. This process is slow, expensive, and creates a significant bottleneck for analysts who need to explore data rapidly. Rekall shifts this paradigm from training to querying. Instead of teaching a model what an event looks like through sheer volume of data, an analyst writes a program that defines the event as a composition of existing detections (e.g., faces, text, or objects).
Methods: Spatiotemporal Composition
The core of Rekall is a unified data and programming model centered on spatiotemporal reasoning.
Spatiotemporal Labels
Rekall represents every annotation—whether a single-frame bounding box or a multi-second audio clip—as a "label" associated with a continuous volume of spacetime $(x, y, t)$. This allows the system to seamlessly integrate multi-modal data with varying temporal resolutions.
Compositional Primitives
Rekall provides a library of operators to manipulate and combine these labels:
- Standard Operators: Includes
map,filter, andgroup_byfor data management. - Joins: Combines streams based on spatiotemporal predicates, such as finding a person appearing "above" or "after" another object.
- Coalesce: Merges fine-grained, potentially noisy labels into higher-level continuous segments (e.g., smoothing flickering detections into a stable track).
- Minus: An anti-semi-join used to identify the absence of specific labels within a volume.
As shown in the figure above, a complex event like an "interview" can be decomposed into a series of logical steps: filtering for specific faces, coalescing them into segments, and joining those segments based on temporal overlaps or proximity.
Evaluation and Key Results
The authors evaluated Rekall across diverse domains, including cable news, Hollywood films, and autonomous vehicle logs.
- Accuracy: Rekall queries outperformed "reasonable-effort" deep learning baselines in 4 out of 5 classification tasks. On average, Rekall achieved a 6.5 point higher F1 score. In specialized tasks like "Shot Scale" detection, it outperformed the best learned approach by 26.1 points.
- Efficiency: Domain experts could author high-performing queries in hours or days, whereas traditional data collection and model training often take weeks or months.
- Weak Supervision: Rekall can also serve as a labeling function for frameworks like Snorkel. The authors demonstrated that Rekall could help train a state-of-the-art shot-boundary detector using 636x less ground-truth data.
Discussion and Limitations
While Rekall offers significant gains in efficiency, it currently relies on manual tuning of spatiotemporal thresholds (e.g., defining the exact pixel overlap for a match). Furthermore, the system's performance is inherently capped by the quality of the underlying "primitive" detectors. Future work aims to automate parameter tuning and extend the library to handle more nuanced human behaviors and fine-grained motions.
Summary updated