Preprocessing

class Preprocessing

The data preprocessing pipeline presented as Kotlin DSL on receivers.

Could be used to handle directory of images or one image file.

Constructors

Preprocessing
Link copied to clipboard
fun Preprocessing()

Functions

invoke
Link copied to clipboard
operator fun invoke(): Pair<FloatArray, ImageShape>
Applies the preprocessing pipeline to the specific image file.

Properties

finalShape
Link copied to clipboard
val finalShape: ImageShape
Returns the final shape of data when image preprocessing is applied to the image.
imagePreprocessingStage
Link copied to clipboard
lateinit var imagePreprocessingStage: ImagePreprocessing
This stage describes the process of image loading and transformation before converting to tensor.
tensorPreprocessingStage
Link copied to clipboard
lateinit var tensorPreprocessingStage: TensorPreprocessing
This stage describes the process of data transformation after converting to tensor.

Extensions

transformImage
Link copied to clipboard
fun Preprocessing.transformImage(block: ImagePreprocessing.() -> Unit)
transformTensor
Link copied to clipboard
fun Preprocessing.transformTensor(block: TensorPreprocessing.() -> Unit)