dgs.models.dataset.torchreid_pose_dataset.TorchreidPoseDataManager.build_transforms¶
- static TorchreidPoseDataManager.build_transforms(transforms: str | list[str] | callable | list[callable] | None = None, **kwargs)[source]¶
Build transforms for pose data. Can’t use torchreid transforms.
Possible transforms:¶
- random_flip
Randomly flip along the horizontal or vertical axis.
- random_horizontal_flip
Randomly flip along the horizontal axis.
- random_vertical_flip
Randomly flip along the vertical axis.
- random_move
Adds normally distributed noise to the key points.
- random_resize
Randomly resizes the key points by a factor in range (0.95, 1.05)
- param transforms:
List of transform names or functions which will be applied to the data during training. Not used for testing! The transforms will be inserted into a tvt.Compose in the order they are defined in this list. Default is None.
- keyword random_horizontal_flip_prob:
Probability of flipping the coordinates horizontally. Default 0.5
- kwtype random_horizontal_flip_prob:
float
- keyword random_vertical_flip_prob:
Probability of flipping the coordinates vertically. Default 0.5
- kwtype random_vertical_flip_prob:
float
- keyword random_move_prob:
Probability to use add normally distributed movement. Default 0.5
- kwtype random_move_prob:
float
- keyword random_resize_prob:
Probability to randomly resize. Default 0.5
- kwtype random_resize_prob:
float
- keyword random_flip_prob:
Probability of using random flipping. Default 0.5
- kwtype random_flip_prob:
float
- keyword random_flip_probs:
When a ‘random_flip’ is done, these are the probabilities of flipping horizontal and vertical. Default [0.8, 0.2]
- kwtype random_flip_probs:
list[float]
- returns:
One composed transform for training and testing.
- rtype:
(tvt.Compose, tvt.Compose)
- raises ValueError:
If
transforms
is an invalid object or contains invalid transform names.