Package org.jetbrains.kotlinx.dl.dataset.preprocessor.image

Types

Cropping
Link copied to clipboard
class Cropping(top: Int, bottom: Int, left: Int, right: Int) : ImagePreprocessorBase

This image preprocessor defines the Crop operation.

ImagePreprocessing
Link copied to clipboard
class ImagePreprocessing

The whole image preprocessing pipeline DSL.

ImagePreprocessor
Link copied to clipboard
interface ImagePreprocessor

Basic interface for image preprocessors. It operates on BufferedImage.

ImagePreprocessorBase
Link copied to clipboard
abstract class ImagePreprocessorBase : ImagePreprocessor

Base class for ImagePreprocessor implementations.

ImageSaver
Link copied to clipboard
interface ImageSaver

Interface for saving image preprocessing output result.

InterpolationType
Link copied to clipboard
enum InterpolationType : Enum<InterpolationType>

When an image is resized, we need an interpolation algorithm to draw newly created pixels between old pixels.

Loading
Link copied to clipboard
class Loading(pathToData: File?, imageShape: ImageShape?, labelGenerator: LabelGenerator?, colorMode: ColorOrder)

This class defines the Loading operation.

RenderingSpeed
Link copied to clipboard
enum RenderingSpeed : Enum<RenderingSpeed>

The speed of single file preprocessing could be tuned via this setting.

Resize
Link copied to clipboard
class Resize(outputWidth: Int, outputHeight: Int, interpolation: InterpolationType, renderingSpeed: RenderingSpeed, enableAntialiasing: Boolean) : ImagePreprocessorBase

This image preprocessor defines the Resize operation.

Rotate
Link copied to clipboard
class Rotate(degrees: Float, interpolation: InterpolationType, renderingSpeed: RenderingSpeed, enableAntialiasing: Boolean) : ImagePreprocessorBase

This image preprocessor defines the Rotate operation.

Save
Link copied to clipboard
class Save(dirLocation: File?) : ImageSaver

This ImageSaver allows saving image preprocessing result to file or directory in jpg format.

Functions

crop
Link copied to clipboard
fun ImagePreprocessing.crop(block: Cropping.() -> Unit)
resize
Link copied to clipboard
fun ImagePreprocessing.resize(block: Resize.() -> Unit)
rotate
Link copied to clipboard
fun ImagePreprocessing.rotate(block: Rotate.() -> Unit)
save
Link copied to clipboard
fun ImagePreprocessorBase.save(block: Save.() -> Unit)