Paper commentary
Temporal Segment Networks: Towards Good Practices for Deep Action Recognition
Sparse segment sampling lets ConvNets learn long-range structure in action videos
- Problem Two-stream ConvNets see only one frame or a short optical flow stack, so they miss long-range temporal structure. Dense sampling of long videos is too costly.
- Method Temporal Segment Network (TSN) splits each video into K equal segments and draws one snippet from each. Snippet ConvNets share weights, and a segmental consensus merges their scores for video-level training.
- Results TSN reaches 69.4% accuracy on HMDB51 and 94.2% on UCF101 with RGB, optical flow and warped optical flow inputs.
Why dense sampling struggles with long videos
A two-stream ConvNet reads one RGB frame or one short stack of optical flow fields, so its view of time is confined to that window. Frameworks built this way concentrate on appearance and short-term motion, which leaves long-range temporal structure under-modelled.
The alternatives that do model longer spans run dense sampling over long clips, and the authors regard the resulting computational cost as excessive for long videos, with a risk of losing information beyond the maximal sequence length. Those ConvNet methods process fixed windows of 64 to 120 frames, which makes it hard for them to cover an entire video.
The argument rests on the observation that consecutive frames are highly redundant, so densely sampled frames add little, while a sparse set of frames keeps the relevant information at much lower cost.
A second obstacle is data. Public action datasets such as UCF101 and HMDB51 are limited in size and diversity, and very deep ConvNets trained on them face a high risk of over-fitting.
How snippet scores become one video prediction
The video is divided into K segments of equal duration, and one snippet is drawn from each segment. A ConvNet F with parameters W scores every snippet, and the snippet ConvNets share their parameters. The whole model is written as \[ TSN(T_1,\dots,T_K)=H\big(G(F(T_1;W),\dots,F(T_K;W))\big) \] Here F returns class scores for each snippet, G is the segmental consensus that merges the snippet outputs, and H is the Softmax that turns the merged scores into class probabilities.
The consensus is taken class by class: G_i is an aggregation g of the class-i scores from all K snippets, \( G_i = g\big(F_i(T_1),\dots,F_i(T_K)\big) \), and average pooling is the aggregation used. The loss is the categorical cross-entropy on the consensus, \[ L(y,G) = -\sum_{i=1}^{C} y_i\Big(G_i - \log \sum_{j=1}^{C}\exp G_j\Big) \] where C is the number of action classes and y_i is the ground-truth label for class i.
K is set to 3 in the experiments.
The loss acts on the video-level consensus rather than on each snippet, so the gradient with respect to W collects a term from every snippet: \[ \frac{\partial L(y,G)}{\partial W} = \frac{\partial L}{\partial G}\sum_{k=1}^{K}\frac{\partial G}{\partial F(T_k)}\frac{\partial F(T_k)}{\partial W} \] Depending on the choice of g, the consensus is differentiable or has subgradients, so standard back-propagation with SGD can update W.
Fixing K for every video keeps the number of sampled frames small.
At test time each video contributes 25 RGB frames or optical flow stacks, each cropped at four corners and the center, with horizontal flips.
Training recipe for limited data
Both streams use BN-Inception, chosen for its balance of accuracy and efficiency. The spatial stream takes one RGB image, and the temporal stream takes a stack of consecutive optical flow fields.
Optical flow does not share the distribution of RGB images, so a temporal network cannot simply reuse ImageNet weights. The authors map optical flow linearly into the range 0 to 255 to match RGB. The weights of the first convolution layer of an RGB model are averaged across the RGB channels, and that average is replicated to match the number of temporal input channels.
Batch Normalization speeds up training, but its statistics are estimated from few samples and over-fit during transfer. After pre-training, the mean and variance of every BN layer except the first are frozen, and the first layer re-estimates them because optical flow has a different distribution. This is the partial BN strategy.
Scale jittering draws the crop width and height from 256, 224, 192 and 168 on a 256×340 input and resizes each crop to 224×224; the same implementation also varies the aspect ratio. The experiments combine location jittering, horizontal flipping, corner cropping and scale jittering.
Adding RGB difference and warped optical flow
A single RGB frame carries no information about neighbouring frames. Stacked RGB differences between consecutive frames show appearance change, which points to motion-salient regions.
Optical flow also picks up camera motion, which can dominate the background. Following improved dense trajectories, the authors estimate a homography and compensate for the camera motion to obtain warped optical flow. In the warped flow the background motion is suppressed and the motion stays on the actor. Optical flow and warped optical flow are computed with the TVL1 algorithm in OpenCV with CUDA.
Training strategies on UCF101 split 1
The baseline row is the original two-stream result, with 72.7% for the spatial stream, 81.0% for the temporal stream and 87.0% for the two-stream model. Training from scratch brings the spatial stream down to 48.7%, while the temporal stream reaches 81.7% and the two-stream model 82.9%. The authors read the spatial drop as a sign that a careful learning strategy is needed to limit over-fitting, especially for spatial networks.
Pre-training only the spatial stream, as in the original work, gives 84.1% spatial, 81.7% temporal and 90.0% two-stream accuracy. Adding cross modality pre-training raises the temporal stream to 86.6% and the two-stream model to 91.5%, with the spatial stream still at 84.1%.
Adding partial BN with dropout raises the spatial stream to 84.5%, the temporal stream to 87.2% and the two-stream model to 92.0%. All of these runs are on split 1 of UCF101.
Input modalities and consensus choice
RGB images alone reach 84.5% and RGB differences alone 83.8%. Combining the two gives 87.3%, which the authors take to mean the two encode complementary information.
Optical flow alone reaches 87.2% and warped flow 86.9%, and their combination 87.8%. All four modalities give 91.7%, while optical flow, warped flow and RGB together give 92.3%.
The authors conjecture that RGB differences are an unstable motion cue and act as a lower-quality, high-speed substitute for motion. The final three-modality setting uses RGB, optical flow and warped optical flow, without RGB differences.
Max pooling gives 85.0%, 86.0% and 91.6% for spatial, temporal and two-stream accuracy. Average pooling gives 85.7%, 87.9% and 93.5%, and weighted average gives 86.2%, 87.7% and 92.4%. Average pooling is the best of the three and is used as the default aggregation. This comparison uses only RGB images and optical flow, with K set to 3.
Architecture choice and the TSN gain
Under the same good practices, Clarifai reaches 72.7%, 81.0% and 87.0% (spatial, temporal, two-stream), GoogLeNet 77.1%, 83.9% and 89.0%, VGGNet-16 79.8%, 85.7% and 90.9%, and BN-Inception 84.5%, 87.2% and 92.0%. BN-Inception gives the highest two-stream accuracy of the four, which the authors connect to its performance in image classification.
Applying the TSN framework on top of BN-Inception raises the spatial stream to 85.7%, the temporal stream to 87.9% and the two-stream model to 93.5%.
The authors read the gain as showing that modelling long-term temporal structure matters, and it is measured with all the discussed good practices already applied.
Comparison with published results
The compared scores are published numbers from other work, each with its own features and training setup, so they are not a controlled comparison with this method. The list covers trajectory-based methods such as iDT and MoFAP and deep methods such as C3D, LTC and KVMF.
What the learned models respond to
The visualization uses DeepDraw, which runs gradient ascent on an input that starts from random noise, so the output reflects what the class looks like to the trained model. The tool was adapted to optical flow models.
Five classes are shown: Taichi, Punch, Diving, Long Jump and Biking. Without pre-training, the spatial and temporal models produce almost no structured pattern. With pre-training, structured patterns appear.
For Diving, the single-frame spatial stream looks mainly at water and diving platforms, and the temporal stream responds to the motion of surface water. With the temporal segment network, the spatial model centres on the human and shows several poses from different stages of the dive. The authors take this as a sign that the models may perform better.
The visualization is qualitative, and the quantitative support lies in the accuracy results.
Limitations
The training-strategy, modality and consensus ablations are all run on split 1 of UCF101, and no ablation on the other splits appears in the text. The consensus comparison also uses only RGB images and optical flow, so it does not cover warped flow or RGB differences. K is 3 in every reported experiment, and the text gives no other segment count.
Sparse sampling is said to reduce the cost of evaluating ConvNets compared with dense sampling, but no timing against dense-sampling methods is reported. Training times are given only for TSN itself, about 2 hours for spatial and 9 hours for temporal networks on UCF101 with four TITANX GPUs.
The comparison with published methods depends on the set of methods chosen, and the margins are computed against that set. The visualization covers five classes and is qualitative only.
Paper info
- Authors
- Limin Wang, Yuanjun Xiong, Zhe Wang, Yu Qiao, Dahua Lin, Xiaoou Tang, Luc Van Gool
- Venue
- arXiv · Preprint
- First published
- 2016-8-2
- Added
- 2026-11-12
- Updated
- 2016-8-2
- Version
- v1
- arXiv
- 1608.00859
- Category
- cs.CV
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Limin Wang, Yuanjun Xiong, Zhe Wang, Yu Qiao, Dahua Lin, Xiaoou Tang, Luc Van Gool (2016). Temporal Segment Networks: Towards Good Practices for Deep Action Recognition. arXiv:1608.00859v1. https://arxiv.org/abs/1608.00859v1
BibTeX
@misc{wang2016temporal,
title = {{Temporal Segment Networks: Towards Good Practices for Deep Action Recognition}},
author = {Limin Wang and Yuanjun Xiong and Zhe Wang and Yu Qiao and Dahua Lin and Xiaoou Tang and Luc Van Gool},
year = {2016},
eprint = {1608.00859},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1608.00859v1}
}