stages.video.filtering.motion_filter#
Module Contents#
Classes#
Stage for filtering video clips based on motion score. |
|
Stage for decoding motion vector information from video files. |
API#
- class stages.video.filtering.motion_filter.MotionFilterStage#
Bases:
nemo_curator.stages.base.ProcessingStage[nemo_curator.tasks.video.VideoTask,nemo_curator.tasks.video.VideoTask]Stage for filtering video clips based on motion score.
This class processes video clips through a series of steps including motion score computation and filtering based on thresholds.
- global_mean_threshold: float#
0.00098
- inputs() tuple[list[str], list[str]]#
Define stage input requirements.
Returns (tuple[list[str], list[str]]): Tuple of (required_attributes, required_columns) where: - required_top_level_attributes: List of task attributes that must be present - required_data_attributes: List of attributes within the data that must be present
- motion_filter_batch_size: int#
256
- name: str#
‘motion_filter’
- num_gpus_per_worker: float#
0
- outputs() tuple[list[str], list[str]]#
Define stage output specification.
Returns (tuple[list[str], list[str]]): Tuple of (output_attributes, output_columns) where: - output_top_level_attributes: List of task attributes this stage adds/modifies - output_data_attributes: List of attributes within the data that this stage adds/modifies
- per_patch_min_256_threshold: float#
1e-06
- process(
- task: nemo_curator.tasks.video.VideoTask,
Process a task and return the result. Args: task (X): Input task to process Returns (Y | list[Y]): - Single task: For 1-to-1 transformations - List of tasks: For 1-to-many transformations (e.g., readers) - None: If the task should be filtered out
- score_only: bool#
False
- verbose: bool#
False
- class stages.video.filtering.motion_filter.MotionVectorDecodeStage#
Bases:
nemo_curator.stages.base.ProcessingStage[nemo_curator.tasks.video.VideoTask,nemo_curator.tasks.video.VideoTask]Stage for decoding motion vector information from video files.
This class processes video files through a series of steps including decoding, filtering by side length, and storing the results in the task.
- inputs() tuple[list[str], list[str]]#
Define stage input requirements.
Returns (tuple[list[str], list[str]]): Tuple of (required_attributes, required_columns) where: - required_top_level_attributes: List of task attributes that must be present - required_data_attributes: List of attributes within the data that must be present
- name: str#
‘motion_vector_decoding’
- num_cpus_per_worker: float#
6.0
- outputs() tuple[list[str], list[str]]#
Define stage output specification.
Returns (tuple[list[str], list[str]]): Tuple of (output_attributes, output_columns) where: - output_top_level_attributes: List of task attributes this stage adds/modifies - output_data_attributes: List of attributes within the data that this stage adds/modifies
- process(
- task: nemo_curator.tasks.video.VideoTask,
Process a task and return the result. Args: task (X): Input task to process Returns (Y | list[Y]): - Single task: For 1-to-1 transformations - List of tasks: For 1-to-many transformations (e.g., readers) - None: If the task should be filtered out
- target_duration_ratio: float#
0.5
- target_fps: float#
2.0
- verbose: bool#
False