EgoViT: Pyramid Video Transformer for Egocentric Action Recognition

Chenbin Pan, Zhiqi Zhang, Senem Velipasalar, Yi XuarXiv 2023

Abstract

Capturing interaction of hands with objects is important to autonomously detect human actions from egocentric videos. In this work, we present a pyramid video transformer with a dynamic class token generator for egocentric action recognition. Different from previous video transformers, which use the same static embedding as the class token for diverse inputs, we propose a dynamic class token generator that produces a class token for each input video by analyzing the hand-object interaction and the related motion information. The dynamic class token can diffuse such information to the entire model by communicating with other informative tokens in the subsequent transformer layers. In addition, we propose a pyramid architecture to hierarchically process the video from short-term high rate to long-term low rate, significantly reducing computational cost and memory requirements. We perform comparisons on the EPIC-KITCHENS-100 and EGTEA Gaze+ datasets, showing that the proposed model efficiently improves performance for egocentric action recognition.

Introduction

Egocentric Action Recognition (EAR) presents unique challenges compared to third-person video analysis. Wearable cameras are subject to extreme motion, causing constant background shifts. Furthermore, while egocentric video contains significant temporal redundancy, the critical "action" is often localized to specific hand-object interactions. Standard video transformers, such as TimeSformer or Swin, typically utilize a static class token—a fixed vector initialized identically for every input. This approach limits the model's ability to distinguish between diverse actions. EgoViT addresses these limitations through a specialized architecture that is "egocentric-aware."

Methodology

EgoViT introduces two primary innovations: the Dynamic Class Token Generator (DCTG) and a Pyramid Architecture with Dynamic Merging (PADM).

Dynamic Class Token Generator (DCTG)

Instead of a static vector, EgoViT employs a pre-trained Hand-Object Detector (HOD) to extract features from hands and manipulated objects. These features are processed via an LSTM to generate a video-specific class token. This dynamic token "seeds" the transformer with high-level interaction data, guiding the self-attention mechanism to prioritize relevant spatial regions from the initial layers. This process increases the dissimilarity between different action classes in the feature space, facilitating more accurate classification.

Pyramid Architecture with Dynamic Merging (PADM)

To handle temporal redundancy and computational complexity, EgoViT processes video hierarchically:

  1. Short-term Stage: Analyzes video at a high frame rate to capture fine-grained local motion.
  2. Dynamic Merging: Instead of simple averaging, this module calculates attention scores for different action "phases" (e.g., approach, hold, turn).
  3. Long-term Stage: Aggregates these weighted phases to establish global context.
Figure 3: The EgoViT architecture, illustrating the hierarchical pyramid stages and the flow of tokens from short-term to long-term processing.

Experiments and Results

The model was evaluated on the EPIC-KITCHENS-100 and EGTEA Gaze+ datasets. Quantitative results demonstrate that EgoViT achieves superior performance with reduced computational overhead.

Performance and Efficiency

On the EPIC-KITCHENS-100 dataset, the integration of DCTG and PADM into the TimeSformer baseline resulted in a significant accuracy boost. Specifically, the "Ours-TimeSformer" variant improved action recognition accuracy by 2.65% over the baseline. Notably, this performance gain was achieved with a 45% reduction in computational cost, requiring only 885 GFLOPs compared to the baseline's 1581 GFLOPs.

Figure 6: Quantitative comparison of EgoViT components (DCTG and PADM) against the TimeSformer baseline, showing improvements in Mean Verb (MV), Verb (V), Mean Noun (MN), and Noun (N) accuracy.

Conclusion

EgoViT demonstrates that tailoring transformer architectures to the specific characteristics of egocentric video—namely hand-object interactions and temporal redundancy—yields substantial improvements in both accuracy and efficiency. By replacing static components with dynamic, data-driven modules like the DCTG and PADM, EgoViT sets a new standard for efficient egocentric action recognition. Future work may involve incorporating additional modalities, such as audio or optical flow, to further refine the dynamic class token.

Summary updated

BibTeX
@misc{pan2023egovit,
  author = {Chenbin Pan and Zhiqi Zhang and Senem Velipasalar and Yi Xu},
  title = {{EgoViT: Pyramid Video Transformer for Egocentric Action Recognition}},
  year = {2023},
  eprint = {2303.08920},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2303.08920},
}
Figure