ImagePreprocessor<T>
Models & Types · AiDotNet.Augmentation.Image
Unified preprocessing pipeline builder for chaining image transformations.
Constructors
| Constructor |
Summary |
ImagePreprocessor() |
|
Properties
| Property |
Summary |
IReadOnlyList<IAugmentation<T, ImageTensor<T>>> Transforms { get; } |
Gets the list of transforms in this pipeline. |
Methods
| Method |
Summary |
ImagePreprocessor<T> Add(IAugmentation<T, ImageTensor<T>> transform) |
Adds a transform to the pipeline. |
ImagePreprocessor<T> CenterCrop(int height, int width) |
Adds center crop. |
ImagePreprocessor<T> Normalize(double[] mean, double[] std) |
Adds normalization. |
ImagePreprocessor<T> RandomCrop(int height, int width) |
Adds random crop augmentation. |
ImagePreprocessor<T> RandomHorizontalFlip(double probability) |
Adds horizontal flip augmentation. |
ImagePreprocessor<T> Resize(int height, int width, InterpolationMode mode) |
Adds a resize transform. |
ImagePreprocessor<T> ToTensor(double scaleFactor) |
Adds ToTensor conversion. |
ImageTensor<T> Process(ImageTensor<T> image, AugmentationContext<T> context) |
Applies the entire pipeline to an image. |