If you run a state-of-the-art object detector on every frame of a video, the result is often a flickering mess. A person might be detected with 99% confidence in frame 10, vanish in frame 11 due to motion blur, and reappear in frame 12. This "temporal jitter" happens because standard detectors treat frames as isolated images, ignoring the physical reality that objects move along continuous paths.
To solve this, researchers have converged on a powerful idea: instead of making independent decisions per frame, we should model the entire video as a graph and find the most "logical" path through it. This approach, often referred to as creating Action Tubes or Spatio-Temporal Tubes, transforms video analysis from a series of 2D detections into a global 3D optimization problem.
The Trellis: Modeling Video as a Graph
The first step in this direction is to stop viewing a video as a stack of images and start viewing it as a trellis graph. In this framework, every candidate detection in every frame (a bounding box, a segmentation mask, or a human pose) becomes a node in a graph.
As Du Tran and Junsong Yuan describe in Max-Margin Structured Output Regression for Spatio-Temporal Action Localization, we can assign two types of scores to this graph:
- Unary Scores: How confident is the detector that this specific box contains the object?
- Binary (Link) Scores: How likely is it that the object moved from box A in frame $t$ to box B in frame $t+1$? This is usually based on spatial overlap (IoU) or appearance similarity.
By connecting detections across frames with these link scores, we create a Directed Acyclic Graph (DAG). The "true" trajectory of the object is simply the path through this graph that maximizes the total score.
Finding the Optimal Path with Viterbi
The search space for these paths is enormous—exponentially large if you consider every possible combination of boxes across hundreds of frames. However, because the movement of an object is typically "Markovian" (the best position in frame $t+1$ depends mostly on where it was in frame $t$), we can use Dynamic Programming.
The Viterbi algorithm is the recurring workhorse here. Georgia Gkioxari and Jitendra Malik popularized this in Finding action tubes to localize human actions. By using Viterbi, the system can "bridge" frames where the detector failed. If a high-confidence detection in frame 10 and frame 12 can be linked by a plausible (though lower-confidence) detection in frame 11, the algorithm will select that path, effectively smoothing over the detector's momentary failure.
This isn't just for action detection. Wei Han and colleagues introduced Seq-NMS in Seq-NMS for Video Object Detection, which uses this same dynamic programming intuition as a post-processing step. It boosts the scores of weak detections if they are part of a high-confidence temporal sequence, significantly outperforming standard Non-Maximum Suppression.
Beyond Bounding Boxes: Poses and 3D
The intuition of path optimization scales beyond simple 2D boxes. When tracking human movement, the "nodes" in our graph can be entire skeletal poses. In Pose Flow: Efficient Online Pose Tracking, Yuliang Xiu and Cewu Lu use an online optimization strategy to link poses into "flows," ensuring that a person's left arm doesn't suddenly become their right arm in the next frame.
Even in the cutting edge of 3D reconstruction, this principle holds. Jane Y. Wu and Georgia Gkioxari demonstrate in Reconstructing Hand-Held Objects in 3D that the Viterbi algorithm can be applied to a sequence of 3D rotations and translations. By finding the most likely path of an object's orientation over time, they reduce the "jitter" that plagues model-free 3D reconstruction from video.
Why It Works: Global Context vs. Local Noise
The core reason this idea works is that it enforces physical priors on top of statistical detections.
- Temporal Continuity: Objects don't teleport; they move in smooth trajectories.
- Identity Persistence: An object's appearance shouldn't change radically between two frames (1/30th of a second).
By framing video understanding as a path-finding problem, researchers like Fabio Galasso (Spatio-temporal clustering of probabilistic region trajectories) and Pablo Sala (Model-based perceptual grouping and shape abstraction) have shown that we can extract signal from noise. A single frame might be ambiguous, but a sequence of 100 frames rarely is. The "tube" is the mechanism that allows the model to look at the whole story before deciding what happened in a single moment.