BlazeFace full-range (GGUF)

Google's MediaPipe BlazeFace full-range face detector, converted to a GGUF file that LM-Kit runs natively on the CPU, with no ONNX Runtime and no TensorFlow.

For each face it returns a box, a confidence and six landmarks: both eyes, the nose tip, the mouth center and both ear tragions. Full-range is the BlazeFace variant made for faces at any distance from the camera (group photos, people further away), not only selfies.

File blazeface-full-range.gguf (2.08 MB, float32)
Parameters 514,069
Input 192 x 192 RGB, letterboxed, normalized to [-1, 1]
Outputs 2,304 anchors (48 x 48 grid): box, 6 keypoints, score
License Apache 2.0, the license Google publishes the weights under

Use with LM-Kit .NET

using LMKit.Media.Image;
using LMKit.Model;
using LMKit.Vision;

var detector = new FaceDetector(LM.LoadFromModelID("blazeface-full-range"));

using var image = ImageBuffer.Load("team.jpg");

foreach (DetectedFace face in detector.Detect(image))
{
    Console.WriteLine($"{face.Bounds} {face.Confidence:P0}");
}

The network sees a face only above about 5 % of the image it reads. LM-Kit reads the whole image, then overlapping tiles of it as fine as FaceDetector.MinimumFaceSize asks for, and merges the detections of every window into one per face, so small faces in a group photo are found too.

Provenance and conversion

  • Source: face_detection_full_range.tflite from MediaPipe (https://storage.googleapis.com/mediapipe-assets/face_detection_full_range.tflite), SHA-256 3698b18f063835bc609069ef052228fbe86d9c9a6dc8dcb7c7c2d69aed2b181b. The weights are the original ones, unchanged: no fine-tuning, no quantization.
  • TFLite to ONNX with tflite2onnx 0.4.1, then ONNX to GGUF with LM-Kit's converter, which stores the network as a program of operations (convolution, ReLU, addition, max pooling, channel padding, bilinear resize) and its decoder (anchors, box and keypoint layout, score function, default thresholds) as metadata. The file records both hashes (general.source.sha256, lmkit-face.converter.source_sha256).

Fidelity

The LM-Kit runtime was compared with Google's own runtime (LiteRT running the original .tflite) and with ONNX Runtime running the converted ONNX, on the same 44 inputs (30 random, 14 photos):

Compared with Largest box difference Largest score difference (logit) Faces gained or lost at 0.5
ONNX Runtime 1.07e-4 9.06e-6 0
LiteRT (original .tflite) 1.53e-4 1.24e-5 0

Floating-point engines never agree bit for bit (they sum in different orders), so the guarantee is the one that matters: the same faces, and boxes that agree to a ten-thousandth of an input pixel.

Intended use and limits

From Google's model card: the model detects faces in images and video frames, is meant for faces that occupy at least about 5 % of the image (LM-Kit's tiling extends this down to a configurable size), and was evaluated across geographic subregions, skin tones and genders. See the model card linked from the MediaPipe face detector documentation for its training data and fairness evaluation. It finds faces; it does not recognize who they are.

Downloads last month
167
GGUF
Model size
514k params
Architecture
lmkit-face
Hardware compatibility
Log In to add your hardware

We're not able to determine the quantization variants.

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support