TunAugmentor.transformations.crops module
- class TunAugmentor.transformations.crops.CenterCrop(width, height)
Bases:
TunAugmentor.transformations.basic_transform.BasicTransform
Crops the center of the image with a fixed width and height.
- heightint
Height of the crop.
- widthint
Width of the crop.
- class TunAugmentor.transformations.crops.Crop(xmin, xmax, ymin, ymax)
Bases:
TunAugmentor.transformations.basic_transform.BasicTransform
Crops the area of the image limited by xmin,xmax and ymin,ymax.
- xminint
minimum x coordinate.
- xmaxint
maximum x coordinate.
- yminint
minimum y coordinate.
- ymaxint
maximum y coordinate.
- class TunAugmentor.transformations.crops.CropAndPad(width, height, color_value)
Bases:
TunAugmentor.transformations.basic_transform.BasicTransform
Crops and pads the image. Crops the center of the image with a fixed width and height then adds a padding corresponding to the color value at the sides.
- heightint
Height of the crop.
- widthint
Width of the crop.
- color_valueint
Color of the padding.
- class TunAugmentor.transformations.crops.CropOrPad(width, height, color_value)
Bases:
TunAugmentor.transformations.basic_transform.BasicTransform
Crops or pads the image to a fixed width and height. Crops the image if either the width or height is less than the initial width or height. Pads the images with the corresponding color value if either the width or height is more than the initial width or height.
- heightint
Height of the crop.
- widthint
Width of the crop.
- color_valueint
Color of the padding.
- class TunAugmentor.transformations.crops.RandomCrop(width, height)
Bases:
TunAugmentor.transformations.basic_transform.BasicTransform
Randomly crops an area of the image with a fixed width and height.
- heightint
Height of the crop.
- widthint
Width of the crop.