A state-of-the-art deep learning system for plant disease identification using CBAM-augmented ResNet18
PlantDoc is a complete implementation of a plant disease classification system using a CBAM (Convolutional Block Attention Module) augmented ResNet18 architecture. The system is designed to accurately identify various plant diseases from images, leveraging attention mechanisms to focus on the most relevant features for diagnosis.
Plant diseases cause significant crop losses worldwide, with estimates suggesting 20-40% of global crop production is lost to pests and diseases annually. Early and accurate detection is crucial for effective management and sustainable agriculture. Traditional disease diagnosis relies on manual inspection by experts, which is time-consuming and often subjective.
This project implements a state-of-the-art deep learning approach that combines ResNet18 with attention mechanisms to improve classification accuracy for plant disease diagnosis, enabling faster and more reliable identification of diseases across 39 different plant disease classes.
The PlantDoc project utilizes a comprehensive plant disease dataset with the following characteristics:
The dataset contains 39 classes representing different plant diseases and healthy plants, with some class imbalance:
The largest classes include Orange_Haunglongbing_Citrus_greening (8.96%), Tomato_Tomato_Yellow_Leaf_Curl_Virus (8.71%), and Soybean_healthy (8.28%), while many classes have approximately 1.63% of the total dataset (about 1,000 images each).
To address class imbalance and improve model generalization, the project implements a comprehensive data pipeline including:
The PlantDoc system leverages a dual-attention enhanced architecture to significantly improve classification performance. The key components of our methodology include:
CBAM sequentially infers attention maps along two separate dimensions:
This dual attention mechanism allows the model to dynamically emphasize salient features in both channel and spatial dimensions, leading to improved performance, especially on images with complex backgrounds or subtle disease symptoms.
Multiple experimental configurations were evaluated to determine the optimal architecture and training strategy. Key experiments included:
Two primary model variants were systematically explored:
Both models were evaluated using a comprehensive set of metrics including accuracy, precision, recall, F1 score, confusion matrices, ROC curves, and precision-recall curves to provide a holistic performance assessment.
The models become increasingly well-calibrated over time, as shown by the decreasing Expected Calibration Error (ECE). This indicates that the predicted confidence levels closely match the actual accuracy of predictions.
By the final epoch, both models show high confidence (>85%) for the vast majority of predictions, with minimal low-confidence predictions. This demonstrates the models' ability to make decisive classifications with high certainty.
The CBAM-augmented ResNet18 architecture demonstrates significant improvements over standard classification approaches for plant disease identification. Key findings include:
These results highlight the potential of attention-enhanced deep learning approaches for practical agricultural applications. By providing accurate, reliable disease identification, this system could significantly contribute to sustainable farming practices through early detection and targeted treatment of plant diseases.
Ongoing and planned improvements to the PlantDoc system include:
Plant Disease Classification Model v1
Detailed performance report for CBAM-augmented ResNet18 model trained for multi-class classification with 39 classes.
Plant Disease Classification Model v2
Detailed performance report for optimized CBAM-augmented ResNet18 model (v2) with faster training schedule (100 epochs vs 150).