video_pipe

lightning_pose.data.dali.video_pipe(filenames: list[str] | str, resize_dims: list[int] | None = None, random_shuffle: bool = False, sequence_length: int = 16, pad_sequences: bool = True, initial_fill: int = 16, normalization_mean: list[float] = [0.485, 0.456, 0.406], normalization_std: list[float] = [0.229, 0.224, 0.225], name: str = 'reader', step: int = 1, pad_last_batch: bool = False, imgaug: str = 'default', skip_vfr_check: bool = True) tuple[source]

Generic video reader pipeline that loads videos, resizes, augments, and normalizes.

Parameters:
  • filenames – list of absolute paths of video files to feed through pipeline

  • resize_dims – [height, width] to resize raw frames

  • random_shuffle – True to grab random batches of frames from videos; False to sequential read

  • seed – random seed when random_shuffle is True

  • sequence_length – number of frames to load per sequence

  • pad_sequences – allows creation of incomplete sequences if there is an insufficient number of frames at the very end of the video

  • initial_fill – size of the buffer that is used for random shuffling

  • normalization_mean – mean values in (0, 1) to subtract from each channel

  • normalization_std – standard deviation values to subtract from each channel

  • name – pipeline name, used to string together DataNode elements

  • step – number of frames to advance on each read

  • pad_last_batch

  • imgaug – string identifying which imgaug pipeline to use; β€œdefault”, β€œdlc”, β€œdlc-top-down”

  • skip_vfr_check – don’t check for variable frame rates, can throw errors with small diffs

Returns:

pipeline object to be fed to DALIGenericIterator data augmentation matrix (returned so that geometric transforms can be undone) size of video frames, used for bbox