ImagePreprocessing

struct defined in module FastVision


			ImagePreprocessing([; kwargs...]) <: Encoding

Encodes Images by converting them to a common color type C, expanding the color channels and normalizing the channel values. Additionally, apply pixel-level augmentations passed in as augmentations during Training.

Encodes

  • Image{N} -> ImageTensor{N}

Keyword arguments

  • augmentations:: DataAugmentation.Transform: Augmentation to apply to every image before preprocessing. See augs_lighting

  • buffered = true: Whether to use inplace transformations. Reduces memory usage.

  • means::SVector = IMAGENET_MEANS: mean value of each color channel.

  • stds::SVector = IMAGENET_STDS: standard deviation of each color channel.

  • C::Type{<:Colorant} = RGB{N0f8}: color type to convert images to.

  • T::Type{<:Real} = Float32: element type of output