Skip to content

Instantly share code, notes, and snippets.

@olokobayusuf
Created September 28, 2021 14:14
Embed
What would you like to do?
// Fetch the MediaPipe BlazeFace model data from Hub
var modelData = await MLModelData.FromHub("@natsuite/blazeface");
// Deserialize the model
var model = modelData.Deserialize();
// Create a BlazeFace predictor
var predictor = new BlazeFacePredictor(model);
// Detect faces in an image
Texture2D image = ...;
Rect[] faces = predictor.Predict(image);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment