PrepareDALI
- class lightning_pose.data.dali.PrepareDALI[source]
Bases:
objectAll the DALI stuff in one place.
Big picture: this will initialize the pipes and dataloaders for both training and prediction.
Attributes Summary
Number of dataloader iterations required to process all frames.
Methods Summary
__call__()Returns a LightningWrapper object.
Attributes Documentation
- num_iters
Number of dataloader iterations required to process all frames.
- Returns:
Integer count of how many times the dataloader must be enumerated to exhaust all video frames for the current
train_stageandmodel_typeconfiguration.
Methods Documentation
- __call__() LitDaliWrapper[source]
Returns a LightningWrapper object.
- __init__(train_stage: Literal['predict', 'train'], model_type: Literal['base', 'context'], filenames: list[str] | list[list[str]], resize_dims: list[int], dali_config: dict | DictConfig | ListConfig | None = None, imgaug: str | None = 'default', num_threads: int = 1) None[source]
Initialize DALI pipelines and dataloaders for training or prediction.
- Parameters:
train_stage – whether to set up pipelines for
"train"or"predict".model_type –
"base"for standard single-frame models,"context"for MHCRNN models that consume a temporal window.filenames – for single-view models, a flat list of video file paths; for multi-view models, a list of per-view lists of video file paths.
resize_dims –
[height, width]to resize frames to before feeding the model.dali_config – DALI-specific config dict; falls back to package defaults when None.
imgaug – name of the augmentation pipeline to apply during training (e.g.
"dlc"); pass"default"for resize-only orNoneto disable.num_threads – number of CPU threads used by DALI pipelines.
- Raises:
FileNotFoundError – if any path in
filenamesdoes not exist or is not a file.
- __new__(**kwargs)