A DenseNet121-based Deep Learning Approach for Multi-class Classification of Cowpea Leaf Diseases
Background: Cowpea is a drought-resilient legume that is important in India, Africa and parts of Asia. In India, it is widely cultivated in arid and semi-arid regions, supporting rural nutrition and income. Leaf diseases, however, significantly reduce yields, making AI-based detection systems essential for timely and accurate diagnosis. Methods: This study presents a deep learning framework using DenseNet121 for multi-class classification of cowpea leaf conditions: Bacterial wilt, septoria leaf spot, mosaic virus and fresh leaves. A total of 2,273 annotated images were curated, preprocessed and divided into training, validation and test sets. Real-time data augmentation and transfer learning techniques were employed to improve model generalization. The model was trained using categorical cross-entropy loss and evaluated with various metrics. Result: The model achieved a test accuracy of 93.87%, with strong F1-scores and precision across all four classes. The matthews correlation coefficient (MCC) was 0.9184, indicating high reliability, while the multi-class ROC-AUC score reached 0.9931, showing excellent class separability. Confusion matrix and precision–recall analysis further confirmed robust performance, especially for bacterial wilt and Septoria leaf spot. These results support the model’s potential for integration into smart agricultural systems for early disease detection in cowpea cultivation.