Created
April 24, 2021 20:22
-
-
Save olokobayusuf/850551b4b4969d908622fe1c947c2dc1 to your computer and use it in GitHub Desktop.
Modules which simplify model usage in NatML.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create a classifier module | |
var labels = new [] { "goldfish", "tiger shark", ... }; | |
var classifier = new MLClassifier("/path/to/classifier.onnx", labels); | |
// Classify an image | |
Texture2D image = ...; | |
var (label, confidence) = classifier.Predict(image); | |
Debug.Log($"Image contains {label} with confidence: {confidence}"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment