Quantized Mobilenetv2 for Tomato Leaf Disease Classification Targeting an Esp32-cam Microcontroller
Year: 2026
Type: article
Abstract: Early detection of plant diseases is critical for food security, yet most deep learning models require GPU-class hardware. This paper presents an end-to-end edge AI system for tomato disease detection deployed on an ESP32-CAM microcontroller ($7 USD). We train MobileNetV2 (α=0.35) on six tomato leaf classes from PlantVillage (10,431 images), achieving 91.57% test accuracy. Full INT8 post-training quantization compresses the model from 1,588 KB to 614 KB (2.6× reduction) with 1.41 percentage-point accuracy loss. The quantized model is deployed on ESP32-CAM using TensorFlow Lite for Microcontrollers with a 220 KB tensor arena in PSRAM. Measured on-device inference latency is approximately 8.7 seconds per frame at 240 MHz. This reflects the computational intensity of MobileNetV2 on the ESP32's Xtensa LX6 cores without hardware neural network acceleration. A late-fusion module combines visual classification with environmental sensor readings (temperature, humidity, soil moisture, CO₂) to produce a four-level plant health assessment (Healthy, Environmental Stress, Disease, Critical) with a continuous risk score. The complete system—camera capture, inference, sensor fusion, and MQTT reporting—operates as a FreeRTOS task consuming approximately 201 KB tensor arena in PSRAM and 50 KB static RAM, well within the ESP32-CAM's 4 MB PSRAM budget. The system performs one classification every 14 seconds (8.7 s inference + 5 s interval), suitable for periodic greenhouse monitoring without cloud connectivity. To our knowledge, this is the first system combining quantized CNN inference with environmental sensor fusion on the original ESP32-CAM platform.
Source: HSR (London)
Institution: Urgench State University
Language: English
Topic: Smart Agriculture and AI
Subfield: Plant Science
Domain: Life Sciences
Open Access status: diamond
OpenAlex ID: W7204657652
