Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const int ImageHeight = 224;
- const int ImageWidth = 224;
- var pipeline = new ImageLoadingEstimator(_mlContext, string.Empty, ("ImageData", "ImagePath"))
- .Append(_mlContext.Transforms.Resize("ImageResized", imageWidth: ImageWidth, imageHeight: ImageHeight, inputColumnName: "ImageData"))
- .Append(_mlContext.Transforms.ExtractPixels(new ColumnInfo("input", "ImageResized", colors: ColorBits.Rgb, interleave:true, asFloat: true, offset: 128f, scale: 1 /255f)))
- .Append(new TensorFlowEstimator(_mlContext, new string[] { @"MobilenetV2/Predictions/Reshape_1" }, new string[] { "input" }, _modelFilePath))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement