Efficient Pre-training for Localized Instruction Generation of Procedural Videos

Anil Batra, Davide Moltisanti, Laura Sevilla-Lara, Marcus Rohrbach, Frank Keller · DOI

Abstract

Procedural videos, such as recipe demonstrations, are essential for conveying step-by-step instructions. However, understanding these videos requires precise localization of steps and the generation of textual instructions, tasks that are typically limited by the high cost of manual annotation. While web-scale pre-training on noisy video-transcript datasets can improve performance, it is computationally expensive and suffers from a "style gap" between spoken transcripts and written instructions. We propose Sieve & Swap, a technique to curate high-quality training data by filtering irrelevant transcripts and replacing them with human-written instructions from text-only databases. We also introduce Procedure Transformer (ProcX), an end-to-end model for step localization and instruction generation. Pre-training on our curated dataset, which is 1,000x smaller than typical web-scale datasets, allows ProcX to achieve state-of-the-art performance on YouCook2 and Tasty.

Introduction

Understanding procedural videos is a complex AI challenge involving temporal localization (identifying when a step happens) and instruction generation (describing what is happening). Traditional approaches rely on massive datasets like HowTo100M, using raw Automatic Speech Recognition (ASR) transcripts. However, these transcripts are often noisy, containing irrelevant banter, and differ significantly in style from the concise, imperative language of written recipes.

Overview of the Sieve & Swap technique and its impact on instruction coherency.

Methodology

Sieve & Swap: Data Curation

To bridge the "noise gap" and "style gap," we developed Sieve & Swap. This pipeline curates a high-quality subset of existing video datasets:

  1. Sieve: We filter videos by matching their titles and transcripts against a text-only recipe database (RecipeNLG). This ensures the video content is relevant to the procedural task.
  2. Swap: We replace noisy ASR segments with clean, human-written instructions. By using sentence embeddings, we find the closest match in the recipe database for each ASR segment and "swap" the text while preserving the original video timestamps.
Detailed pipeline for the Sieve & Swap data curation process.

Procedure Transformer (ProcX)

We propose ProcX, an end-to-end model designed for efficiency and accuracy. Key innovations include:

  • Key-aware Deformable Attention: Ensures the model attends to diverse features across the video timeline, preventing attention collapse.
  • Contrastive Transformer: Uses an InfoNCE loss to align video features with text representations.
  • Generalized Varifocal Loss (gVFL): Calibrates confidence scores based on temporal overlap (IoU), ensuring that high confidence scores correspond to accurate localizations.

Results and Discussion

Our experiments demonstrate that quality trumps quantity in pre-training. By using the Sieve & Swap dataset (~48K videos), which is three orders of magnitude smaller than the full HowTo100M dataset (~15M videos), we achieved superior results.

On the YouCook2 benchmark, ProcX reached a state-of-the-art SODA-C score of 7.29. Furthermore, the model showed significant zero-shot capabilities, outperforming competitors even without fine-tuning on target datasets. The use of gVFL successfully addressed the common issue of confidence-localization mismatch, leading to cleaner and more reliable outputs.

Conclusion

The Sieve & Swap technique demonstrates that curating high-quality, domain-specific data can drastically reduce the computational resources required for pre-training while improving model performance. ProcX sets a new standard for procedural video understanding. Future work will explore extending this curation method to other domains like home repair and refining temporal boundaries using visual cues.

Code and dataset are available at: https://github.com/anilbatra2185/sns_procx

Summary updated

BibTeX
@inproceedings{batra2024efficient,
  author = {Anil Batra and Davide Moltisanti and Laura Sevilla-Lara and Marcus Rohrbach and Frank Keller},
  title = {{Efficient Pre-training for Localized Instruction Generation of Procedural Videos}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-72933-1\_20},
}

Loading related content...

Figure