Package org.jetbrains.kotlinx.dl.impl.preprocessing
Types
Converts Bitmap to float array representation. Only Bitmap.Config.ARGB_8888 is supported.
The aim of this class is to provide common functionality for all Operations that can be applied to Pair and simplify the implementation of a new Operations.
This preprocessor defines normalizing operation. Given mean and std for n channels, this operation normalizes each channel of the input array, i.e.
This preprocessor defines the Rescaling operation. It scales each pixel pixel_i = pixel_i / scalingCoefficient.
Supported layouts for flat representations of tensors.
Functions
Applies Normalizing preprocessor to the tensor to normalize it with given mean and std values.
Applies Rescaling preprocessor to the tensor to scale each value by a given coefficient.
Applies ConvertToFloatArray operation to convert the Bitmap to a float array.