How niloydebbarma-code/microplastic-detection works
This repository provides a microplastic-detection workflow: generate synthetic training images, train and evaluate a YOLOv8 model, then run inference from an ESP32-CAM stream or uploaded images in a Flask dashboard. The ESP32 also hosts camera controls and a browser interface. The graph includes the major documented training and inference capabilities; some internal firmware and dashboard details are based on partial excerpts, so only clearly supported connections are shown.
Main entry points: 03_esp32_integration.py YOLO Inference · 01_generate_synthetic_dataset.py Synthetic Generator · 02_train_yolov8_colab.py Train and Evaluate · app_httpd.cpp Camera HTTP Server
Components 12
Dataset Preparation
- Synthetic Generator
01_generate_synthetic_dataset.py
Model Training
- Train and Evaluate
02_train_yolov8_colab.py - Trained Weights
yolov8_microplastic_trained.pt
Camera Device
- Camera Firmware
esp32_code/microplastic_detector.ino - Camera Pin Mapping
esp32_code/camera_pins.h - Camera HTTP Server
esp32_code/app_httpd.cpp - Camera Web Controls
esp32_code/app_httpd.cpp
Detection Runtime
- YOLO Inference
03_esp32_integration.py - Detection Dashboard
03_esp32_integration.py
Other components
- Operator
- HMPD Data
- ESP32-CAM
Connections 15
- Operator → Synthetic Generator: generates data
README.md - HMPD Data → Synthetic Generator: patch input
README.md - Synthetic Generator → Train and Evaluate: training images
README.md - Operator → Train and Evaluate: trains model
README.md - Train and Evaluate → Trained Weights: saves weights
02_train_yolov8_colab.py - Trained Weights → YOLO Inference: loads model
README.md - Operator → YOLO Inference: starts detection
README.md - Camera Firmware → Camera Pin Mapping: configures camera
- Camera Firmware → Camera HTTP Server: starts server
- ESP32-CAM → Camera HTTP Server: provides frames
- Camera HTTP Server → Camera Web Controls: serves controls
esp32_code/app_httpd.cpp - YOLO Inference → ESP32-CAM: reads stream
03_esp32_integration.py - YOLO Inference → Detection Dashboard: updates results
03_esp32_integration.py - Operator → Detection Dashboard: views detections
README.md - Operator → Camera Web Controls: controls camera
esp32_code/app_httpd.cpp