Core Module
Composition Module
- class bio_volumentations.core.composition.Compose(transforms, p=1.0, targets=(['image'], ['mask'], ['float_mask']), conversion=None)[source]
Bases:
objectCompose a list of transformations into a callable transformation pipeline.
It is strongly recommended to use
Composeto define and use the transformation pipeline.In addition, basic input image checks and conversions are performed. Optionally, datatype conversion (e.g. from
numpy.ndarraytotorch.Tensor) is performed.- Parameters:
transforms (List[Transform]) – List of transforms (objects of type
Transform).p (float, optional) –
Chance of applying the whole pipeline.
Defaults to
1.targets (Tuple[List[str]] | List[List[str]], optional) –
List of targets.
Defaults to
(['image'], ['mask'], ['float_mask']).conversion (Transform | None, optional) –
Image datatype conversion transform, applied after the transformations.
Defaults to
None.
Transforms Interface Module
- class bio_volumentations.core.transforms_interface.DualTransform(always_apply=False, p=0.5)[source]
Bases:
TransformThe base class of transformations applied to all target types.
- Targets:
image, mask
- class bio_volumentations.core.transforms_interface.ImageOnlyTransform(always_apply=False, p=0.5)[source]
Bases:
TransformThe base class of transformations applied to the image target only.
- Targets:
image
- property targets
- class bio_volumentations.core.transforms_interface.Transform(always_apply=False, p=0.5)[source]
Bases:
objectThe base class for transformations.
- Parameters:
always_apply (bool, optional) –
Always apply this transformation.
Defaults to
False.p (float, optional) –
Chance of applying this transformation.
Defaults to
0.5.