Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Implementation:NVIDIA NeMo Curator ClipFrameExtractionStage

From Leeroopedia
Knowledge Sources
Domains Data_Curation, Video_Processing
Last Updated 2026-02-14 17:00 GMT

Overview

Concrete tool for extracting image frames from video clips at configurable frame rates provided by NeMo Curator.

Description

The ClipFrameExtractionStage processes video clips to extract image frames using configurable extraction policies and target frame rates. It supports multiple decoder backends and stores frames keyed by FrameExtractionSignature for downstream stages.

Usage

Import this stage after clipping stages and before captioning, embedding, or aesthetic filtering stages that require image frames.

Code Reference

Source Location

  • Repository: NeMo Curator
  • File: nemo_curator/stages/video/clipping/clip_frame_extraction.py
  • Lines: L33-134

Signature

@dataclass
class ClipFrameExtractionStage(ProcessingStage[VideoTask, VideoTask]):
    extraction_policies: tuple[FrameExtractionPolicy, ...] = (FrameExtractionPolicy.sequence,)
    extract_purposes: list[FramePurpose] | None = None
    target_res: tuple[int, int] | None = None
    verbose: bool = False
    num_cpus: int = 3
    target_fps: list[float | int] | None = None
    name: str = "clip_frame_extraction"

Import

from nemo_curator.stages.video.clipping.clip_frame_extraction import ClipFrameExtractionStage

I/O Contract

Inputs

Name Type Required Description
task VideoTask Yes Video with clips having buffer data

Outputs

Name Type Description
task VideoTask Video with clip.extracted_frames dict keyed by FrameExtractionSignature

Usage Examples

from nemo_curator.stages.video.clipping.clip_frame_extraction import ClipFrameExtractionStage
from nemo_curator.utils.decoder_utils import FrameExtractionPolicy

stage = ClipFrameExtractionStage(
    extraction_policies=(FrameExtractionPolicy.sequence,),
    target_fps=[2.0],
    num_cpus=3,
)

Related Pages

Implements Principle

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment