Two-Stream Region Convolutional 3D Network for Temporal Activity Detection

Huijuan Xu, Abir Das, Kate Saenko

TL;DR

The Region Convolutional 3D Network (R-C3D) is an end-to-end model that detects activities in untrimmed videos by identifying their precise start and end times. By extending the "Faster R-CNN" object detection paradigm into the temporal 3D domain and incorporating a two-stream (RGB and Optical Flow) architecture with Online Hard Example Mining, it achieves state-of-the-art accuracy while running at an impressive 1000+ FPS.

What Problem Does This Paper Address?

Most video recognition models are designed for "trimmed" clips—short videos containing a single, centered action. However, real-world video (like surveillance or sports broadcasts) is "untrimmed," meaning it is long, contains multiple activities of varying lengths, and is filled with "background" (irrelevant) footage.

The challenge is temporal activity detection: not just saying what is happening, but when it starts and ends. Previous approaches often relied on "sliding windows" (exhaustively checking every possible time interval) or disjointed pipelines that didn't learn features specifically for localization. These methods were either computationally expensive, inflexible with activity boundaries, or both.

Methods

The authors introduce R-C3D, which treats temporal detection as a 1D version of object detection. The architecture consists of three main components:

  1. 3D ConvNet Feature Extractor: The model uses a 3D fully convolutional network (based on the C3D architecture) to extract spatio-temporal features from a buffer of video frames. Unlike standard C3D, which uses short 16-frame chunks, R-C3D processes as many frames as GPU memory allows to capture longer-range context.
  2. Temporal Proposal Subnet: This layer predicts candidate "segments" (start/end times) that likely contain an activity. It uses "anchor segments"—pre-defined windows of various scales—and predicts offsets to refine them.
  3. Activity Classification Subnet: For each candidate segment, the model performs 3D Region of Interest (RoI) Pooling. This is a key innovation: it takes variable-length temporal segments and "warps" their features into a fixed-size representation, allowing a final classifier to determine the specific activity type (or label it as background).

The "Two-Stream" Boost: To better capture motion, the authors add a second stream that processes Optical Flow (the pattern of apparent motion between frames). The RGB and Flow streams are fused to provide a richer representation of the scene.

Online Hard Example Mining (OHEM): Detection pipelines often struggle with "class imbalance"—there are thousands of background segments for every one actual activity. OHEM automatically identifies the "hardest" examples (the ones the model is most confused by) during training and focuses the learning process on them, rather than wasting time on easy background samples.

Datasets

The model was evaluated on three major benchmarks:

  • THUMOS’14: 20 sports-related activity classes in untrimmed videos.
  • ActivityNet (v1.3): A large-scale dataset with 200 activity classes and diverse, long-duration videos.
  • Charades: A challenging dataset of daily home activities, often featuring overlapping actions and poor lighting.

Key Insights and Ideas

  • 3D RoI Pooling is the Bridge: Just as 2D RoI pooling allowed Faster R-CNN to handle objects of different sizes, 3D RoI pooling allows R-C3D to handle activities that last 1 second or 1 minute using the same shared feature map.
  • End-to-End is Better: By training the proposal and classification stages together, the model learns features that are specifically optimized for finding boundaries, not just recognizing actions.
  • Efficiency via Sharing: Because the proposal and classification subnets share the same underlying 3D convolutional features, the marginal cost of classifying a proposal is very low. This is why the model is so fast.
  • OHEM vs. Heuristics: Instead of manually tuning the ratio of positive to negative samples (a common headache in detection), OHEM lets the loss function guide the sampling, making training more robust.

Key Results

  • Speed: On a Titan X Pascal GPU, the single-stream R-C3D reaches 1030 FPS, making it significantly faster than real-time and orders of magnitude faster than previous sliding-window methods.
  • Accuracy: On THUMOS’14, the two-stream model + OHEM achieved a mean Average Precision (mAP) of 36.1% at a 0.5 IoU threshold, a significant jump over previous state-of-the-art results (which were often in the 15-20% range just a few years prior).
  • Generalization: The model performed competitively on ActivityNet and set a new state-of-the-art on Charades, proving it works across different domains (sports vs. home life).

Limitations and Future Work

  • Short Activities: The authors noted that the model still struggles with very short activities (less than 13 seconds) on ActivityNet. This is likely because the 3D ConvNet downsamples the video temporally, losing fine-grained detail for brief actions.
  • Flow Bottleneck: While the two-stream model is more accurate, calculating Optical Flow is computationally expensive. The authors noted that flow extraction is currently the bottleneck for the overall system speed.
  • Future Directions: The authors suggest applying the R-C3D framework to other tasks like dense video captioning (generating sentences for every segment of a video) or more precise moment localization.

Summary updated

BibTeX
@article{xu2019two,
  author = {Huijuan Xu and Abir Das and Kate Saenko},
  title = {{Two-Stream Region Convolutional 3D Network for Temporal Activity Detection}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2019},
  url = {https://openreview.net/forum?id=qsJEip43Gjd},
}

Loading related content...

Figure