Instructions to use litert-community/MediaPipe-ObjectDetector-EfficientDet-Lite0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT
How to use litert-community/MediaPipe-ObjectDetector-EfficientDet-Lite0 with LiteRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
MediaPipe EfficientDet-Lite0 (Object Detector)
EfficientDet-Lite0 object detection model(s) (efficientdet_lite0_int8.tflite [4.6 MB], _float16.tflite [7.3 MB], _float32.tflite [13.8 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
EfficientDet-Lite0 combines an EfficientNet-Lite0 backbone with a BiFPN feature network and shared box/class predictor heads. Recommended default for balancing latency, compact size, and COCO accuracy.
Input resolution is 320 x 320 RGB. Each .tflite embeds the 90-line COCO labels.txt directly in TFLITE_METADATA ([1, 19206, 90] class scores).
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 |
|---|---|---|---|---|
efficientdet_lite0_int8.tflite |
object_detector/efficientdet_lite0/int8/latest/efficientdet_lite0.tflite |
int8 |
4.60 MB (4,602,795 B) | 0720bf247bd76e6594ea28fa9c6f7c5242be774818997dbbeffc4da460c723bb |
efficientdet_lite0_float16.tflite |
object_detector/efficientdet_lite0/float16/latest/efficientdet_lite0.tflite |
float16 |
7.25 MB (7,254,339 B) | 4b59100025bea1235a84c1038879a6cccc9f6c49f5e41144e91e74d99e780993 |
efficientdet_lite0_float32.tflite |
object_detector/efficientdet_lite0/float32/latest/efficientdet_lite0.tflite |
float32 |
13.84 MB (13,836,895 B) | 40338edf5ec70d43e318b0a716a84d4564cd1802759a7a07170c7e43796dbf58 |
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-EfficientDet-Lite0 efficientdet_lite0_int8.tflite --local-dir .
hf download litert-community/MediaPipe-ObjectDetector-EfficientDet-Lite0 efficientdet_lite0_float16.tflite --local-dir .
hf download litert-community/MediaPipe-ObjectDetector-EfficientDet-Lite0 efficientdet_lite0_float32.tflite --local-dir .
Inputs, Outputs, and Model Specifications
efficientdet_lite0_int8.tflite
- Embedded
TFLITE_METADATA: nameObjectDetector· version1· authorMediaPipe· packed associated files:labels.txt
| Direction | Tensor | Shape | Type | Notes |
|---|---|---|---|---|
| Input | serving_default_images:0 |
[1, 320, 320, 3] |
uint8 |
image — Input image to be processed. — Normalization: mean=[127.5], std=[127.5] — Quantization: scale=0.0078125, zero_point=127 |
| Output | StatefulPartitionedCall:1 |
[1, 19206, 90] |
float32 |
score — The scores of the detected boxes. — Labels: labels.txt |
| Output | StatefulPartitionedCall:0 |
[1, 19206, 4] |
float32 |
location — The locations of the detected boxes. |
efficientdet_lite0_float16.tflite
- Embedded
TFLITE_METADATA: nameObjectDetector· version1· authorMediaPipe· packed associated files:labels.txt
| Direction | Tensor | Shape | Type | Notes |
|---|---|---|---|---|
| Input | serving_default_images:0 |
[1, 320, 320, 3] |
float32 |
image — Input image to be processed. — Normalization: mean=[127.5], std=[127.5] |
| Output | StatefulPartitionedCall:1 |
[1, 19206, 90] |
float32 |
score — The scores of the detected boxes. — Labels: labels.txt |
| Output | StatefulPartitionedCall:0 |
[1, 19206, 4] |
float32 |
location — The locations of the detected boxes. |
efficientdet_lite0_float32.tflite
- Embedded
TFLITE_METADATA: nameObjectDetector· version1· authorMediaPipe· packed associated files:labels.txt
| Direction | Tensor | Shape | Type | Notes |
|---|---|---|---|---|
| Input | serving_default_images:0 |
[1, 320, 320, 3] |
float32 |
image — Input image to be processed. — Normalization: mean=[127.5], std=[127.5] |
| Output | StatefulPartitionedCall:1 |
[1, 19206, 90] |
float32 |
score — The scores of the detected boxes. — Labels: labels.txt |
| Output | StatefulPartitionedCall:0 |
[1, 19206, 4] |
float32 |
location — The locations of the detected boxes. |
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-EfficientDet-Lite0",
filename="efficientdet_lite0_int8.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
- Task overview & options: Object Detector documentation
- Platform setup guides: Python · Web / JavaScript · Android (Kotlin / Java) · iOS (Swift) · Flutter (Dart)
- Runnable sample apps: Web Demo · Web Source · Android · iOS · Python Notebook · Flutter
Latency Benchmarks
End-to-end MediaPipe Task pipeline average latency reported by the Object Detector documentation:
| Model Variant | Device | CPU Latency | GPU Latency |
|---|---|---|---|
| EfficientDet-Lite0 (int8) | Pixel 6 | 29.31 ms | — |
| EfficientDet-Lite0 (float 16) | Pixel 6 | 53.97 ms | 27.97 ms |
| EfficientDet-Lite0 (float 32) | Pixel 6 | 61.30 ms | 27.83 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 |
|---|---|---|---|---|
efficientdet_lite0_int8.tflite |
efficientdet_lite0.tflite |
1682636015897115 |
Thu, 27 Apr 2023 22:53:35 GMT | /1/ |
efficientdet_lite0_float16.tflite |
efficientdet_lite0.tflite |
1682636014261146 |
Thu, 27 Apr 2023 22:53:34 GMT | /1/ |
efficientdet_lite0_float32.tflite |
efficientdet_lite0.tflite |
1682636012507767 |
Thu, 27 Apr 2023 22:53:32 GMT | /1/ |
License and Citation
- License:
apache-2.0— Distributed under Apache License, Version 2.0 alongside the MediaPipe release artifacts.
Citation
@inproceedings{tan2020efficientdet,
title = {EfficientDet: Scalable and Efficient Object Detection},
author = {Tan, Mingxing and Pang, Ruoming and Le, Quoc V.},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
year = {2020}
}
- Downloads last month
- -