Plant leaf disease identification is crucial for agriculture helping to prevent the spread of diseases, which can have a significant impact on crop yields and food security. Identifying the specific disease allows farmers to take appropriate measures to control or eradicate the disease, such as applying the correct pesticides only on targeted plants or implementing quarantine measures.

Approach

The STM32 model zoo provides everything you need to train and retrain models with your own data
The solution proposes a model trained on a public dataset providing very good accuracy while running on a STM32
The model can be easily deployed on the STM32H747 discovery kit with the STM32 model zoo Python scripts
The use case presented is based on a plant leaf dataset to identify diseases

Sensor

Vision: Camera module bundle (reference: B-CAMS-OMV)

Data

Dataset Plant Village dataset of plant leaf (License CC0 1.0 Public Domain)
Data format
39 different classes of plant leaf and background images
RGB color images 

Results

Model Fast-downsampling MobileNet 0.25 
Input size: 224x224x3
Memory footprint:
137 KB Flash for weights
152 KBRAM for activations
Accuracy:
Float model: 99.82%
Quantized model: 99.62% 
Performance on STM32H747 (High-perf) @ 400 MHz 
Inference time: 63.2 ms
Frame rate:  16 fps

uc-stm32cubeai-plant-leaf-disease-identification-confusion-matrix uc-stm32cubeai-plant-leaf-disease-identification-confusion-matrix uc-stm32cubeai-plant-leaf-disease-identification-confusion-matrix

Confusion matrix

Model repository
ST Edge AI Model Zoo
ST Edge AI Model Zoo
Optimized with
STM32Cube.AI
STM32Cube.AI
Compatible with
STM32H7 series
STM32H7 series

Resources

Model repository ST Edge AI Model Zoo

A collection of reference AI models optimized to run on ST devices with associated deployment scripts. The model zoo is a valuable resource to add edge AI capabilities to embedded applications.

ST Edge AI Model Zoo ST Edge AI Model Zoo ST Edge AI Model Zoo

Optimized with STM32Cube.AI

A free STM32Cube expansion package, X-CUBE-AI allows developers to convert pretrained AI algorithms automatically, such as neural network and machine learning models, into optimized C code for STM32.

STM32Cube.AI STM32Cube.AI STM32Cube.AI

Compatible with STM32H7 series

The STM32 family of 32-bit microcontrollers based on the Arm Cortex®-M processor is designed to offer new degrees of freedom to MCU users. It offers products combining very high performance, real-time capabilities, digital signal processing, low-power / low-voltage operation, and connectivity, while maintaining full integration and ease of development.

STM32H7 series STM32H7 series STM32H7 series
You might also be interested by

Tutorial | Demo | MEMS MLC | Gyroscope | Accelerometer | Predictive maintenance | Wearables

Recognize head gestures in wearable devices with ultra low power sensors

Recognize head gestures such as nodding, shaking, and other general head movements through the Machine Learning Core available in MEMS sensors.

Tutorial | Demo | MEMS MLC | Accelerometer | Industrial | Predictive maintenance

How to monitor and classify fan-coil systems with STWIN.box

Monitor and classify the behavior of a fan (e.g. on HVAC units) through the Machine Learning Core available in MEMS sensors.

Partner | Smart city | Transportation | Vision | STM32Cube.AI | STM32 AI MCU | Video

Number-Plate Recognition (ANPR) based on Vision AI by Irida Labs

Vision AI-powered solution for Automatic Number-Plate Recognition (ANPR) for smart city applications, running on STM32 MCUs