Video understanding, tracking, generation, and world models · Motion and tracking · VID033 · Model
CoTracker
Tracks many points jointly so the motion of related points can help resolve ambiguity. Attention between trajectories captures shared motion and context, useful for dense or semi-dense tracking in scenes with occlusion.
In CodeSplash
Documented in the Academy only. There's no Set up button.
- Availability
- Explained here
- Code example
- Component demo, not a trained model
- Who ran it
- CodeSplash's run and the reference's record
- CodeSplash's run
- The reference's example ran in Python and R here, and they agree.
- The reference's record
- Python: Ran in the reference's review. The report doesn't record which version of the code ran. R: Reviewed but not run: R wasn't available to the reference's authors.
Purpose
Tracks many points jointly so the motion of related points can help resolve ambiguity. Attention between trajectories captures shared motion and context, useful for dense or semi-dense tracking in scenes with occlusion.
Question / objective
Estimate image displacement or maintain the location and identity of objects/points over time. This is a learning or inference objective, not a test of a statistical null hypothesis.
Method type and supervision
model · Motion and tracking. Mixed: supervised neural perception or non-neural inference over detections; see the individual assumptions.
Architecture / computational structure
Joint point-feature processing and iterative transformer-based trajectory refinement.
Assumptions
Inputs must satisfy the temporal, modality and annotation protocol described below. Joint dependence can propagate a mistaken correspondence. Dense tracking is not equivalent to segmentation or verified physical attachment, especially through cuts and long occlusions.
Formula / computational definition
is a schematic joint trajectory update, where stores point coordinates and visibility features. Supervision compares trajectories and visibility to labels.
Parameters and notation
Learned/estimated quantities: Neural feature/refinement weights are learned when the method contains a network; coordinates, flow fields and track states are inferred outputs, not fixed network parameters. Symbols specific to the objective are defined with the equation. Hyperparameters and design choices: Number and distribution of query points, support points, temporal windows, update iterations and online/offline mode matter.
Fitting, fine-tuning, and adaptation
Adapt trajectory/refinement modules using point-track supervision; preserve query distributions. Attention adapters may be possible but require testing against full model tuning and occlusion performance. Use a separate adaptation validation split, monitor the target metric and retention of previously useful behavior, and save the exact preprocessing and training configuration.
How to use and calibrate
Fix the input protocol and target before fitting; choose design settings on held-out source videos, then freeze the evaluation procedure. Report point accuracy, occlusion metrics, query density, runtime and causal versus offline settings.
Example application
Track a deforming surface with many related query points.
Interpretation / pitfalls
Watch out
An optimized training objective or a favorable example does not establish generalization. Report point accuracy, occlusion metrics, query density, runtime and causal versus offline settings. The example below isolates one mechanism and cannot substantiate a full-model benchmark claim.
Python and R code examples
Component: Exchange motion information between point trajectories. Dependencies: NumPy in Python; base R in R; run the shared setup above. Python component: executed successfully. R component: unexecuted. No complete model training or pretrained inference was executed.
Full implementation route — Python: Use the official CoTracker pipeline and specify whether outputs incorporate future frames. R: Bridge inference, preserve point IDs, and analyze pairwise motion or trajectory stability in R; a custom port must reproduce window handling.
Python and R
The reference's own programs, shown as written. A component demo shows one central piece of the method; it doesn't train a full model.
Component demo, not a trained model — Exchange motion information between point trajectories.
Shared setup for this chapter
import numpy as np
def softmax(x):
z = np.asarray(x, dtype=float)
e = np.exp(z - z.max())
return e / e.sum()
motion = np.array([[1.,0.],[1.2,.1],[-.5,0.]])
affinity = np.array([[2.,2.,0.],[2.,2.,0.],[0.,0.,2.]])
weights = np.vstack([softmax(r) for r in affinity])
print("joint motion summary",weights@motion)
# Toy attention illustrates joint tracking, not CoTracker inference.
Component demo, not a trained model — Exchange motion information between point trajectories.
Shared setup for this chapter
softmax <- function(x) {
e <- exp(x - max(x))
e / sum(e)
}
motion <- rbind(c(1,0),c(1.2,.1),c(-.5,0))
affinity <- rbind(c(2,2,0),c(2,2,0),c(0,0,2))
weights <- t(apply(affinity,1,softmax))
print(weights%*%motion) # toy joint-motion attention
Sources
- Source 1arxiv.org
From the CodeSplash reference, entry VID033.