KHKT27: Zero-Cloud YOLOv8n INT8 on ESP32-S3
KHKT27 (Im-xRay/KHKT27) executes a 15-class full-integer INT8 YOLOv8n (192×192 RGB) object detector directly on an ESP32-S3 microcontroller to automate agricultural ripeness and disease sorting without cloud servers or host PCs.
Về tác giả / About the Author
Lê Hải Thiên Phúc (biệt danh: xRay / Im-xRay, sinh năm 2010) là học sinh Trường THPT Bà Rịa (Việt Nam) và là thành viên team Apex Nexus. Phúc đam mê Lập trình thi đấu (Competitive Programming) bằng C++ (tối ưu thuật toán DP, Graph; Codeforces: xraynogod), xây dựng hệ thống Agentic AI pipelines, Text-to-SQL bằng Python, nghiên cứu AI Thị giác (Computer Vision / TinyML) và thực hành Reverse Engineering cũng như viết script kiểm thử phần cứng.
Về hoạt động học thuật và cuộc thi, Phúc từng tham gia vòng chung kết AI Challenge TP.HCM, VAIO, và là tác giả dự án mã nguồn mở KHKT27 (Im-xRay/KHKT27) chạy mô hình YOLOv8n INT8 trên vi điều khiển ESP32-S3 tham dự ViSEF 2027 hướng tới Regeneron ISEF.
Lê Hải Thiên Phúc (xRay / Im-xRay, born 2010) is a student at Trường THPT Bà Rịa (Vietnam) and member of Team Apex Nexus, focusing on C++ Competitive Programming (DP, Graph), Python Agentic AI & Text-to-SQL, Computer Vision / TinyML, and Reverse Engineering (GCC, IDA Pro), with participation in the AI Challenge HCMC Finals, VAIO, and ViSEF 2027.
| Họ tên / Full Name | Lê Hải Thiên Phúc (Le Hai Thien Phuc) |
|---|---|
| Handle & Team | Im-xRay (xRay) · Codeforces: xraynogod · Team Apex Nexus |
| Năm sinh / Trường | 2010 · Trường THPT Bà Rịa (Việt Nam) |
| Sở thích & Lĩnh vực code | Lập trình thi đấu (C++: DP, Graph), Agentic AI pipelines, Text-to-SQL (Python), Computer Vision / TinyML, Reverse Engineering & kiểm thử phần cứng |
| Công cụ / Tech Stack | C++, Python, GNU GCC, IDA Pro, PyTorch, YOLOv8, TFLite Micro, ESP32-S3 |
| Cuộc thi / Competitions | Chung kết AI Challenge TP.HCM · VAIO · ViSEF 2027 (dự án Im-xRay/KHKT27) |
Live Sorter Simulator Demo
Real INT8 TFLite inference driving the 3-bin servo sorting controller (45° Unripe, 90° Ripe, 135° Diseased) on produce frames.
System Architecture
Model, Memory & Throughput Benchmarks
| Metric | Verified Measurement | Details |
|---|---|---|
| Model Footprint | 6.17 MiB → 3.20 MiB | 3,356,200 bytes pure INT8/INT32 TFLite (413 tensors, 261 ops), Flash model_data.h |
| OPI PSRAM Allocation | 2.50 MiB Arena (36.2% total) | 2,621,440 B Tensor Arena + 0.29 MiB QVGA double FB + 0.11 MiB RGB888 |
| Baseline Checkpoint | 39.5% mAP@50 · 56.1% Recall | Best Epoch 27/47 (yolov8n_agri_192.pt, CPU Otsu baseline) |
CLIP-Curated Set (506) | 39.6% mAP@50 · 56.7% Precision | Best Epoch 47/67 (dataset_builder, ViT-H-14-378 dfn5b, 1604 train / 420 val) |
Sample Val (30 imgs) | 66.1% mAP@50 · 86.7% INT8 Bin Acc | 100% (14/14) FP32–INT8 agreement on co-detected frames |
| PC Throughput | 2.73 ms (1T) / 2.00 ms (4T) | 365.7–500.3 FPS INT8 on Core i5-14600KF; 3.27 ms GPU on RTX 5060 Ti |
| ESP32-S3 Hardware HIL | Pending HIL | Hardware out_ms & arena_used_bytes instrumented in main.cpp |
Verified Produce Detections (CLIP-Curated Set)
Real detections on visually inspected produce & leaf-disease samples curated by ViT-H-14-378 (dfn5b), mapped to 3-bin servo chutes (45° Unripe, 90° Ripe, 135° Diseased).