5 instantiations of MLImage
Microsoft.ML.ImageAnalytics (5)
MLImage.cs (5)
49
return new
MLImage
(image);
70
return new
MLImage
(image);
110
return new
MLImage
(image);
305
return new
MLImage
(image);
424
return new
MLImage
(destBitmap);
158 references to MLImage
Microsoft.ML.ImageAnalytics (35)
ExtensionsCatalog.cs (6)
24
/// This estimator operates only on <see cref="Microsoft.ML.Data.
MLImage
"/>.</param>
40
/// <param name="columns">The pairs of input and output columns. This estimator operates only on <see cref="Microsoft.ML.Data.
MLImage
"/>.</param>
61
/// This column's data type will be <see cref="Microsoft.ML.Data.
MLImage
"/>.</param>
101
/// This estimator operates over <see cref="Microsoft.ML.Data.
MLImage
"/>.</param>
145
/// This estimator operates over <see cref="Microsoft.ML.Data.
MLImage
"/>.</param>
205
/// This column's data type will be <see cref="Microsoft.ML.Data.
MLImage
"/>.</param>
ImageGrayscale.cs (5)
167
var
src = default(
MLImage
);
168
var getSrc = input.GetGetter<
MLImage
>(input.Schema[ColMapNewToOld[iinfo]]);
180
ValueGetter<
MLImage
> del =
181
(ref
MLImage
dst) =>
ImageLoader.cs (5)
220
var
lastImage = default(
MLImage
);
233
ValueGetter<
MLImage
> del =
234
(ref
MLImage
dst) =>
253
dst =
MLImage
.CreateFromStream(ms);
ImagePixelExtractor.cs (3)
323
var getSrc = input.GetGetter<
MLImage
>(input.Schema[ColMapNewToOld[iinfo]]);
324
var
src = default(
MLImage
);
ImageResizer.cs (5)
277
var
src = default(
MLImage
);
278
var getSrc = input.GetGetter<
MLImage
>(input.Schema[ColMapNewToOld[iinfo]]);
290
ValueGetter<
MLImage
> del =
291
(ref
MLImage
dst) =>
ImageType.cs (3)
66
DataViewTypeManager.Register(new ImageDataViewType(Height, Width), typeof(
MLImage
), this);
76
: base(typeof(
MLImage
))
86
public ImageDataViewType() : base(typeof(
MLImage
))
MLImage.cs (5)
36
public static
MLImage
CreateFromStream(Stream imageStream)
57
public static
MLImage
CreateFromFile(string imagePath)
81
public static unsafe
MLImage
CreateFromPixels(int width, int height, MLPixelFormat pixelFormat, ReadOnlySpan<byte> imagePixelData)
288
internal
MLImage
CloneWithResizing(int width, int height, ImageResizeMode mode)
410
internal
MLImage
CloneWithGrayscale()
VectorToImageTransform.cs (3)
344
private ValueGetter<
MLImage
> GetterFromType<TValue>(PrimitiveDataViewType srcType, DataViewRow input, int iinfo,
356
(ref
MLImage
dst) =>
418
dst =
MLImage
.CreateFromPixels(width, height, MLPixelFormat.Bgra32, imageData);
Microsoft.ML.OnnxTransformerTest (2)
OnnxTransformTests.cs (2)
591
public
MLImage
Image { get; set; }
616
Image =
MLImage
.CreateFromPixels(Width, Height, MLPixelFormat.Bgra32, imageData);
Microsoft.ML.Samples (23)
Dynamic\Transforms\ApplyONNXModelWithInMemoryImages.cs (2)
93
public
MLImage
Image { get; set; }
118
Image =
MLImage
.CreateFromPixels(width, height, MLPixelFormat.Bgra32, imageData);
Dynamic\Transforms\ImageAnalytics\ConvertToGrayScale.cs (4)
73
MLImage
imageObject = null;
74
MLImage
grayscaleImageObject = null;
82
var imageObjectGetter = cursor.GetGetter<
MLImage
>(cursor.Schema[
85
var grayscaleGetter = cursor.GetGetter<
MLImage
>(cursor.Schema[
Dynamic\Transforms\ImageAnalytics\ConvertToGrayScaleInMemory.cs (5)
39
var
image = dataPoint.Image;
40
var
grayImage = dataPoint.GrayImage;
87
public
MLImage
Image { get; set; }
90
public
MLImage
GrayImage { get; set; }
110
Image =
MLImage
.CreateFromPixels(width, height, MLPixelFormat.Bgra32, imageData);
Dynamic\Transforms\ImageAnalytics\ConvertToImage.cs (2)
61
MLImage
imageObject = null;
69
var imageGetter = cursor.GetGetter<
MLImage
>(cursor.Schema["Image"]);
Dynamic\Transforms\ImageAnalytics\ExtractPixels.cs (4)
81
MLImage
imageObject = null;
82
MLImage
resizedImageObject = null;
91
var imageObjectGetter = cursor.GetGetter<
MLImage
>(cursor.Schema[
94
var resizedImageGetter = cursor.GetGetter<
MLImage
>(cursor.Schema[
Dynamic\Transforms\ImageAnalytics\LoadImages.cs (2)
72
MLImage
imageObject = null;
80
var imageObjectGetter = cursor.GetGetter<
MLImage
>(cursor.Schema[
Dynamic\Transforms\ImageAnalytics\ResizeImages.cs (4)
75
MLImage
imageObject = null;
76
MLImage
resizedImageObject = null;
84
var imageObjectGetter = cursor.GetGetter<
MLImage
>(cursor.Schema[
87
var resizedImageGetter = cursor.GetGetter<
MLImage
>(cursor.Schema[
Microsoft.ML.Tests (80)
ImagesTests.cs (80)
156
var imageCropGetter = cursor.GetGetter<
MLImage
>(cropped.Schema["ImageCropped"]);
157
MLImage
image = default;
203
var imageGetter = cursor.GetGetter<
MLImage
>(grey.Schema["ImageGrey"]);
204
MLImage
image = default;
252
var
image = dataPoint.Image;
253
var
grayImage = dataPoint.GrayImage;
302
public
MLImage
Image { get; set; }
305
public
MLImage
GrayImage { get; set; }
325
Image =
MLImage
.CreateFromPixels(width, height, MLPixelFormat.Bgra32, imageData);
363
var imageGetter = cursor.GetGetter<
MLImage
>(backToImages.Schema["ImageRestored"]);
364
MLImage
restoredImage = default;
366
var imageCropGetter = cursor.GetGetter<
MLImage
>(backToImages.Schema["ImageCropped"]);
367
MLImage
croppedImage = default;
438
var imageGetter = cursor.GetGetter<
MLImage
>(backToImages.Schema["ImageRestored"]);
439
MLImage
restoredImage = default;
441
var imageCropGetter = cursor.GetGetter<
MLImage
>(backToImages.Schema["ImageCropped"]);
442
MLImage
croppedImage = default;
514
var imageGetter = cursor.GetGetter<
MLImage
>(backToImages.Schema["ImageRestored"]);
515
MLImage
restoredImage = default;
517
var imageCropGetter = cursor.GetGetter<
MLImage
>(backToImages.Schema["ImageCropped"]);
518
MLImage
croppedImage = default;
589
var imageGetter = cursor.GetGetter<
MLImage
>(backToImages.Schema["ImageRestored"]);
590
MLImage
restoredImage = default;
592
var imageCropGetter = cursor.GetGetter<
MLImage
>(backToImages.Schema["ImageCropped"]);
593
MLImage
croppedImage = default;
664
var imageGetter = cursor.GetGetter<
MLImage
>(backToImages.Schema["ImageRestored"]);
665
MLImage
restoredImage = default;
667
var imageCropGetter = cursor.GetGetter<
MLImage
>(backToImages.Schema["ImageCropped"]);
668
MLImage
croppedImage = default;
740
var imageGetter = cursor.GetGetter<
MLImage
>(backToImages.Schema["ImageRestored"]);
741
MLImage
restoredImage = default;
743
var imageCropGetter = cursor.GetGetter<
MLImage
>(backToImages.Schema["ImageCropped"]);
744
MLImage
croppedImage = default;
815
var imageGetter = cursor.GetGetter<
MLImage
>(backToImages.Schema["ImageRestored"]);
816
MLImage
restoredImage = default;
818
var imageCropGetter = cursor.GetGetter<
MLImage
>(backToImages.Schema["ImageCropped"]);
819
MLImage
croppedImage = default;
891
var imageGetter = cursor.GetGetter<
MLImage
>(backToImages.Schema["ImageRestored"]);
892
MLImage
restoredImage = default;
894
var imageCropGetter = cursor.GetGetter<
MLImage
>(backToImages.Schema["ImageCropped"]);
895
MLImage
croppedImage = default;
965
var imageGetter = cursor.GetGetter<
MLImage
>(backToImages.Schema["ImageRestored"]);
966
MLImage
restoredImage = default;
968
var imageCropGetter = cursor.GetGetter<
MLImage
>(backToImages.Schema["ImageCropped"]);
969
MLImage
croppedImage = default;
1028
using (
var
image = (
MLImage
)rowView.First().Values.Last().Value)
1123
public
MLImage
LoadedImage;
1165
private static
MLImage
LoadImageFromFile(string imagePath) =>
MLImage
.CreateFromFile(imagePath);
1171
public
MLImage
ResizedImage;
1189
var
resizedImage = (
MLImage
)rowView.First().Values.Last().Value;
1234
using
MLImage
image1 =
MLImage
.CreateFromFile(dataFile);
1236
using
MLImage
image2 =
MLImage
.CreateFromStream(imageStream);
1253
using
MLImage
image3 =
MLImage
.CreateFromPixels(image1.Width, image1.Height, image1.PixelFormat, image1.Pixels);
1264
Assert.Throws<ArgumentNullException>(() =>
MLImage
.CreateFromFile(null));
1265
Assert.Throws<ArgumentException>(() =>
MLImage
.CreateFromFile("This is Invalid Path"));
1266
Assert.Throws<ArgumentNullException>(() =>
MLImage
.CreateFromStream(null));
1267
Assert.Throws<ArgumentException>(() =>
MLImage
.CreateFromStream(new MemoryStream(new byte[10])));
1268
Assert.Throws<ArgumentException>(() =>
MLImage
.CreateFromPixels(10, 10, MLPixelFormat.Unknown, Array.Empty<byte>()));
1269
Assert.Throws<ArgumentException>(() =>
MLImage
.CreateFromPixels(10, 10, MLPixelFormat.Bgra32, Array.Empty<byte>()));
1270
Assert.Throws<ArgumentException>(() =>
MLImage
.CreateFromPixels(0, 10, MLPixelFormat.Bgra32, new byte[10]));
1271
Assert.Throws<ArgumentException>(() =>
MLImage
.CreateFromPixels(10, 0, MLPixelFormat.Bgra32, new byte[10]));
1272
Assert.Throws<ArgumentException>(() =>
MLImage
.CreateFromPixels(10, 10, MLPixelFormat.Bgra32, new byte[401]));
1280
using
MLImage
image1 =
MLImage
.CreateFromFile(dataFile);
1290
using
MLImage
image2 =
MLImage
.CreateFromFile(imageTempPath);
1309
MLImage
image =
MLImage
.CreateFromPixels(10, 10, MLPixelFormat.Bgra32, new byte[10 * 10 * 4]);
1333
using
MLImage
image1 =
MLImage
.CreateFromFile(imageFile);
1337
MLImage
image2 =
MLImage
.CreateFromStream(stream);
1345
image2 =
MLImage
.CreateFromStream(nonSeekableStream);
1368
image2 =
MLImage
.CreateFromStream(ms);
Microsoft.ML.TorchSharp (18)
AutoFormerV2\ObjectDetectionTrainer.cs (18)
291
var imageGetter = cursor.GetGetter<
MLImage
>(input.Schema[Parent.Option.ImageColumnName]);
322
ValueGetter<
MLImage
> imageGetter,
364
private (Tensor image, Tensor Label) PrepareData(ValueGetter<VBuffer<uint>> labelGetter, ValueGetter<
MLImage
> imageGetter, ValueGetter<VBuffer<float>> boundingBoxGetter)
368
MLImage
image = default;
494
if (imageCol.ItemType.RawType != typeof(
MLImage
))
806
ValueGetter<
MLImage
> getImage = default;
808
getImage = input.GetGetter<
MLImage
>(input.Schema[_parent.Options.ImageColumnName]);
810
MLImage
image = default;
830
ValueGetter<
MLImage
> getImage = default;
832
getImage = input.GetGetter<
MLImage
>(input.Schema[_parent.Options.ImageColumnName]);
834
MLImage
image = default;
854
ValueGetter<
MLImage
> getImage = default;
856
getImage = input.GetGetter<
MLImage
>(input.Schema[_parent.Options.ImageColumnName]);
858
MLImage
image = default;
900
private Tensor PrepInputTensors(ref
MLImage
image, ValueGetter<
MLImage
> imageGetter)
963
private protected void UpdateCacheIfNeeded(long position, TensorCacher outputCache, ref
MLImage
image, ref ValueGetter<
MLImage
> getImage)