esp-dl-skill

Deploy, quantize, and debug neural network models on ESP chips with ESP-DL.

28|3|Updated Jun 24, 2026
One-click install
npx skills add https://github.com/JasonYANG170/esp-dev-skill --skill esp-dl-skill-jasonyang170
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: esp-dl-skill
Source: https://github.com/JasonYANG170/esp-dev-skill/tree/main/repos/esp-dl
Command: npx skills add https://github.com/JasonYANG170/esp-dev-skill --skill esp-dl-skill-jasonyang170

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires esp-ppq, and includes references (resource) components.

What problem does it solve? Deploying neural networks on ESP32-family chips requires correct model quantization, memory planning, and inference code, and small mistakes in target selection, quantization scale, or buffer reuse silently produce wrong results. This Skill grounds every ESP-DL API call, Kconfig symbol, and quantization parameter in the real esp-dl repository so generated firmware and quantization scripts work correctly. ## Core Features & Use Cases - Scenario Recipes: Step-by-step call chains for project setup, loading .espdl models from rodata/partition/SD card, running inference, streaming models, profiling, and vision pipelines (YOLO11 detection, pose, segmentation, MobileNetV2 classification). - ESP-PPQ Quantization Guidance: Quantize ONNX/PyTorch models to .espdl with correct target selection (c/esp32s3/esp32p4), plus AutoQuant search, TQT, mixed precision, and layerwise equalization for accuracy recovery. - Real API & Pitfall Reference: Verified dl::Model / dl::TensorBase signatures, Kconfig options, and 20 documented pitfalls such as quantize/dequantize scale direction and 16-byte alignment. - Use Case: A developer wants to run a YOLO11n detection model on an ESP32-S3. The Skill guides quantizing the ONNX model with target esp32s3, embedding the .espdl via target_add_aligned_binary_data, and writing the C++ inference loop with proper input quantization and output dequantization. ## Quick Start Ask the AI to help you quantize an ONNX model with ESP-PPQ and deploy it on an ESP32-S3 using ESP-DL.

Frequently Asked Questions about esp-dl-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy a neural network model on ESP32-S3?

Quantize your ONNX or PyTorch model to the .espdl format using ESP-PPQ with target esp32s3, then load it in firmware with dl::Model and call run(). ESP-DL cannot execute ONNX or PyTorch files directly on chip.

How to quantize an ONNX model for ESP-DL?

Install esp-ppq via pip and call espdl_quantize_onnx with your ONNX file, calibration dataloader, input shape, and target platform. Set export_test_values=True if you want on-chip validation with model->test().

Which ESP chips support ESP-DL inference acceleration?

ESP32-S3 (PIE V1) and ESP32-P4 (PIE V2) provide instruction-level acceleration and are recommended for AI workloads. ESP32 and C-series chips run plain C operators, which is much slower and suited only to tiny models.

Why does my ESP-DL model give wrong inference results?

The most common causes are a quantization target that does not match the deployed chip, feeding float input instead of quantizing with DL_RESCALE, or reading outputs after buffers were reused. Verify target, quantize/dequantize scale direction, and run model->test().

Can ESP-DL run TensorFlow Lite or ONNX files directly?

No, ESP-DL only executes the FlatBuffers-based .espdl format. TensorFlow models must first be converted to ONNX, then quantized and exported with ESP-PPQ before on-chip inference.

How do I improve low PTQ accuracy on ESP32-S3?

Use mixed precision to dispatch the worst layers to int16, or apply layerwise weight equalization for ReLU-based models. If that is insufficient, TQT learns quantization thresholds without labels and recovers most of the float accuracy.