Instructions to use nxp/efficientdet-lite0-imx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT
How to use nxp/efficientdet-lite0-imx 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
EfficientDet-lite0
Overview
EfficientDet [2] is a family of scalable and efficient object detection models. It is built on top of the EfficientNet [3] backbone and introduces a weighted bi-directional feature pyramid network (BiFPN) for fast, multi-scale feature fusion, together with a compound scaling method that jointly scales the backbone, feature network, and prediction heads.
EfficientDet-lite0 is the smallest, mobile-friendly member of the family, designed for fast object detection on resource-constrained edge devices. Given a 320x320 RGB image, it detects objects from 80 COCO categories and returns decoded, non-maximum-suppressed bounding boxes, classes and scores directly from the graph.
This repository contains the EfficientDet-lite0 model quantized to int8 and compiled for NXP i.MX 8M Plus,
i.MX 93, i.MX 95, and i.MX 952 processors. It also contains the script used to regenerate these assets
(recipe.sh) and an inference example (example.py).
Key Features
- Lightweight EfficientNet-lite0 backbone with a BiFPN feature network
- 80-class COCO object detection at 320x320 input resolution
- ~3.2M parameters, ~1.9 G FLOPS
- Non-maximum suppression (NMS) is kept in-graph, so the model directly returns decoded detections
- int8 quantized (uint8 input) for accelerated NPU inference on NXP i.MX platforms
Model Description
This is a quantized and compiled version of EfficientDet-lite0, optimized for NXP i.MX 8M Plus, i.MX 93, i.MX 95, and i.MX 952 processors.
- Base Model: EfficientDet (google/automl)
- Original Model Authors: Mingxing Tan, Ruoming Pang, Quoc V. Le (Google Brain / The TensorFlow Authors)
- Original License: Apache-2.0
- Modified by: NXP
Modifications
This model is a derivative work with the following changes from the original:
- Quantization: The int8 TFLite model (uint8 input) is downloaded directly from the pre-quantized Kaggle checkpoint published by the TensorFlow authors; no local re-quantization is performed.
- Compilation (i.MX 93): Compiled for i.MX 93 with the Ethos-U65 NPU using
Vela, tags
lf-6.18.20_2.0.0andlf-6.18.37_2.1.0. ~97.7% of operators map to the NPU; the remaining 6 operators (the in-graph detection post-processing / NMS custom op and surrounding dequantize/resize ops) run on the CPU. - Conversion (i.MX 95 / i.MX 952): Converted with the eIQ Neutron SDK versions
3.1.3,3.2.1, and3.2.3.
Original model available at: EfficientDet (google/automl).
Model Information
| Information | Value |
|---|---|
| Input shape | RGB image (1, 320, 320, 3), uint8 |
| Input example | (Image source, Public domain) |
| Output shape | Four float32 tensors: boxes (1, 25, 4), classes (1, 25), scores (1, 25), count (1,). Boxes are normalized [ymin, xmin, ymax, xmax] in the [0, 1] range and must be scaled back to the original image size (see example.py). |
| Output example | ![]() |
| Output labels | 80 COCO classes, see coco_labels_list.txt |
| FLOPS | 1.9 G |
| Number of parameters | 3.2 M |
| File size (int8) | 4.35 MB (assets/quantized_tflite_model/efficientdet-lite0_quant_int8.tflite) |
| Source framework | TensorFlow |
Supported Hardware and Software Configurations
All models run with the eIQ LiteRT (TensorFlow Lite) runtime and the corresponding NPU delegate (VX for i.MX 8M Plus, Ethos-U for i.MX 93, Neutron for i.MX 95 / i.MX 952). The same information is captured in release_manifest.json.
| Asset | Runtime | Precision | HW target | BSP & SDK versions | Link to asset |
|---|---|---|---|---|---|
| i.MX 8M Plus Quantized | LiteRT | INT8 | i.MX 8M Plus | - | Download |
| i.MX 93 Precompiled | LiteRT | INT8 | i.MX 93 | BSP lf-6.18.20_2.0.0, VELA_TAG = lf-6.18.20_2.0.0 | Download |
| i.MX 93 Precompiled | LiteRT | INT8 | i.MX 93 | BSP lf-6.18.37_2.1.0, VELA_TAG = lf-6.18.37_2.1.0 | Download |
| i.MX 95 Precompiled | LiteRT | INT8 | i.MX 95 | BSP lf-6.18.20_2.0.0, Neutron SDK v3.1.3 | Download |
| i.MX 95 Precompiled | LiteRT | INT8 | i.MX 95 | BSP lf-6.18.37_2.1.0, Neutron SDK v3.2.1 | Download |
| i.MX 95 Precompiled | LiteRT | INT8 | i.MX 95 | BSP lf-6.18.37_2.1.0, Neutron SDK v3.2.3 | Download |
| i.MX 952 Precompiled | LiteRT | INT8 | i.MX 952 | BSP lf-6.18.20_2.0.0, Neutron SDK v3.1.3 | Download |
| i.MX 952 Precompiled | LiteRT | INT8 | i.MX 952 | BSP lf-6.18.37_2.1.0, Neutron SDK v3.2.1 | Download |
| i.MX 952 Precompiled | LiteRT | INT8 | i.MX 952 | BSP lf-6.18.37_2.1.0, Neutron SDK v3.2.3 | Download |
The assets/imx8mplus/ file is identical (same sha256) to the hardware-independent int8 model at
assets/quantized_tflite_model/efficientdet-lite0_quant_int8.tflite, which is also provided for host (x86)
inference and as the input to the Vela/Neutron compilers.
Limitations and Biases
This model inherits all limitations from the original EfficientDet-lite0 model. Additional limitations:
- Task scope: General-purpose object detection across 80 COCO categories only; it does not perform instance segmentation, tracking, or fine-grained classification.
- Dataset bias: The model is trained on the COCO dataset. Detection quality may vary for object categories, scenes, or demographic groups that are under-represented in that dataset.
Training
The model was trained by the original authors on the COCO dataset [1], according to the EfficientDet source repository. No NXP-side training or retraining is performed; the int8 weights are downloaded as-is from the pre-quantized Kaggle checkpoint.
Evaluation
This repository does not include an evaluation script. The upstream EfficientDet-lite0 int8 checkpoint was evaluated by the original authors on the COCO validation set; see the EfficientDet source repository for details.
Download and Run
The recipe installs the eIQ Neutron SDK from the NXP eIQ PyPI Distribution Portal. Configure pip once to use it:
python -m pip config --user set global.index https://eiq.nxp.com/repository
python -m pip config --user set global.index-url https://eiq.nxp.com/repository
python -m pip config --user set global.trusted-host eiq.nxp.com
python -m pip config --user set global.extra-index-url https://pypi.org/simple
python -m pip config --user set global.find-links https://eiq.nxp.com/repository/
To download the pre-quantized int8 model and compile it for all supported platforms, run:
bash recipe.sh
The script takes two optional positional arguments:
bash recipe.sh [IMX_ETHOS_U_VELA_TAG] [EIQ_NEUTRON_SDK_VERSION]
defaulting to lf-6.18.20_2.0.0 and 3.2.3 respectively. The generated files are:
assets/quantized_tflite_model/efficientdet-lite0_quant_int8.tflite- hardware-independent int8 model, downloaded from Kaggle (also used for i.MX 8M Plus, seeassets/imx8mplus/)assets/imx93/<IMX_ETHOS_U_VELA_TAG>/efficientdet-lite0_quant_int8_vela.tflite- Vela-compiled for i.MX 93assets/imx95/<EIQ_NEUTRON_SDK_VERSION>/efficientdet-lite0_quant_int8_converted.tflite- Neutron-converted for i.MX 95assets/imx952/<EIQ_NEUTRON_SDK_VERSION>/efficientdet-lite0_quant_int8_converted.tflite- Neutron-converted for i.MX 952
An example of how to use the model is in example.py (run on a PC):
# Run on PC:
python example.py -m assets/quantized_tflite_model/efficientdet-lite0_quant_int8.tflite \
-i example_input.jpg -o example_output.jpg
Please refer to the i.MX Machine Learning User Guide for details on how to run the models on each platform.
Full on-device examples leveraging GStreamer/NNStreamer can be found in nxp-nnstreamer-examples on GitHub.
License
This model is released under the Apache License 2.0 (see LICENSE), the same license as the original EfficientDet (google/automl) model.
Citation
If you use this model, please cite both this work and the original model:
- Tan, Mingxing, Ruoming Pang, and Quoc V. Le. "EfficientDet: Scalable and Efficient Object Detection." Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2020. https://arxiv.org/abs/1911.09070
- Tan, Mingxing, and Quoc V. Le. "EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks." International Conference on Machine Learning. PMLR, 2019. https://arxiv.org/abs/1905.11946
- Lin, Tsung-Yi, et al. "Microsoft COCO: Common Objects in Context." European Conference on Computer Vision. Springer, Cham, 2014.
@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},
year={2020}
}
@inproceedings{tan2019efficientnet,
title={EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks},
author={Tan, Mingxing and Le, Quoc V},
booktitle={International Conference on Machine Learning},
year={2019},
organization={PMLR}
}
@inproceedings{lin2014microsoft,
title={Microsoft COCO: Common Objects in Context},
author={Lin, Tsung-Yi and others},
booktitle={European Conference on Computer Vision},
year={2014},
organization={Springer, Cham}
}
- Downloads last month
- 50
(