Realtime object classification machine learning model optimized for mobile applications.
Add the following items to your Unity project's Packages/manifest.json
:
{
"scopedRegistries": [
{
"name": "NatML",
"url": "https://registry.npmjs.com",
"scopes": ["ai.natml"]
}
],
"dependencies": {
"ai.natml.vision.mobilenet-v2": "1.0.4"
}
}
First, create the MobileNet v2 predictor:
// Create the MobileNet v2 predictor
var predictor = await MobileNetv2Predictor.Create();
Then make predictions on images:
// Given an image...
Texture2D image = ...;
// Classify the image
MobileNetv2Predictor.Label result = predictor.Predict(image);
// Use the result
Debug.Log($"Model predicted {result.label} with confidence {result.confidence}");
- Unity 2022.3+
- Join the NatML community on Discord.
- Discover more ML models on NatML Hub.
- See the NatML documentation.
- Contact us at hi@natml.ai.
Thank you very much!