MLClassificationPredictor

class NatSuite.ML.Vision.MLClassificationPredictor

The MLClassificationPredictor class computes the most-likely class label on an image feature:

Classification predictor running on NatDevice camera stream.

Creating the Predictor

/// <summary>
/// Create a classification predictor.
/// </summary>
/// <param name="model"></param>
/// <param name="labels">Classification labels.</param>
MLClassificationPredictor (MLModel model, string[] labels);

The predictor is created with a classification MLModel along with an array of class labels which the model is trained to predict.

Inspecting Labels

/// <summary>
/// Classification labels.
/// </summary>
string[] labels { get; }

The predictor exposes the array of class labels provided to it.

Classifying Images

/// <summary>
/// Classify a feature.
/// This will return the most-likely label along with the confidence score.
/// </summary>
/// <param name="inputs">Input feature.</param>
/// <returns>Output label along with unnormalized confidence value.</returns>
(string label, float confidence) Predict (params MLFeature[] inputs);

INCOMPLETE.