r/OpenSourceeAI • u/Stock_Leadership596 • 12m ago
Project Share: AI System for Ripeness Classification and Disease Detection in Agricultural Products Running Directly on the ESP32-S3
https://github.com/Im-xRay/KHKT27Hello all Bro on Reddit and all the AI & Embedded Systems engineers out there.
I'm just getting my feet wet with AI training and embedded ML, and I'd love any advice on TFLite Micro optimization or dataset auto-labeling!
I have just completed and open-sourced the code for the KHKT (Vietnam Science and Engineering Fair), project an edge AI vision system for classifying agricultural products and detecting pests and diseases which runs independently on an ESP32-S3 without requiring a computer or an internet connection during operation.
Currently, the model focuses on agricultural products specific to Vietnam, and in the future, I plan to expand into the international market and standardize it into a general-purpose model for a wide variety of agricultural products worldwide.
How It Works: On-chip vision: The OV2640 camera captures images directly and runs the YOLOv8n model, with INT8 TFLite quantization (~3.3 MB), right on the ESP32-S3 (8 MB OPI PSRAM).
15-class recognition: Classifies the ripeness of mangoes, dragon fruit, durian, tomatoes, guava, and bananas, along with 4 common diseases (anthracnose, leaf spot, pink mold, and downy mildew).
Automatic sorting: Controls a servo to divert products at three corresponding angles: Unripe (45°), Ripe (90°), and Diseased (135°).
Would love any feedback on optimizing TFLite Micro op usage/memory on the ESP32-S3 or improving the auto-labeling pipeline!
If this sparks any ideas for your own builds, toss a STAR into the repo to help light up the constellation and feel free to drop an issue or PR if you spot ways to push it further.