BPC.GoogleAutoMLVision 1.0.0

Google AutoML Vision Client for .NET

Install-Package BPC.GoogleAutoMLVision -Version 1.0.0
dotnet add package BPC.GoogleAutoMLVision --version 1.0.0
<PackageReference Include="BPC.GoogleAutoMLVision" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BPC.GoogleAutoMLVision --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

A .NET/C# client for the Google AutoML Vision API.

Usage

Once you have uploaded a suitable set of images and trained your AutoML Vision model, you'll end up with a
model prediction endpoint.

Here's a quick snippet:

PredictResults res;
using (var imageStream = new FileStream("<<IMAGE_PATH>>", FileMode.Open)
{
  var client = new GoogleAutoMLVisionClient("<<JSON_CREDENTIALS_PATH>>");
  res = await client.Predict("<<MODEL_ENDPOINT>>", imageStream)
}
Console.WriteLine($"Your image is a {res.payload.First().displayName}");

Where:

  • <<IMAGE_PATH>> = your source image file name
  • <<JSON_CREDENTIALS_PATH>> = The Service Credential JSON file you obtained from Google Cloud IAM
  • <<MODEL_ENDPOINT>> = Your AutoML Model Endpoint

Requirements

This is a .NET Standard 2.0 project,
so it will run in any platform that supports it, namely:

  • .NET Core 2.0
  • .NET Framework 4.6.1
  • Mono 5.4
  • Xamarin.iOS 10.14
  • Xamarin.Mac 3.8
  • Xamarin.Android 8.0
  • Universal Windows Platform 10.0.16299

A .NET/C# client for the Google AutoML Vision API.

Usage

Once you have uploaded a suitable set of images and trained your AutoML Vision model, you'll end up with a
model prediction endpoint.

Here's a quick snippet:

PredictResults res;
using (var imageStream = new FileStream("<<IMAGE_PATH>>", FileMode.Open)
{
  var client = new GoogleAutoMLVisionClient("<<JSON_CREDENTIALS_PATH>>");
  res = await client.Predict("<<MODEL_ENDPOINT>>", imageStream)
}
Console.WriteLine($"Your image is a {res.payload.First().displayName}");

Where:

  • <<IMAGE_PATH>> = your source image file name
  • <<JSON_CREDENTIALS_PATH>> = The Service Credential JSON file you obtained from Google Cloud IAM
  • <<MODEL_ENDPOINT>> = Your AutoML Model Endpoint

Requirements

This is a .NET Standard 2.0 project,
so it will run in any platform that supports it, namely:

  • .NET Core 2.0
  • .NET Framework 4.6.1
  • Mono 5.4
  • Xamarin.iOS 10.14
  • Xamarin.Mac 3.8
  • Xamarin.Android 8.0
  • Universal Windows Platform 10.0.16299

Release Notes

Initial Release

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.0 255 12/11/2018