UnlabeledDataModuleο
- class lightning_pose.data.datamodules.UnlabeledDataModule[source]ο
Bases:
BaseDataModuleData module that contains labeled and unlabled data loaders.
Methods Summary
Sets up the unlabeled data loader.
An iterable or collection of iterables specifying training samples.
Methods Documentation
- train_dataloader() CombinedLoader[source]ο
An iterable or collection of iterables specifying training samples.
For more information about multiple dataloaders, see this section.
The dataloader you return will not be reloaded unless you set :paramref:`~lightning.pytorch.trainer.trainer.Trainer.reload_dataloaders_every_n_epochs` to a positive integer.
For data processing use the following pattern:
download in
prepare_data()process and split in
setup()
However, the above are only necessary for distributed processing.
Warning
do not assign state in prepare_data
fit()prepare_data()setup()
Note
Lightning tries to add the correct sampler for distributed and arbitrary hardware. There is no need to set it yourself.
- __init__(dataset: Dataset, video_paths_list: list[str] | str, dali_config: dict | DictConfig, view_names: list[str] | None = None, train_batch_size: int = 16, val_batch_size: int = 16, test_batch_size: int = 1, num_workers: int | None = None, train_probability: float = 0.8, val_probability: float | None = None, test_probability: float | None = None, train_frames: float | None = None, torch_seed: int = 42, imgaug: Literal['default', 'dlc', 'dlc-top-down'] = 'default') None[source]ο
Data module that contains labeled and unlabeled data loaders.
- Parameters:
dataset β pytorch Dataset for labeled data
video_paths_list β absolute paths of videos (βunlabeledβ data)
view_names β if fitting a non-mirrored multiview model, pass view names in order to correctly organize the video paths
dali_config β see dali entry of default config file for keys
train_batch_size β number of samples of training batches
val_batch_size β number of samples in validation batches
test_batch_size β number of samples in test batches
num_workers β number of threads used for prefetching data
train_probability β fraction of full dataset used for training
val_probability β fraction of full dataset used for validation
test_probability β fraction of full dataset used for testing
train_frames β if integer, select this number of training frames from the initially selected train frames (defined by train_probability); if float, must be between 0 and 1 (exclusive) and defines the fraction of the initially selected train frames
torch_seed β control data splits
torch_seed β control randomness of labeled data loading
imgaug β type of image augmentation to apply to unlabeled frames
- __new__(**kwargs)ο