diffengine.datasets.transforms.wrappers¶
Module Contents¶
Classes¶
Process data with a randomly chosen transform from given candidates. |
Attributes¶
- class diffengine.datasets.transforms.wrappers.RandomChoice(transforms, prob=None)[source]¶
Bases:
diffengine.datasets.transforms.base.BaseTransformProcess data with a randomly chosen transform from given candidates.
Copied from mmcv/transforms/wrappers.py.
Args:¶
- transforms (list[list]): A list of transform candidates, each is a
sequence of transforms.
- prob (list[float], optional): The probabilities associated
with each pipeline. The length should be equal to the pipeline number and the sum should be 1. If not given, a uniform distribution will be assumed.
Examples:¶
>>> # config >>> pipeline = [ >>> dict(type='RandomChoice', >>> transforms=[ >>> [dict(type='RandomHorizontalFlip')], # subpipeline 1 >>> [dict(type='RandomRotate')], # subpipeline 2 >>> ] >>> ) >>> ]
- Parameters:
transforms (list[Transform | list[Transform]]) –
prob (list[float] | None) –