Timely detection of plant diseases is critical for sustaining agricultural production and reducing economic loss. Mango crops are prone to several leaf infections that are difficult to diagnose without expert supervision. This work introduces a deployable artificial intelligence system for automatic mango leaf disease recognition using deep transfer learning integrated with an interactive analytics dashboard. A pretrained ResNet50 convolutional neural network is used as a feature extractor, followed by customized fully connected layers for multi-class classification. The trained model is integrated into a web-based interface using Streamlit, so users canupload images, obtainpredictions immediately, and view confidence-based analysis. The proposed framework supports 8 disease categories. The proposed framework outputs interpretable results such as severity estimation and probability distribution visualization. The experiment results indicate that transfer learning can be trained efficiently and has a good predictive power. It provides a practical way to integrate deep learning solutions to precision agriculture environments.
Introduction
This study presents an AI-based mango leaf disease detection system that combines deep learning, transfer learning, and an interactive web dashboard to support efficient crop health monitoring. Since mango diseases significantly reduce plant growth, fruit quality, and yield, early disease identification is essential. Traditional manual diagnosis by agricultural experts is often slow, inconsistent, and inaccessible to farmers in remote areas. To overcome these challenges, the proposed system uses ResNet50, a pretrained deep convolutional neural network, to automatically identify diseases from leaf images while providing user-friendly visual analytics for non-technical users.
Related Work
Earlier disease detection methods relied on traditional machine learning algorithms such as Support Vector Machines (SVM), Decision Trees, K-Nearest Neighbors (KNN), and Random Forests using manually extracted image features like color, texture, and leaf shape. Although these methods performed reasonably well in controlled environments, they struggled with varying lighting conditions, complex backgrounds, and image noise.
Recent research has shifted toward Convolutional Neural Networks (CNNs) and transfer learning models such as VGG16, InceptionV3, and ResNet50, which automatically learn visual features and achieve higher accuracy. However, most existing studies focus mainly on improving classification accuracy and lack practical deployment, real-time analytics, confidence visualization, and user-friendly interfaces. The proposed framework addresses these shortcomings by integrating disease prediction with an interactive Streamlit dashboard that displays confidence scores, probability distributions, and disease severity levels.
Proposed Framework
The proposed system consists of three main components:
Image Preprocessing – Uploaded mango leaf images are resized, normalized, and converted into RGB format.
Deep Learning Classification – A pretrained ResNet50 model extracts image features, which are then classified into disease categories using fully connected neural network layers.
Interactive Dashboard – A Streamlit-based web application presents predictions, confidence scores, probability charts, severity levels, and interactive analytics.
The model classifies mango leaves into eight categories:
Anthracnose
Bacterial Canker
Cutting Weevil
Die Back
Gall Midge
Healthy Leaf
Powdery Mildew
Sooty Mold
Deep Learning Model
The framework uses transfer learning with ResNet50, where the pretrained convolutional layers are retained while new classification layers are added. The network includes:
Global Average Pooling
Dense layer with ReLU activation
Dropout (0.5) for regularization
Softmax output layer with eight neurons
Training uses the Adam optimizer and categorical cross-entropy loss, improving convergence, reducing overfitting, and achieving good performance even with limited training data.
Dashboard Features
The Streamlit dashboard allows users to:
Upload mango leaf images
Receive real-time disease predictions
View confidence scores and probability charts
Assess disease severity
Explore prediction analytics through interactive visualizations
Prediction confidence is calculated from the highest predicted probability, with severity classified as:
60–85%: Moderate
Above 85%: High
Experimental Setup
The system was developed using:
Python
TensorFlow/Keras
Matplotlib
Streamlit
Python Imaging Library (PIL)
The experiments were conducted on a computer with at least 8 GB RAM, with optional GPU acceleration for faster training.
Contributions
The study makes several important contributions:
Develops a deployable AI-based mango leaf disease detection system.
Utilizes transfer learning for efficient and accurate classification.
Integrates AI prediction with interactive visualization.
Delivers a user-friendly decision-support tool for smart agriculture.
Advantages
The proposed system:
Detects mango leaf diseases quickly and accurately.
Supports multiple disease classes.
Requires less training through transfer learning.
Provides real-time predictions.
Offers confidence scores and visual analytics.
Helps farmers make timely crop management decisions.
Limitations
The system has some limitations:
Performance depends on image quality.
Only diseases included in the training dataset can be identified.
Similar-looking diseases may be difficult to distinguish.
Training and deployment require sufficient computing resources.
Accuracy may decrease on completely new datasets or different environmental conditions.
Results and Discussion
Experimental evaluation using accuracy, precision, recall, and F1-score demonstrates that the proposed framework achieves reliable and consistent disease classification across all categories. Transfer learning improves generalization while reducing training complexity, making the model suitable for practical agricultural applications. The study concludes that combining deep learning with an interactive analytics dashboard provides an effective, accessible, and scalable solution for automated mango leaf disease detection and crop health monitoring. Future AI advancements may further improve robustness under varying environmental conditions and limited data availability.
Conclusion
The proposed framework presents an intelligent and efficient solution for automated mango leaf disease detection using deep learning and transfer learning techniques. By leveraging a pretrained ResNet50 model, the system effectively extracts meaningful features and accurately classifies multiple disease categories. The integration of a Streamlit-based dashboard further enhances usability by providing real-time predictions, confidence scores, and visual analytics.
The experimental results demonstrate the potential of the framework to support early disease identification and assist users in making informed agricultural decisions. The combination of automated classification and interactive visualization makes the system practical for smart crop monitoring applications.
For future work, the framework can be extended by incorporating additional disease classes, larger and more diverse datasets, and advanced deep learning architectures to further improve performance. Future enhancements may also include treatment recommendations, explainable AI features, mobile deployment, and integration with IoT-based monitoring systems for comprehensive crop health management. These improvements can increase the scalability, reliability, and real-world applicability of the proposed system.
References
[1] Goodfellow, Y. Bengio, and A. Courville, Deep Learning. Cambridge, MA, USA: MIT Press, 2016.
[2] F. Chollet, Deep Learning with Python. Shelter Island, NY, USA: Manning Publications, 2018.
[3] R. Szeliski, Computer Vision: Algorithms and Applications. London, U.K.: Springer, 2011.
[4] J. Howard and S. Gugger, Deep Learning for Coders with Fastai and PyTorch: AI Applications Without a PhD. Sebastopol, CA, USA: O’Reilly Media, 2020.
[5] A. Géron, Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow: Concepts, Tools, and Techniques to Build Intelligent Systems, 3rd ed. Sebastopol, CA, USA: O’Reilly Media, 2022.
[6] A. Krizhevsky, I. Sutskever, and G. E. Hinton, “ImageNet classification with deep convolutional neural networks,” Communications of the ACM, vol. 60, no. 6, pp. 84–90, Jun. 2017.
[7] K. He, X. Zhang, S. Ren, and J. Sun, “Deepresidual learning for image recognition,” in Proc. IEEE Conf. Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 2016, pp. 770–778.
[8] K. Simonyan and A. Zisserman, “Very deep convolutional networks for large-scale image recognition,” in Proc. Int. Conf. Learning Representations (ICLR), San Diego, CA, USA, 2015.
[9] M. Tan and Q. V. Le, “EfficientNet: Rethinking model scaling for convolutional neural networks,” in Proc. Int. Conf. Machine Learning (ICML), Long Beach, CA, USA, 2019, pp. 6105–6114.
[10] S. P. Mohanty, D. P. Hughes, and M. Salathé, “Using deep learning for image-based plant disease detection,” Frontiers in Plant Science, vol. 7, Art. no. 1419, Sep. 2016.
[11] K. P. Ferentinos, “Deep learning models for plant disease detection and diagnosis,” Computers and Electronics in Agriculture, vol. 145, pp. 311–318, Feb. 2018.