Video understanding, tracking, generation, and world models · Motion and tracking · VID035 · Algorithm
Deep SORT
Adds learned appearance descriptors to motion-based multi-object tracking, helping preserve identities across occlusion and ambiguous geometry.
In CodeSplash
A CodeSplash method runs this entry in Python and R. Set it up from the method's page. The methods that run it are Experimental.
Do it in CodeSplash Run it on your own data. It's in the Experimental lane in the app.
- Availability
- Runs in CodeSplash (Experimental)
- Code example
- Component demo, not a trained model
- Who ran it
- CodeSplash's run and the reference's record
- CodeSplash's run
- Verified in Python and R through track.objects. 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
Adds learned appearance descriptors to motion-based multi-object tracking, helping preserve identities across occlusion and ambiguous geometry. The tracking system combines a detector, an appearance network and an association policy rather than being one end-to-end classifier.
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
algorithm · Motion and tracking. Mixed: supervised neural perception or non-neural inference over detections; see the individual assumptions.
Architecture / computational structure
Motion filter and gating plus learned appearance encoder, descriptor gallery and matching cascade.
Assumptions
Inputs must satisfy the temporal, modality and annotation protocol described below. Appearance models can fail under similar clothing, lighting changes or domain shift. A very good re-identification embedding cannot recover objects the detector consistently misses.
Formula / computational definition
measures cosine distance between detection embedding and normalized stored descriptors ; motion gating excludes implausible matches.
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: Descriptor model, feature-gallery size, cosine threshold, motion gate, track lifetime and matching cascade require tuning.
Fitting, fine-tuning, and adaptation
Fine-tune the appearance encoder on domain identities without identity leakage. Tracking gates and gallery policy are separately tuned hyperparameters; the assignment solver has no learned weights. 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. Compare identity metrics with the same detections, reporting occlusion duration and category/domain differences.
Example application
Maintain pedestrian identities through partial occlusion.
Interpretation / pitfalls
Watch out
An optimized training objective or a favorable example does not establish generalization. Compare identity metrics with the same detections, reporting occlusion duration and category/domain differences. The example below isolates one mechanism and cannot substantiate a full-model benchmark claim.
Python and R code examples
Component: Combine appearance distance with a hard motion gate. 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 authors' implementation or combine normalized appearance embeddings with gated assignment and track memory. R: Compute cosine association costs and identity summaries in R; use a Python bridge for the appearance encoder and complete tracker.
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 — Combine appearance distance with a hard motion gate.
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()
tracks = np.array([[1.,0.],[0.,1.]])
detections = np.array([[.9,.1],[.1,.9]])
detections /= np.linalg.norm(detections,axis=1,keepdims=True)
cost = 1-tracks@detections.T
motion_allowed = np.array([[True,False],[False,True]])
print(np.where(motion_allowed,cost,np.inf))
Component demo, not a trained model — Combine appearance distance with a hard motion gate.
Shared setup for this chapter
softmax <- function(x) {
e <- exp(x - max(x))
e / sum(e)
}
tracks <- diag(2); detections <- rbind(c(.9,.1),c(.1,.9))
detections <- detections/sqrt(rowSums(detections^2))
cost <- 1-tracks%*%t(detections)
allowed <- diag(TRUE,2); cost[!allowed] <- Inf
print(cost)
Sources
- Source 1arxiv.org
From the CodeSplash reference, entry VID035.