Instructions to use litert-community/MediaPipe-ObjectDetector-EfficientDet-Lite2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT
How to use litert-community/MediaPipe-ObjectDetector-EfficientDet-Lite2 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-Lite2 (Object Detector)
EfficientDet-Lite2 object detection model(s) (efficientdet_lite2_int8.tflite [7.5 MB], _float16.tflite [12.1 MB], _float32.tflite [23.1 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-Lite2 pairs a higher-capacity EfficientNet-Lite2 backbone with a 448 x 448 input resolution and BiFPN feature network for higher detection accuracy (especially on smaller objects) at higher compute and memory cost.
Input resolution is 448 x 448 RGB. Each .tflite embeds the 90-line COCO labels.txt directly in TFLITE_METADATA ([1, 37629, 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_lite2_int8.tflite |
object_detector/efficientdet_lite2/int8/latest/efficientdet_lite2.tflite |
int8 |
7.52 MB (7,515,971 B) | b3f50554cb0ea559e90328845f7d9ba4d13c8bff372914d24e06bc8bb72fa896 |
efficientdet_lite2_float16.tflite |
object_detector/efficientdet_lite2/float16/latest/efficientdet_lite2.tflite |
float16 |
12.14 MB (12,138,859 B) | 5d4ebec1029bc9907aeadb9e7b4ac9cb1da6a19d01ad375210a9ae18ba173302 |
efficientdet_lite2_float32.tflite |
object_detector/efficientdet_lite2/float32/latest/efficientdet_lite2.tflite |
float32 |
23.10 MB (23,096,891 B) | ad2abbf2b4e10585e15176fd7b5ef03c28dda959ae26fc142549fdd1814db91d |
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-Lite2 efficientdet_lite2_int8.tflite --local-dir .
hf download litert-community/MediaPipe-ObjectDetector-EfficientDet-Lite2 efficientdet_lite2_float16.tflite --local-dir .
hf download litert-community/MediaPipe-ObjectDetector-EfficientDet-Lite2 efficientdet_lite2_float32.tflite --local-dir .
Inputs, Outputs, and Model Specifications
efficientdet_lite2_int8.tflite
- Embedded
TFLITE_METADATA: nameObjectDetector· version1· authorMediaPipe· packed associated files:labels.txt
| Direction | Tensor | Shape | Type | Notes |
|---|---|---|---|---|
| Input | serving_default_images:0 |
[1, 448, 448, 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, 37629, 90] |
float32 |
score — The scores of the detected boxes. — Labels: labels.txt |
| Output | StatefulPartitionedCall:0 |
[1, 37629, 4] |
float32 |
location — The locations of the detected boxes. |
efficientdet_lite2_float16.tflite
- Embedded
TFLITE_METADATA: nameObjectDetector· version1· authorMediaPipe· packed associated files:labels.txt
| Direction | Tensor | Shape | Type | Notes |
|---|---|---|---|---|
| Input | serving_default_images:0 |
[1, 448, 448, 3] |
float32 |
image — Input image to be processed. — Normalization: mean=[127.5], std=[127.5] |
| Output | StatefulPartitionedCall:1 |
[1, 37629, 90] |
float32 |
score — The scores of the detected boxes. — Labels: labels.txt |
| Output | StatefulPartitionedCall:0 |
[1, 37629, 4] |
float32 |
location — The locations of the detected boxes. |
efficientdet_lite2_float32.tflite
- Embedded
TFLITE_METADATA: nameObjectDetector· version1· authorMediaPipe· packed associated files:labels.txt
| Direction | Tensor | Shape | Type | Notes |
|---|---|---|---|---|
| Input | serving_default_images:0 |
[1, 448, 448, 3] |
float32 |
image — Input image to be processed. — Normalization: mean=[127.5], std=[127.5] |
| Output | StatefulPartitionedCall:1 |
[1, 37629, 90] |
float32 |
score — The scores of the detected boxes. — Labels: labels.txt |
| Output | StatefulPartitionedCall:0 |
[1, 37629, 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-Lite2",
filename="efficientdet_lite2_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-Lite2 (int8) | Pixel 6 | 70.91 ms | — |
| EfficientDet-Lite2 (float 16) | Pixel 6 | 198.77 ms | 47.31 ms |
| EfficientDet-Lite2 (float 32) | Pixel 6 | 197.98 ms | 41.15 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_lite2_int8.tflite |
efficientdet_lite2.tflite |
1682636020984971 |
Thu, 27 Apr 2023 22:53:41 GMT | /1/ |
efficientdet_lite2_float16.tflite |
efficientdet_lite2.tflite |
1682636018681342 |
Thu, 27 Apr 2023 22:53:38 GMT | /1/ |
efficientdet_lite2_float32.tflite |
efficientdet_lite2.tflite |
1682636017570268 |
Thu, 27 Apr 2023 22:53:37 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
- -