GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - espressif/esp-detection: Lightweight real-time object detection on ESP series chips, based on Ultralytics YOLOv11

BranchesTags
Open more actions menu

Latest commit

 

History

24 Commits
24 Commits

Folders and files

NameName
Last commit message
Last commit date
cfg
cfg
 
 
data
data
 
 
datasets/coco_cat
datasets/coco_cat
 
 
deploy
deploy
 
 
docs/tutorials
docs/tutorials
 
 
examples/cat_detection
examples/cat_detection
 
 
nn
nn
 
 
.gitignore
.gitignore
 
 
.pre-commit-config.yaml
.pre-commit-config.yaml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
espdet.jpg
espdet.jpg
 
 
espdet_run.py
espdet_run.py
 
 
espdet_run.sh
espdet_run.sh
 
 
pyproject.toml
pyproject.toml
 
 
requirements.txt
requirements.txt
 
 
train.py
train.py
 
 
val.py
val.py
 
 

Repository files navigation

ESP-Detection

ESP-Detection is a lightweight and ESP-optimized project based on Ultralytics YOLOv11, designed for real-time object detection on ESP series chips. It allows you effortlessly train a detection model for specific target and deploy the model on chips easily by ESP_DL.

Overview

ESP-Detection provides a series of ultra-lightweight models along with APIs that enables you to train custom detection models tailored to your specific use cases. The offered models are optimized for efficient deployment on ESP AI chips, like ESP32-P4 and ESP32-S3. The project also includes example applications such as cat detection, dog detection, and pedestrian detection.

  • Competitive mAP: The single-class model ESPDet-Pico(0.36M parameters, 224 input size) achieves comparable mAP(0.5:0.95) to 80-class model YOLOv11n(2.6M parameters, 640 input size) on cat detection.
  • Faster latency: Considering pre-processing and post-processing, espdet_pico achieves >18 FPS on ESP32-P4 and >7 FPS on ESP32-S3 when the input size is 224*224.
  • Deploy friendly: A complete deployment solution is provided based on ESP-DL, offering users an effortless way to deploy custom models.

Cat Detection Example

Model Input size mAPval
0.5:0.95
mAPval
0.5
Params
(M)
FLOPS
(G)
LatencyESP32-P4
(ms)
LatencyESP32-S3
(ms)
espdet_pico_224_224_cat 224*224 69.9 88.4 0.36 0.17 51.4 126.2
espdet_pico_416_416_cat 416*416 76.6 93.4 0.36 0.60 201.7 449.5
espdet_pico_160_288_cat 160*288 71.2 90.6 0.36 0.16 45.9 115.5
  • mAPval values are for single-model sing-scale on cat subset of COCO val2017 dataset.

Updates

  • 2025/06/26: We released a cat detection model demonstrating the use of rect=True for training and deployment on non-square image resolutions, improving both accuracy and speed.
  • 2025/04/23: esp-detection 1.0.0 is public. Cat Detection is available.

Installation

conda create -n espdet python=3.8
conda activate espdet
pip install -r requirements.txt
  • ESP-IDF is not required during model training, but is mandatory when running the quantized model on ESP chips. For setup instructions, please refer to ESP-IDF Programming Guide, and make sure to use ESP-IDF release/v5.3 or above.

Quick start

Step 1: Prepare dataset

Dataset format in esp-detection follows the YOLO detection dataset format. To convert your existing dataset from other formats (like COCO etc.) to YOLO format, please use converter.py by Ultralytics.

Step 2: Train and deploy the model

In esp-detection, we provide an all-in-one script espdet_run.py that streamlines the entire flow. With a single command, users can easily perform model training, export, quantization, and deployment. You can customize the espdet_run.sh shell script and execute the full pipeline with sh espdet_run.sh.

✨ We have integrated rect=True training and deployment into espdet_run.py. You can simply set rect=True and specify size=[h, w] to enable it. For more details, please refer to the tutorial.

python espdet_run.py \
  --class_name mycat \
  --pretrained_path None \
  --dataset "cfg/datasets/coco_cat.yaml" \
  --size 224 224 \
  --target "esp32p4" \
  --calib_data "deploy/cat_calib" \
  --espdl "espdet_pico_224_224_mycat.espdl" \
  --img "espdet.jpg"
  • MPS, CPU, Single-GPU and Multi-GPU training are supported in esp-detection. Please refer to Ultralytics YOLO Docs for more information. Specifically, you can set your own train settings according to Train Settings from Ultralytics.

Step 3: Inference on chips

Once Step 2 is completed, an example will be automatically generated. You can use it to perform model inference on ESP32-S3 or ESP32-P4. Similar to other esp-dl/examples, it enables customized model inference on a single input image and prints the results to the terminal.

You can run the example directly in the terminal with the following command:

cd path/to/custom_example
idf.py set-target esp32p4
idf.py flash monitor

Feedback

Please submit an issue if you find any problems using our products, and we will reply as soon as possible.

Reference

  • https://github.com/ultralytics/ultralytics

About

Lightweight real-time object detection on ESP series chips, based on Ultralytics YOLOv11

Resources

Readme
AGPL-3.0 license
Activity
Custom properties

Stars

185 stars

Watchers

9 watching

Forks

33 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.