get_imgaug_transform

lightning_pose.utils.scripts.get_imgaug_transform(cfg: DictConfig) Sequential[source]

Create simple and flexible data transform pipeline that augments images and keypoints.

Parameters:

cfg

standard config file that carries around dataset info; relevant is the parameter - “cfg.training.imgaug” which can take on the following values:

  • default/none: resizing only

  • dlc: imgaug pipeline implemented in DLC 2.0 package

(rotation, motion blur, dropout, salt/pepper noise, elastic transform, histogram equalization, emboss, crop) - dlc-lr: dlc pipeline plus 0° or 180° rotation (left-right flipping) - dlc-top-down: dlc pipeline plus 0°, 90°, 180°, or 270° rotation - dlc-mv: multiview-compatible dlc pipeline (excludes 2D geometric transforms

like rotation, elastic transform, and crop that would break 3D consistency)

  • dict/DictConfig: custom augmentation parameters where each key is

an imgaug transform name and value contains probability, args, and kwargs.

  • ”cfg.training.imgaug_3d”:

    boolean flag to control 3D-compatible augmentations for multiview models; set to False to disable automatic “dlc-mv” enforcement; set to True to enable 3D augmentations for when camera params file exist.

Returns:

imgaug pipeline