1.0.8 • Published 9 months ago
ai.natml.vision.blazeface v1.0.8
BlazeFace
MediaPipe BlazeFace for realtime face detection in Unity Engine with NatML.
Installing BlazeFace
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.blazeface": "1.0.7"
}
}
Detecting Faces in an Image
First, create the BlazeFace predictor:
// Create the BlazeFace predictor
var predictor = await BlazeFacePredictor.Create();
Then detect faces in the image:
// Create image feature
Texture2D image = ...;
// Detect faces
Rect[] faces = predictor.Predict(image);
Requirements
- Unity 2021.2+
Quick Tips
- Discover more ML models on NatML Hub.
- See the NatML documentation.
- Join the NatML community on Discord.
- Contact us at hi@natml.ai.
Thank you very much!