MediaPipe SSD-MobileNet-V2 (Object Detector)

SSD-MobileNet-V2 object detection model(s) (ssd_mobilenet_v2_float16.tflite [5.9 MB], _float32.tflite [11.3 MB]) trained on COCO (1.5M instances, 80 classes / 90 COCO label slots) and packaged with TFLITE_METADATA and embedded labels for the MediaPipe Object Detector (ObjectDetector) task and LiteRT.

Documentation: MediaPipe Object Detector Docs

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

Try live: Web Demo

SSD-MobileNet-V2 combines a MobileNetV2 backbone with an SSD detection head at 256 x 256 input resolution, prioritizing lower latency and memory footprint over EfficientDet.

Input resolution is 256 x 256 RGB. Unlike EfficientDet-Lite (90 lines), ssd_mobilenet_v2_*.tflite embeds a 91-line labels.txt (index 0 is background, followed by the 90 COCO slots matching [1, 12276, 91]).

For standalone reference, this repository includes the official MediaPipe labelmap.txt (90 lines, person through toothbrush).

Files

File in Repo Root Upstream Google Path Precision Size SHA-256
ssd_mobilenet_v2_float16.tflite object_detector/ssd_mobilenet_v2/float16/latest/ssd_mobilenet_v2.tflite float16 5.92 MB (5,918,749 B) ee21e12bfdc464100c6008c865ab8294f6a04162e6ed2e11986f1175b02cfab2
ssd_mobilenet_v2_float32.tflite object_detector/ssd_mobilenet_v2/float32/latest/ssd_mobilenet_v2.tflite float32 11.32 MB (11,316,189 B) b8ccb1a25d45455ba52e85f26531948e1cb75efeb94c7c3d456d54fd4d6fbdd2

Companion Files in Repo Root

File Role Size SHA-256
labelmap.txt Label map 0.7 KB (661 B) f8803ef7900160c629d570848dfda4175e21667bf7b71f73f8ece4938c9f2bf2

Download

pip install -U huggingface_hub
hf download litert-community/MediaPipe-ObjectDetector-SSD-MobileNet-V2 ssd_mobilenet_v2_float16.tflite --local-dir .
hf download litert-community/MediaPipe-ObjectDetector-SSD-MobileNet-V2 ssd_mobilenet_v2_float32.tflite --local-dir .

Inputs, Outputs, and Model Specifications

ssd_mobilenet_v2_float16.tflite

  • Embedded TFLITE_METADATA: name ObjectDetector · version 1 · author MediaPipe · packed associated files: labels.txt
Direction Tensor Shape Type Notes
Input serving_default_inputs:0 [1, 256, 256, 3] float32 image — Input image to be processed. — Normalization: mean=[127.5], std=[127.5]
Output StatefulPartitionedCall:0 [1, 12276, 4] float32 location — The locations of the detected boxes.
Output StatefulPartitionedCall:1 [1, 12276, 91] float32 score — The scores of the detected boxes. — Labels: labels.txt

ssd_mobilenet_v2_float32.tflite

  • Embedded TFLITE_METADATA: name ObjectDetector · version 1 · author MediaPipe · packed associated files: labels.txt
Direction Tensor Shape Type Notes
Input serving_default_inputs:0 [1, 256, 256, 3] float32 image — Input image to be processed. — Normalization: mean=[127.5], std=[127.5]
Output StatefulPartitionedCall:0 [1, 12276, 4] float32 location — The locations of the detected boxes.
Output StatefulPartitionedCall:1 [1, 12276, 91] float32 score — The scores of the detected boxes. — Labels: labels.txt

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-ObjectDetector-SSD-MobileNet-V2",
    filename="ssd_mobilenet_v2_float16.tflite",
)

BaseOptions = mp.tasks.BaseOptions
ObjectDetector = mp.tasks.vision.ObjectDetector
ObjectDetectorOptions = mp.tasks.vision.ObjectDetectorOptions
VisionRunningMode = mp.tasks.vision.RunningMode

options = ObjectDetectorOptions(
    base_options=BaseOptions(model_asset_path=model_path),
    running_mode=VisionRunningMode.IMAGE,
    score_threshold=0.5,
    max_results=5,
)

with ObjectDetector.create_from_options(options) as runner:
    mp_image = mp.Image.create_from_file("input.jpg")
    result = runner.detect(mp_image)
    for det in result.detections:
        cat = det.categories[0]
        print(f"{cat.category_name}: {cat.score:.3f} box={det.bounding_box}")

Cross-Platform Guides & Samples

Latency Benchmarks

End-to-end MediaPipe Task pipeline average latency reported by the Object Detector documentation:

Model Variant Device CPU Latency GPU Latency
SSD MobileNetV2 (float 16) Pixel 6 37.35 ms 28.16 ms
SSD MobileNetV2 (float 32) Pixel 6 36.30 ms 24.01 ms

Intended Use, Limitations, and Fairness

  • Intended applications: General-purpose multi-object localization and classification across common COCO categories (people, vehicles, animals, household items, food, etc.) in still images, video, and camera streams.
  • Limitations & considerations:
    • Closed-vocabulary COCO detector (80 active object classes); objects outside COCO cannot be named.
    • Small objects, heavy occlusion, motion blur, or non-natural camera angles reduce detection recall.
    • Not intended for safety-critical perception (autonomous driving, medical imaging, surveillance) without domain-specific fine-tuning and evaluation.
    • Google does not publish a separate standalone fairness PDF for this model on the MediaPipe documentation page.

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
ssd_mobilenet_v2_float16.tflite ssd_mobilenet_v2.tflite 1683072060421733 Wed, 03 May 2023 00:01:00 GMT /1/
ssd_mobilenet_v2_float32.tflite ssd_mobilenet_v2.tflite 1683072058863267 Wed, 03 May 2023 00:00:58 GMT /1/

License and Citation

  • License: apache-2.0 — Distributed under Apache License, Version 2.0 alongside the MediaPipe release artifacts.

Citation

@inproceedings{liu2016ssd,
  title     = {SSD: Single Shot MultiBox Detector},
  author    = {Liu, Wei and Anguelov, Dragomir and Erhan, Dumitru and Szegedy, Christian and Reed, Scott and Fu, Cheng-Yang and Berg, Alexander C.},
  booktitle = {European Conference on Computer Vision (ECCV)},
  year      = {2016},
  url       = {https://arxiv.org/abs/1512.02325}
}
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Collection including litert-community/MediaPipe-ObjectDetector-SSD-MobileNet-V2

Paper for litert-community/MediaPipe-ObjectDetector-SSD-MobileNet-V2