8 instantiations of ImageResizingEstimator
Microsoft.ML.ImageAnalytics (2)
ExtensionsCatalog.cs (2)
163=> new ImageResizingEstimator(CatalogUtils.GetEnvironment(catalog), outputColumnName, imageWidth, imageHeight, inputColumnName, resizing, cropAnchor); 186=> new ImageResizingEstimator(CatalogUtils.GetEnvironment(catalog), columnOptions);
Microsoft.ML.TensorFlow.Tests (3)
TensorflowTests.cs (3)
150.Append(new ImageResizingEstimator(_mlContext, "ImageCropped", imageHeight, imageWidth, "ImageReal")) 1022.Append(new ImageResizingEstimator(_mlContext, "ImageCropped", 1160.Append(new ImageResizingEstimator(_mlContext, "ImageCropped", imageHeight, imageWidth, "ImageReal"))
Microsoft.ML.Tests (3)
ImagesTests.cs (3)
51.Append(new ImageResizingEstimator(env, "ImageReal", 100, 100, "ImageReal")) 75.Append(new ImageResizingEstimator(env, "ImageReal", 100, 100, "ImageReal")) 1022.Append(new ImageResizingEstimator(env, "ImageReal", targetDimension, targetDimension, "ImageReal",
195 references to ImageResizingEstimator
Microsoft.ML.AutoML (142)
ApplyOnnxModel.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
ApplyOnnxModelOption.generated.cs (2)
6using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 7using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
Concatenate.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
ConcatOption.generated.cs (2)
6using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 7using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
ConvertType.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
ConvertTypeOption.generated.cs (2)
6using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 7using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
DnnFeaturizerImage.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
DnnFeaturizerImageOption.generated.cs (2)
6using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 7using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
ExtractPixels.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
ExtractPixelsOption.generated.cs (2)
6using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 7using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
FastForestBinary.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
FastForestOption.generated.cs (2)
6using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 7using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
FastForestOva.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
FastForestRegression.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
FastTreeBinary.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
FastTreeOption.generated.cs (2)
6using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 7using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
FastTreeOva.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
FastTreeRegression.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
FastTreeTweedieRegression.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
FeaturizeText.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
FeaturizeTextOption.generated.cs (2)
6using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 7using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
ForecastBySsa.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
ImageClassificationMulti.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
ImageClassificationOption.generated.cs (2)
6using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 7using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
LbfgsLogisticRegressionBinary.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
LbfgsLogisticRegressionOva.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
LbfgsMaximumEntropyMulti.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
LbfgsOption.generated.cs (2)
6using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 7using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
LbfgsPoissonRegressionRegression.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
LgbmOption.generated.cs (2)
6using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 7using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
LightGbmBinary.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
LightGbmMulti.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
LightGbmRegression.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
LoadImageOption.generated.cs (2)
6using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 7using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
LoadImages.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
LoadRawImageBytes.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
MapKeyToValue.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
MapKeyToValueOption.generated.cs (2)
6using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 7using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
MapValueToKey.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
MapValueToKeyOption.generated.cs (2)
6using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 7using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
MatrixFactorization.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
MatrixFactorizationOption.generated.cs (2)
6using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 7using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
Naive.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
NaiveOption.generated.cs (2)
6using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 7using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
NamedEntityRecognitionMulti.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
NamedEntityRecognitionOption.generated.cs (2)
6using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 7using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
NormalizeMinMax.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
NormalizeMinMaxOption.generated.cs (2)
6using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 7using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
NormalizeText.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
NormalizeTextOption.generated.cs (2)
6using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 7using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
ObjectDetectionMulti.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
ObjectDetectionOption.generated.cs (2)
6using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 7using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
OneHotEncoding.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
OneHotHashEncoding.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
OneHotOption.generated.cs (2)
6using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 7using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
QuestionAnsweringMulti.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
QuestionAnsweringOption.generated.cs (2)
6using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 7using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
ReplaceMissingValueOption.generated.cs (2)
6using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 7using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
ReplaceMissingValues.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
ResizeImageOption.generated.cs (2)
6using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 7using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
ResizeImages.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
SdcaLogisticRegressionBinary.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
SdcaLogisticRegressionOva.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
SdcaMaximumEntropyMulti.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
SdcaOption.generated.cs (2)
6using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 7using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
SdcaRegression.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
SentenceSimilarityOption.generated.cs (2)
6using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 7using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
SentenceSimilarityRegression.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
SsaOption.generated.cs (2)
6using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 7using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
TextClassificationMulti.cs (2)
8using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 9using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
TextClassificationOption.generated.cs (2)
6using ResizingKind = Microsoft.ML.Transforms.Image.ImageResizingEstimator.ResizingKind; 7using Anchor = Microsoft.ML.Transforms.Image.ImageResizingEstimator.Anchor;
Microsoft.ML.ImageAnalytics (50)
ExtensionsCatalog.cs (12)
138/// Create a <see cref="ImageResizingEstimator"/>, which resize the image from the column specified in <paramref name="inputColumnName"/> 148/// <param name="resizing"> The type of image resizing as specified in <see cref="ImageResizingEstimator.ResizingKind"/>.</param> 149/// <param name="cropAnchor">Where to place the anchor, to start cropping. Options defined in <see cref="ImageResizingEstimator.Anchor"/></param> 156public static ImageResizingEstimator ResizeImages(this TransformsCatalog catalog, 161ImageResizingEstimator.ResizingKind resizing = ImageResizingEstimator.ResizingKind.IsoCrop, 162ImageResizingEstimator.Anchor cropAnchor = ImageResizingEstimator.Anchor.Center) 174/// or just crop it can be specified separately for each column loaded, through the <see cref="ImageResizingEstimator.ColumnOptions"/>. 177/// <param name="columnOptions">The <see cref="ImageResizingEstimator.ColumnOptions"/> describing how the transform handles each image resize column.</param> 185internal static ImageResizingEstimator ResizeImages(this TransformsCatalog catalog, params ImageResizingEstimator.ColumnOptions[] columnOptions)
ImageResizer.cs (38)
33/// <see cref="ITransformer"/> resulting from fitting an <see cref="ImageResizingEstimator"/>. 46public ImageResizingEstimator.ResizingKind? Resizing; 49public ImageResizingEstimator.Anchor? CropAnchor; 82public ImageResizingEstimator.ResizingKind Resizing = ImageResizingEstimator.Defaults.Resizing; 85public ImageResizingEstimator.Anchor CropAnchor = ImageResizingEstimator.Defaults.CropAnchor; 108private readonly ImageResizingEstimator.ColumnOptions[] _columns; 113internal IReadOnlyCollection<ImageResizingEstimator.ColumnOptions> Columns => _columns.AsReadOnly(); 123/// <param name="resizing">What <see cref="ImageResizingEstimator.ResizingKind"/> to use.</param> 124/// <param name="cropAnchor">If <paramref name="resizing"/> set to <see cref="ImageResizingEstimator.ResizingKind.IsoCrop"/> what anchor to use for cropping.</param> 127ImageResizingEstimator.ResizingKind resizing = ImageResizingEstimator.ResizingKind.IsoCrop, 128ImageResizingEstimator.Anchor cropAnchor = ImageResizingEstimator.Anchor.Center) 129: this(env, new ImageResizingEstimator.ColumnOptions(outputColumnName, imageWidth, imageHeight, inputColumnName, resizing, cropAnchor)) 138internal ImageResizingTransformer(IHostEnvironment env, params ImageResizingEstimator.ColumnOptions[] columns) 144private static (string outputColumnName, string inputColumnName)[] GetColumnPairs(ImageResizingEstimator.ColumnOptions[] columns) 159var cols = new ImageResizingEstimator.ColumnOptions[args.Columns.Length]; 163cols[i] = new ImageResizingEstimator.ColumnOptions( 199_columns = new ImageResizingEstimator.ColumnOptions[ColumnPairs.Length]; 206var scale = (ImageResizingEstimator.ResizingKind)ctx.Reader.ReadByte(); 207Host.CheckDecode(Enum.IsDefined(typeof(ImageResizingEstimator.ResizingKind), scale)); 208var anchor = (ImageResizingEstimator.Anchor)ctx.Reader.ReadByte(); 209Host.CheckDecode(Enum.IsDefined(typeof(ImageResizingEstimator.Anchor), anchor)); 210_columns[i] = new ImageResizingEstimator.ColumnOptions(ColumnPairs[i].outputColumnName, width, height, ColumnPairs[i].inputColumnName, scale, anchor); 244Contracts.Assert((ImageResizingEstimator.ResizingKind)(byte)col.Resizing == col.Resizing); 246Contracts.Assert((ImageResizingEstimator.Anchor)(byte)col.Anchor == col.Anchor); 312ImageResizingEstimator.ResizingKind.IsoPad => ImageResizeMode.Pad, 313ImageResizingEstimator.ResizingKind.IsoCrop => 316ImageResizingEstimator.Anchor.Top => ImageResizeMode.CropAnchorTop, 317ImageResizingEstimator.Anchor.Bottom => ImageResizeMode.CropAnchorBottom, 318ImageResizingEstimator.Anchor.Left => ImageResizeMode.CropAnchorLeft, 319ImageResizingEstimator.Anchor.Right => ImageResizeMode.CropAnchorRight, 322ImageResizingEstimator.ResizingKind.Fill => ImageResizeMode.Fill, 444/// <param name="resizing">What <see cref="ImageResizingEstimator.ResizingKind"/> to use.</param> 445/// <param name="anchor">If <paramref name="resizing"/> set to <see cref="ImageResizingEstimator.ResizingKind.IsoCrop"/> what anchor to use for cropping.</param> 501: base(Contracts.CheckRef(env, nameof(env)).Register(nameof(ImageResizingEstimator)), transformer)
Microsoft.ML.Tests (3)
ImagesTests.cs (3)
150var cropped = new ImageResizingTransformer(env, "ImageCropped", 100, 100, "ImageReal", ImageResizingEstimator.ResizingKind.IsoPad).Transform(images); 1023resizing: ImageResizingEstimator.ResizingKind.Fill)); 1183var pipeline = mlContext.Transforms.ResizeImages("ResizedImage", 100, 100, nameof(InMemoryImage.LoadedImage));