Video understanding, tracking, generation, and world models · Action recognition · VID002 · Architecture
C3D
Learns short-range appearance and motion jointly through three-dimensional convolutions over video clips. C3D is a compact conceptual starting point for understanding spatiotemporal receptive fields and extracting…
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 here in one language.
- 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
Learns short-range appearance and motion jointly through three-dimensional convolutions over video clips. C3D is a compact conceptual starting point for understanding spatiotemporal receptive fields and extracting fixed-length clip descriptors for a downstream classifier or retrieval system.
Question / objective
Estimate an action label from a clip or video and determine which temporal evidence improves prediction. This is a learning or inference objective, not a test of a statistical null hypothesis.
Method type and supervision
architecture · Action recognition. Usually supervised video-label learning; image/video pretraining may use other supervision.
Architecture / computational structure
Repeated 3D convolution, nonlinear activation and pooling, followed by a clip descriptor/head.
Assumptions
Inputs must satisfy the temporal, modality and annotation protocol described below. Finite clips restrict long-term reasoning. Adjacent clips are strongly dependent; randomly splitting them can leak nearly identical content across evaluation sets. Dense 3D convolution is memory intensive.
Formula / computational definition
: index time and space, channels, and is a 3D filter. Supervised training uses clip cross-entropy.
Parameters and notation
Learned/estimated quantities: Encoder filters or attention/projection weights, normalization parameters and task-head coefficients are learned; architectural dimensions and sampling rules are chosen. Symbols specific to the objective are defined with the equation. Hyperparameters and design choices: Choose clip length, temporal stride, spatial resolution, channels, pooling schedule and descriptor aggregation.
Fitting, fine-tuning, and adaptation
Fit a new head on frozen clip descriptors, then unfreeze higher 3D blocks if labeled video is sufficient. Changing temporal stride changes the learned input distribution. 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. Measure video-level accuracy after documented clip aggregation, throughput, memory and robustness to frame-rate changes.
Example application
Extract motion-aware descriptors for sports-clip retrieval.
Interpretation / pitfalls
Watch out
An optimized training objective or a favorable example does not establish generalization. Measure video-level accuracy after documented clip aggregation, throughput, memory and robustness to frame-rate changes. The example below isolates one mechanism and cannot substantiate a full-model benchmark claim.
Python and R code examples
Component: Apply one valid 3D convolution kernel to a toy video. 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: Implement Conv3d blocks and a classifier in PyTorch, or reproduce the linked paper implementation. R: An R torch port can express the convolutions; an explicit Python bridge is simpler for matching pretrained weights.
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 — Apply one valid 3D convolution kernel to a toy video.
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()
video = np.arange(27., dtype=float).reshape(3,3,3)
kernel = np.ones((2,2,2))/8
out = np.zeros((2,2,2))
for t in range(2):
for y in range(2):
for x in range(2):
out[t,y,x] = np.sum(video[t:t+2,y:y+2,x:x+2]*kernel)
print(out)
Component demo, not a trained model — Apply one valid 3D convolution kernel to a toy video.
Shared setup for this chapter
softmax <- function(x) {
e <- exp(x - max(x))
e / sum(e)
}
video <- array(0, c(3,3,3))
for(t in 1:3) for(y in 1:3) for(x in 1:3)
video[t,y,x] <- (t-1)*9+(y-1)*3+x-1
out <- array(0,c(2,2,2))
for(t in 1:2) for(y in 1:2) for(x in 1:2)
out[t,y,x] <- mean(video[t:(t+1),y:(y+1),x:(x+1)])
print(out)
Sources
- Source 1arxiv.org
From the CodeSplash reference, entry VID002.