Conversion Module
- class src.bio_volumentations.conversion.transforms.Contiguous(always_apply: bool = True, p: float = 1.0)[source]
Bases:
DualTransformTransform the image data to a contiguous array.
- Parameters:
always_apply (bool, optional) –
Always apply this transformation in composition.
Defaults to
True.p (float, optional) –
Probability of applying this transformation in composition.
Defaults to
1.
- Targets:
image, mask, float mask
- class src.bio_volumentations.conversion.transforms.ConversionToFormat(always_apply: bool = True, p: float = 1)[source]
Bases:
DualTransformCheck the very basic assumptions about the input images.
Add channel dimension to the 3D images without it. Check that shapes of individual target types are consistent (to some extent).
- Parameters:
always_apply (bool, optional) –
Always apply this transformation in composition.
Defaults to
True.p (float, optional) –
Probability of applying this transformation in composition.
Defaults to
1.
- Targets:
image, mask
- class src.bio_volumentations.conversion.transforms.ConvertFromBBoxes(always_apply: bool = True, p: float = 1.0)[source]
Bases:
DualTransformConverts bounding boxes back to the ‘raw data’ format specified previously from the internal BoundingBox classes.
- Parameters:
always_apply (bool, optional) –
Always apply this transformation in composition.
Defaults to
True.p (float, optional) –
Probability of applying this transformation in composition.
Defaults to
1.
- Targets:
bounding_box
- class src.bio_volumentations.conversion.transforms.ConvertToBBoxes(bbox_format: str = 'voc', always_apply: bool = True, p: float = 1.0)[source]
Bases:
DualTransformConverts bounding boxes from ‘raw data’ to objects of BoundingBox class.
- Parameters:
bbox_format (str) –
Format the bounding boxes are supplied in. Supported formats: ‘voc’, ‘coco’, ‘yolo’, ‘albumentations’.
Defaults to ‘voc’.
always_apply (bool, optional) –
Always apply this transformation in composition.
Defaults to
True.p (float, optional) –
Probability of applying this transformation in composition.
Defaults to
1.
- Targets:
bounding_box
- class src.bio_volumentations.conversion.transforms.KeypointsFixDatatype(always_apply: bool = True, p: float = 1)[source]
Bases:
DualTransformConvert any 2D array-like format of keypoints into a list of tuples containing ints of floats.
The input can be a 2d numpy array, a list of lists, a list of tuples, etc., and individual coordinate values can be of type int, float, or any numpy dtype.
- Parameters:
always_apply (bool, optional) –
Always apply this transformation in composition.
Defaults to
True.p (float, optional) –
Probability of applying this transformation in composition.
Defaults to
1.
- Targets:
key points
- class src.bio_volumentations.conversion.transforms.NoConversion(always_apply: bool = True, p: float = 1)[source]
Bases:
DualTransformAn identity transform.
- Parameters:
always_apply (bool, optional) –
Always apply this transformation in composition.
Defaults to
True.p (float, optional) –
Probability of applying this transformation in composition.
Defaults to
1.
- Targets:
image, mask
- class src.bio_volumentations.conversion.transforms.StandardizeDatatype(always_apply: bool = True, p: float = 1.0)[source]
Bases:
DualTransformChange image and float_mask datatype to
np.float32without changing the intensities. Change mask datatype tonp.int32.- Parameters:
always_apply (bool, optional) –
Always apply this transformation in composition.
Defaults to
True.p (float, optional) –
Probability of applying this transformation in composition.
Defaults to
1.
- Targets:
image, mask, float mask