Repolode
espressif

espressif/esp-dl

A lightweight neural network inference framework for running AI models on Espressif ESP series chips, with an ONNX-to-.espdl quantization path via ESP-PPQ.

Stars
1,191
Forks
229
Open issues
47
Last commit
3 hours ago

What is it?

ESP-DL is a neural network inference framework built for Espressif ESP series SoCs. It provides APIs to load, debug and run AI models on the chip, and is designed to be used within ESP-IDF projects alongside other Espressif SDKs.

Models are quantized with ESP-PPQ, which reads ONNX models directly and can convert PyTorch and TensorFlow models through ONNX. The output is a compact `.espdl` format based on FlatBuffers that supports zero-copy deserialization. Quantization can be 8-bit, 16-bit, or mixed w8a16 per layer, and a static memory planner places layers in internal RAM or external memory based on the RAM size you specify.

The repository also includes a model zoo of pre-quantized models, such as MobileNetV2 and YOLO11 detection models, each packaged as an ESP-IDF component, along with an operator support list and examples.

Key features

  • 01Loads and runs `.espdl` models on ESP32 series chips through ESP-IDF.
  • 02Quantizes ONNX, PyTorch and TensorFlow models with ESP-PPQ.
  • 03Supports 8-bit, 16-bit and mixed w8a16 quantization within one model.
  • 04Automatically places layers in memory according to the internal RAM size you set.
  • 05Splits Conv2D and DepthwiseConv2D work across both cores.
  • 06Ships a model zoo of pre-quantized models packaged as ESP-IDF components.

Use cases

  • Running an object detection model such as YOLO11 on an ESP32-S3 or ESP32-P4 device.
  • Adding on-device OCR or other vision inference to an ESP-IDF product.
  • Quantizing a custom ONNX model for deployment on Espressif chips.

Quick start

  1. 1

    Install ESP-IDF release/v5.3 or above following the ESP-IDF Programming Guide

  2. 2

    Install the PyTorch CPU build (Linux example from the README)

    pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
  3. 3

    Install ESP-PPQ for quantizing your own models

    pip install esp-ppq
  4. 4

    Follow the how-to-run-model tutorial to load and run a model on your board

Things to know

  • Runs only on Espressif ESP series chips, built on ESP-IDF v5.3 or later.
  • Only operators listed in the operator support table can be used; unsupported operators require contributing new ones.
  • Quantization with ESP-PPQ requires a Python environment and models exported to ONNX first.

Topics

FAQ

What is esp-dl?
A lightweight neural network inference framework for running AI models on Espressif ESP series chips, with an ONNX-to-.espdl quantization path via ESP-PPQ. ESP-DL is a neural network inference framework built for Espressif ESP series SoCs. It provides APIs to load, debug and run AI models on the chip, and is designed to be used within ESP-IDF projects alongside other Espressif SDKs.
Is esp-dl free to use? What license does it have?
esp-dl is open source under the MIT license. Check the license terms before using it in commercial products.
Is esp-dl still maintained?
Actively maintained. The last commit to esp-dl was on Oct 22, 2026.
What can I use esp-dl for?
Running an object detection model such as YOLO11 on an ESP32-S3 or ESP32-P4 device. Adding on-device OCR or other vision inference to an ESP-IDF product. Quantizing a custom ONNX model for deployment on Espressif chips.
How do I install esp-dl?
Install ESP-IDF release/v5.3 or above following the ESP-IDF Programming Guide Install the PyTorch CPU build (Linux example from the README): pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu Install ESP-PPQ for quantizing your own models: pip install esp-ppq Follow the how-to-run-model tutorial to load and run a model on your board
Where can I get esp-dl?
The source code and installation instructions are on GitHub: https://github.com/espressif/esp-dl

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects