Coach-ML 0.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Coach-ML --version 0.0.1
NuGet\Install-Package Coach-ML -Version 0.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Coach-ML" Version="0.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Coach-ML --version 0.0.1
#r "nuget: Coach-ML, 0.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Coach-ML as a Cake Addin
#addin nuget:?package=Coach-ML&version=0.0.1

// Install Coach-ML as a Cake Tool
#tool nuget:?package=Coach-ML&version=0.0.1

Coach .NET Core SDK

Coach is an end-to-end Image Recognition platform, we provide the tooling to do effective data collection, training, and on-device parsing of Image Recognition models.

The .NET SDK interacts with the Coach web API in order to download and parse your trained Coach models.

Installation

Install and update from NuGet

dotnet add package Coach-ML

Usage

Coach can be initialized 2 different ways. If you are only using the offline model parsing capabilities and already have a model package on disk, you can initialize like so:

var coach = new CoachClient();

// We already had the `flowers` model on disk, no need to authenticate:
var prediction = coach.GetModel("flowers").Predict("rose.jpg").Best();
Console.WriteLine($"{prediction.Label}: {prediction.Confidence}");

However, in order to download your trained models, you must authenticate with your API key:

var coach = new CoachClient().Login("myapikey");

// Now that we're authenticated, we can cache our models for future use:
await coach.CacheModel("flowers");

// Evaluate with our cached model:
var results = coach.GetModel("flowers").Predict("rose.jpg");
var bestMatch = results.Best();

Another, more concise example not using caching:

var coach = new CoachClient().Login("myapikey");
var prediction = await coach.GetModelRemote("flowers").Predict("rose.jpg").Best();

API Breakdown

CoachClient

CoachClient(bool isDebug = false) Optional isDebug, if true, additional logs will be displayed.

async Task<CoachClient> Login(string apiKey)
Authenticates with Coach service and allows for model caching. Accepts API Key as its only parameter. Returns its instance of CoachClient.

async Task CacheModel(string name, string path=".") Downloads model from Coach service to disk. Specify the name of the model, and the path to store it. This will create a new directory in the specified path and store any model related documents there. By default it will skip the download if the local version of the model matches the remote.

CoachModel GetModel(string path) Loads model into memory. Specify the path of the cached models directory.

async Task<CoachModel> GetModelRemote(string name, string path=".") Downloads model from Coach service to disk, and loads it into memory.

CoachModel

CoachModel(TFGraph graph, string[] labels, string module, float coachVersion) Initializes a new instance of CoachModel.

CoachResult Predict(string image, string inputName = "input", string outputName = "output")
Specify the directory of an image file. Parses the specified image as a Tensor and runs it through the loaded model. Optionally accepts input and output tensor names.

CoachResult Predict(byte[] image, string inputName = "input", string outputName = "output") Specify the image as a byte array. Parses the specified image as a Tensor and runs it through the loaded model. Optionally accepts input and output tensor names.

CoachResult

List<LabelProbability> Results Unsorted prediction results.

List<LabelProbability> SortedResults Sorted prediction results, descending in Confidence.

LabelProbability Best() Most Confident result.

LabelProbability Worst() Least Confident result.

LabelProbability

string Label → Label of result

float Confidence → Confidence of result

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.2 is compatible.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.0.3 613 9/22/2019
0.0.2 477 8/12/2019
0.0.1 484 7/25/2019