MediaPipe BlazeFace Sparse (Full-Range)

Full-range single-shot face detector (blaze_face_full_range_sparse.tflite, 680 KB, FP16 weights) optimized for full-range smartphone camera images (such as back-facing cameras within β‰ˆ5 meters), packaged for the MediaPipe Face Detector (FaceDetector) task and LiteRT.

Documentation: MediaPipe Face Detector Docs

Samples: Android Β· iOS Β· Python Colab Β· Web Β· Flutter

Try live: Web Demo

BlazeFace Sparse (full-range) applies structured weight pruning (β‰ˆ70% zeros in most 1x1 convolutions) to the CenterNet-like full-range BlazeFace detector, cutting binary size by β‰ˆ60% while keeping full-range (β‰ˆ5 m) support.

For each detected face, the MediaPipe FaceDetector task decodes the raw anchor predictions and applies Non-Maximum Suppression (NMS) to return:

  • Axis-aligned bounding box (origin_x, origin_y, width, height in pixels)
  • 6 approximate 2D facial keypoints normalized to [0.0, 1.0] (left_eye, right_eye, nose_tip, mouth, left_eye_tragion, right_eye_tragion from the observer's perspective)
  • Detection confidence score in [0.0, 1.0]

Expects a [1, 192, 192, 3] float32 RGB input normalized to [-1.0, 1.0] (resizing and normalization are handled automatically by MediaPipe FaceDetector).

Files

File Precision Size SHA-256
blaze_face_full_range_sparse.tflite float16 676.7 KB (676,746 B) 2c3728e6da56f21e21a320433396fb06d40d9088f2247c05e5635a688d45dfe1

Companion Files in Repo Root

File Role Size SHA-256
MediaPipe BlazeFace Sparse Model Card (Full Range).pdf Upstream Google model card (PDF) 427.3 KB (427,312 B) 4cdd65ecd8850c42b1cebcc2ddc70592c0682f7e96a71ef54e578d0735c067fb

Download

pip install -U huggingface_hub
hf download litert-community/MediaPipe-FaceDetector-BlazeFace-Full-Range-Sparse blaze_face_full_range_sparse.tflite --local-dir .

Inputs, Outputs, and Model Specifications

blaze_face_full_range_sparse.tflite

  • Embedded TFLITE_METADATA: name Full Range Face Detection
Direction Tensor Shape Type Notes
Input input_1 [1, 192, 192, 3] float32 image β€” Input image to be detected β€” Normalization: mean=[127.5], std=[127.5]
Output Identity [1, 2304, 16] float32 raw boxes/keypoints β€” Undecoded face bboxes location and keypoints
Output Identity_1 [1, 2304, 1] float32 scores β€” Scores of the detected bboxes.

Use with MediaPipe Tasks

Python Quickstart

pip install -U mediapipe huggingface_hub
import mediapipe as mp
from huggingface_hub import hf_hub_download

model_path = hf_hub_download(
    repo_id="litert-community/MediaPipe-FaceDetector-BlazeFace-Full-Range-Sparse",
    filename="blaze_face_full_range_sparse.tflite",
)

BaseOptions = mp.tasks.BaseOptions
FaceDetector = mp.tasks.vision.FaceDetector
FaceDetectorOptions = mp.tasks.vision.FaceDetectorOptions
VisionRunningMode = mp.tasks.vision.RunningMode

options = FaceDetectorOptions(
    base_options=BaseOptions(model_asset_path=model_path),
    running_mode=VisionRunningMode.IMAGE,
    min_detection_confidence=0.5,
)

with FaceDetector.create_from_options(options) as runner:
    mp_image = mp.Image.create_from_file("input.jpg")
    result = runner.detect(mp_image)
    for detection in result.detections:
        bbox = detection.bounding_box
        score = detection.categories[0].score
        print(f"Face score={score:.3f} box=({bbox.origin_x}, {bbox.origin_y}, {bbox.width}, {bbox.height})")

Cross-Platform Guides & Samples

Latency Benchmarks

The MediaPipe Face Detector documentation table reports Pixel 6 latency only for BlazeFace (short-range) (2.94 ms CPU / 7.41 ms GPU). For this full-range variant, the bundled PDF model card reports: β‰ˆ90 FPS (Pixel 3 GPU), β‰ˆ165 FPS (Pixel 4 GPU), β‰ˆ50 FPS (Pixel 3 single-core CPU XNNPACK), β‰ˆ160 FPS (Pixel 4 CPU XNNPACK).

Intended Use, Limitations, and Fairness

Summarized from the bundled MediaPipe BlazeFace Sparse Model Card (Full Range).pdf (Valentin Bazarevsky, Artsiom Ablavatski & Yury Kartynnik, Google, March 31, 2021):

  • Intended applications: Detecting prominently displayed faces in images or videos captured by front- and back-facing smartphone cameras for live perception pipelines, mobile AR, and UI enhancements (e.g., auto-zoom / AutoFlip).
  • Operating envelope: Designed for faces up to β‰ˆ5 meters from the camera, where face bounding box sides are at least 5% of the image dimensions, at least 70% of the face box lies inside the frame, roll/pitch angles are within Β±45Β°, and yaw is within Β±90Β°.
  • Out-of-scope uses:
    • Any form of surveillance or identity recognition is explicitly out of scope and not enabled by this technology.
    • Human life-critical decisions.
    • Counting people in crowds, detecting faces > 5 meters away, or detecting individuals looking away / back of the head.
  • Known limitations: Produces up to a fixed detection cap (e.g., 10) even when more people are present; low light, sensor noise, motion blur, or face occlusion can reduce quality and increase inter-frame jitter.
  • Fairness evaluation (summary): Evaluated across 17 UN geographic subregions (Dataset I: 1,060 images, 60/region + 40 no-face), perceived gender presentation (Dataset II: 1,000 single-face images, 500 feminine / 500 masculine), and 5 Fitzpatrick-aligned skin-tone groups (Dataset III: 500 images, 100/group): average recall 98.7% across genders (99.2% vs. 98.2%), 98.2% across skin tones (97%–100%), 98.8% across subregions (95%–100%); average precision 99.6% across genders, 99% across skin tones (98%–100%), 82.9% across subregions (81.7%–83.3%).

Provenance

Every model binary in this repository is byte-identical (unmodified FlatBuffer weights and embedded TFLITE_METADATA bytes) to the official artifact served by Google from storage.googleapis.com/mediapipe-models.

Repo File Upstream URL GCS Generation Upstream Last-Modified Pinned Bucket Version
blaze_face_full_range_sparse.tflite blaze_face_full_range_sparse.tflite 1773262428754019 Wed, 11 Mar 2026 20:53:48 GMT /1/

License and Citation

  • License: apache-2.0 β€” Stated as Apache License, Version 2.0 in the bundled upstream Google model-card PDF.

Citation

@inproceedings{bazarevsky2019blazeface,
  title     = {BlazeFace: Sub-millisecond Neural Face Detection on Mobile GPUs},
  author    = {Bazarevsky, Valentin and Kartynnik, Yury and Vakunov, Andrey and Raveendran, Karthik and Grundmann, Matthias},
  booktitle = {CVPR Workshop on Computer Vision for Augmented and Virtual Reality},
  year      = {2019},
  url       = {https://arxiv.org/abs/1907.05047}
}
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Collection including litert-community/MediaPipe-FaceDetector-BlazeFace-Full-Range-Sparse

Paper for litert-community/MediaPipe-FaceDetector-BlazeFace-Full-Range-Sparse