finetuner.tuner.augmentation module#
- finetuner.tuner.augmentation.vision_preprocessor(height=224, width=224, default_channel_axis=- 1, target_channel_axis=0, normalize=False, phase='train')[source]#
Randomly augments a Document with tensor field. The method applies flipping, color jitter, cropping, gaussian blur and random rectangle erase to the given image.
- Parameters
height (
int
) – image height.width (
int
) – image width.default_channel_axis (
int
) – The color channel of the input image, by default -1, the expected input is H, W, C.target_channel_axis (
int
) – The color channel of the output image, by default 0, the expected output is C, H, W.normalize (
bool
) – Normalize uint8 imagetensor
into a float32 imagetensor
inplace.phase (
str
) – phase of experiment, either train or validation. At validation phase, will not apply random transformation.