PipelinePresets class abstract

Pre-configured preprocessing pipelines for common ML models.

Use these factory methods to quickly create pipelines that match the preprocessing requirements of popular model architectures.

// Get an ImageNet classification pipeline
final pipeline = PipelinePresets.imagenetClassification();

// Or create a custom pipeline
final custom = PipelinePresets.custom(
  height: 256,
  width: 256,
  mean: [0.5, 0.5, 0.5],
  std: [0.5, 0.5, 0.5],
);

Constructors

PipelinePresets()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

clip({int size = 224, InterpolationMode interpolation = InterpolationMode.bicubic}) TensorPipeline
Creates a pipeline for CLIP vision encoder.
custom({required int height, required int width, InterpolationMode interpolation = InterpolationMode.bilinear, List<double>? mean, List<double>? std, bool addBatchDim = true, bool toChw = true}) TensorPipeline
Creates a fully customizable preprocessing pipeline.
faceRecognition({int height = 112, int width = 112, InterpolationMode interpolation = InterpolationMode.bilinear}) TensorPipeline
Creates a pipeline for face recognition models (e.g., ArcFace).
imagenetClassification({int shortestEdge = 256, int cropSize = 224, InterpolationMode interpolation = InterpolationMode.bilinear}) TensorPipeline
Creates a pipeline for ImageNet classification models.
minimal({int height = 224, int width = 224}) TensorPipeline
Creates a minimal preprocessing pipeline with just resize and normalize.
mobileNet({int height = 224, int width = 224, InterpolationMode interpolation = InterpolationMode.bilinear}) TensorPipeline
Creates a pipeline for MobileNet models.
objectDetection({int height = 640, int width = 640, InterpolationMode interpolation = InterpolationMode.bilinear}) TensorPipeline
Creates a pipeline for object detection models (e.g., YOLO).
resnetClassification({int height = 224, int width = 224, InterpolationMode interpolation = InterpolationMode.bilinear}) TensorPipeline
Creates a pipeline for ResNet classification models.
segmentation({int height = 512, int width = 512, InterpolationMode interpolation = InterpolationMode.bilinear}) TensorPipeline
Creates a pipeline for semantic segmentation models.
tflite({int height = 224, int width = 224, bool normalize = true}) TensorPipeline
Creates a pipeline for TensorFlow Lite models.
vit({int size = 224, InterpolationMode interpolation = InterpolationMode.bilinear}) TensorPipeline
Creates a pipeline for Vision Transformer (ViT) models.