Video understanding, tracking, generation, and world models · Action recognition · VID003 · Architecture
Inflated 3D ConvNet (I3D)
Expands image convolutional filters into time so image pretraining can initialize a video model. The original study combines inflated RGB and optical-flow networks, making I3D important both as an action classifier and…
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
Expands image convolutional filters into time so image pretraining can initialize a video model. The original study combines inflated RGB and optical-flow networks, making I3D important both as an action classifier and as a feature extractor used by later video evaluations.
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
Image-initialized inflated 3D backbone, optionally replicated for RGB and optical flow.
Assumptions
Inputs must satisfy the temporal, modality and annotation protocol described below. Image initialization does not guarantee motion understanding. A pretrained feature distribution can favor the source domain and the particular clip sampling used during evaluation.
Formula / computational definition
An illustrative inflation is for temporal slices, preserving the response to a repeated static image. Train the video classifier with .
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: Temporal kernel sizes, clip duration, sampling interval, initialization, modality and test-time clip count matter.
Fitting, fine-tuning, and adaptation
Preserve image-pretrained spatial information initially; adapt late inflated blocks before earlier layers. Match temporal kernels and input normalization when loading 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 RGB, flow and fused variants; record video accuracy and computational cost. For feature-based metrics, freeze and identify the exact checkpoint.
Example application
Transfer a large action-pretrained encoder to a small laboratory-action dataset.
Interpretation / pitfalls
Watch out
An optimized training objective or a favorable example does not establish generalization. Compare RGB, flow and fused variants; record video accuracy and computational cost. For feature-based metrics, freeze and identify the exact checkpoint. The example below isolates one mechanism and cannot substantiate a full-model benchmark claim.
Python and R code examples
Component: Inflate a spatial filter and preserve static-image response. 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 an I3D implementation with documented preprocessing and checkpoint provenance; verify channel order and frame scale. R: Bridge the encoder through reticulate and perform aggregation, uncertainty summaries and feature analysis in R.
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 — Inflate a spatial filter and preserve static-image response.
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()
image = np.array([[1.,2.],[3.,4.]])
w2 = np.array([[1.,0.],[0.,-1.]])
w3 = np.repeat(w2[None,:,:], 3, axis=0)/3
clip = np.repeat(image[None,:,:],3,axis=0)
print(np.sum(image*w2), np.sum(clip*w3))
assert np.isclose(np.sum(image*w2),np.sum(clip*w3))
Component demo, not a trained model — Inflate a spatial filter and preserve static-image response.
Shared setup for this chapter
softmax <- function(x) {
e <- exp(x - max(x))
e / sum(e)
}
image <- matrix(1:4,2,byrow=TRUE)
w2 <- matrix(c(1,0,0,-1),2,byrow=TRUE)
spatial <- sum(image*w2)
inflated <- sum(vapply(1:3,function(t)sum(image*w2/3),0.0))
print(c(spatial=spatial,inflated=inflated))
stopifnot(isTRUE(all.equal(spatial,inflated)))
Sources
- Source 1arxiv.org
From the CodeSplash reference, entry VID003.