All models

timesformer (base video classification)

A video transformer that applies self-attention over space and time to frame-level patches.

Video · 860 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (24 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Task
Video
Parameters
121.3M
Operations
860
Framework
PyTorch
Recurrent
No
Name in source
timesformer:base-video-classification
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m10541
Graph hash
93f1818821d105aa9c7222f524e53e5ccacfda675c804f1d8f57af12f1b47ea5
Skeleton hash
162e3afbf1e0e5ebba40787223a48c61743b4ca0a7288f054ea1a277912e93a2
Architecture hash
d4626eeef97acc50ca5e45d7343c3361a856007dc774446dc858a41a701a3895
Diagram SHA-256
d18dc293a2562818dffe56c17d7a87d4d312adc880bf1d50a799a790b7148beb
TorchLens version
2.35.3
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

How this diagram was made

transformers.AutoModel.from_config()

What it is

TimeSformer is a transformer for video: the paper presents it as a convolution-free approach to video classification, built exclusively on self-attention over space and time. It adapts the standard Transformer architecture to video by learning spatiotemporal features directly from a sequence of frame-level patches. The paper compares several self-attention schemes and finds that "divided attention", where temporal attention and spatial attention are applied separately within each block, gives the best video classification accuracy among the design choices it considered.

The paper reports the best accuracy published at that time on Kinetics-400 and Kinetics-600. It also says that, compared to 3D convolutional networks, the model is faster to train and can be applied to video clips over one minute long. The model was proposed by Facebook Research, and the number of input frames per clip changes with the model size.

Key idea. TimeSformer adapts the standard Transformer to video using only self-attention over space and time, with temporal and spatial attention applied separately within each block.

  • timesformer
  • video transformer
  • video classification
  • action recognition
  • space-time attention
  • divided attention
  • video understanding
  • kinetics

AI-written summary, based on the model's documentation and checked automatically against it; not reviewed by a person. Corrections welcome.