This research presents an intelligent system for the classification of plant diseases using a convolutional neural network (CNN) trained on a large dataset of diseased and healthy plant leaves. The model was developed using Python and deep learning libraries such as TensorFlow and Keras, achieving high accuracy in classifying various plant diseases. The trained model is integrated into a user-friendly web application using Streamlit, enabling real-time predictions from uploaded images. The system provides an accessible interface for farmers, researchers, and agricultural workers to detect plant diseases instantly, thereby aiding in timely intervention and crop management. By leveraging transfer learning and a well-curated dataset, the application ensures reliable results while remaining lightweight and easy to deploy. The project demonstrates a scalable approach to agricultural diagnostics using AI, focusing on automation, accuracy, and usability.
Introduction
1. Introduction: Problem & Solution Overview
Plant diseases pose a major threat to agricultural productivity, causing significant financial losses. Traditional disease detection methods rely on expert visual inspection, which is time-consuming, error-prone, and impractical for large-scale farms.
To address this, the study proposes a deep learning-based automated plant disease detection system that uses Convolutional Neural Networks (CNNs) for accurate classification from leaf images. A key innovation is the automated retraining capability—the system can adapt to new data without manual intervention by retraining itself once a threshold of newly labeled images is reached.
2. Project Objectives
Build a web-based system to detect plant diseases using CNNs and present results via a graphical user interface (GUI).
Ensure the system is:
Scalable for large datasets
Adaptable across multiple crop types
Capable of handling real-world scenarios, including new or unknown diseases
Enable self-retraining when enough newly labeled images are accumulated.
3. Literature Review Highlights
Sethy et al.: Combined deep feature extraction and SVM for rice leaf disease detection, with ResNet50 + SVM yielding the best results (accuracy: 98.38%).
Nagaraju et al.: Reviewed deep learning models in plant disease detection, emphasizing CNNs and future use of hyperspectral data.
Rehman et al.: Evaluated statistical ML algorithms for agricultural machine vision systems.
Roth et al.: Developed a CNN-based system for detecting cotton leaf diseases with 95.48% accuracy.
Siva Krishna et al.: Used CNN for grading tobacco leaves, achieving 85.10% accuracy.
Kamilaris & Prenafeta-Boldú: Reviewed CNN-based plant disease classifiers using datasets like PlantVillage, highlighting preprocessing techniques for better model performance.
4. Proposed Method & System Design
System Workflow
Data Collection: Uses the PlantVillage dataset (50,000+ labeled images across 38 classes).
Preprocessing: Resizing (256x256), normalization ([0,1]), and data augmentation (rotation, flipping, etc.).
Model Architecture:
Based on ResNet50 for deep classification tasks
Includes convolutional layers, residual blocks, global average pooling, fully connected layers, and softmax output
Training Parameters:
Optimizer: Adam
Loss Function: Categorical cross-entropy
Learning Rate: 0.0001 with exponential decay
Batch Size: 32
Retraining Process
Images with low prediction confidence are flagged as "unknown."
Experts label these unknowns via an admin dashboard.
When 100–150 images are labeled, automated retraining is triggered.
Model versioning enables performance tracking and rollback if needed.
5. Implementation
Frontend (Streamlit + Next.js)
Streamlit: For building a responsive, Python-based GUI for users
Next.js + Tailwind CSS: For a modern, responsive, web frontend
User Roles:
Farmers: Upload images, receive predictions with confidence scores
Experts: Access dashboard for labeling unknown images, monitor retraining, and manage the system
Backend (Flask)
Handles image uploads, predictions, user authentication, and automated retraining
Built with RESTful APIs for modular integration with frontend
Includes:
Prediction module
Image preprocessing module
Automated retraining handler
Conclusion
This research introduces a cutting-edge system for automated plant disease detection that leverages dynamic retraining,allowingthemodeltoremaineffectiveandup-to- date in real-world agricultural environments. The system continuously incorporates newly labelled images fromexpert users, enabling it to adapt to emerging diseases or variations in disease patterns, which are common inevolving ecosystems. By integrating secure APIs and implementing role-based access control, the system ensures robust management and scalability, offering controlled access to both the model retraining process and the expert labelling of unknown images. This design allows for seamlessupdatesandefficientcollaborationbetweenregular users and admin users, such as plant pathologists, who can easily monitor model performance and trigger retraining when necessary. This could lead to more accurate predictions and insights into disease spread based on real- time conditions like humidity, temperature, and soil quality. Furthermore, integrating more advanced machine learning architectures, such as transformer-based models or hybrid deep learning approaches, could significantly enhance the system’sclassificationaccuracy, particularlyfor complexor previously unseen disease cases. Such advancements would make the system more adaptable and resilient, ultimately providing a powerful, scalable tool for farmers and agricultural experts to manage plant health more effectively in diverse and dynamic environments.
References
[1] M.Nagaraju and C. Priyanka. “Systematic Review of Deep LearningTechniques in Plant Disease Detection”, International Journal ofSystems Assurance Engineering and Management. Vol. 11, no.3, pp.547–560, 2020.
[2] S. Sladojevic et al., Comput. Intell. Neurosci., 2016.
[3] S. Mohanty et al., Front. Plant Sci., 2016.
[4] K. P. Ferentinos, Comput. Electron. Agric., 2018.
[5] A. Too et al., Comput. Electron. Agric., 2019.
[6] D. P. Kingma and J. Ba, \"Adam: A Method for Stochastic Optimization,\" ICLR, 2015.
[7] M. J. Islam et al., \"A Review on Deep Learning Techniques for the Diagnosis of Novel Coronavirus (COVID-19),\" IEEE Access, vol. 8, pp. 130906–130924, 2020. (For inspiration on dynamic retraining approaches)
[8] S. Kaur, P. Shreelekha and G. Shivani. “Plants Disease Identificationand Classification Through Leaf Images: A Survey”, Archives ofComputational Methods in Engineering. Vol. 26, No.2, pp. 507–530,2019.
[9] TU. Rehman, M. Md Sultan, K. Young Chang, J. Jian and J. Shin.“Current and Future Applications of Statistical Machine LearningAlgorithms for Agricultural Machine Vision Systems”, Computersand Electronics in Agriculture. Vol.156, pp.585–605, 2019.
[10] HS. Muhammad, P. Johan and MA. Khalid. “Plant Disease DetectionandClassificationbyDeepLearning”,Plants.Vol.8,No.468,pp.1-22,2019.
[11] A. Kamilaris, X. Francesc, and Prenafeta-Boldú. “Deep Learning inAgriculture: A Survey”, Computers and Electronics in Agriculture.Vol. 147, pp. 70–90, 2018.
[12] G. Dhingra, V. Kumar, and HD. Joshi. “Study of Digital ImageProcessingTechniquesforLeafDiseaseDetectionandClassification”,Multimedia Tools and Applications. Vol. 77, No.15, 2018.
[13] K. Singh, S. Kumar and P. Kaur. “Support vector machine classifierbased detection of fungal rust disease in Pea Plant (Pisamsativam)”,International Journal of Information Technology. 2018.
[14] V. SinghandAK. Misra.“Detectionofplantleafdiseases usingimagesegmentationandsoftcomputingtechniques”,InformationProcessingAgriculture. Vol. 4, No.1,pp. 41–49, 2017.
[15] S.Kaur,S.PandeyandS.Goel. “Semi-automaticleafdiseasedetectionandclassificationsystemforsoybeanculture”,IETImageProcessing.Vol. 12, No. 6, pp.1038–1048, 2018.
[16] P. Kaur, HS. Pannu and AK. Malhi. “Plant disease recognition usingfractional-order Zernike moments and SVM classifier”, NeuralComputing and Application. 2019.
[17] Fuentes A, Yoon S, Park DS. Deep learning based techniques forplant diseases recognition in real-field scenarios. In: Advancedconcepts for intelligent vision systems. Cham: Springer; 2020
[18] Boulent J, Foucher S, Théau J, St-Charles PL. Convolutional neuralnetworks for the automatic identification of plant diseases. FrontPlant Sci. 2019;10:941.
[19] Shekhawat RS, Sinha A. Review of image processing approaches fordetecting plant diseases. IET Image Process. 2020;14(8):1427–39.
[20] Thangaraj R, Anandamurugan S, Kaliappan VK. Automated tomatoleaf disease classification using transfer learning-based deepconvolution neural network. J Plant Dis Prot. 2020.
[21] Atila M, Uar M, Akyol K, Uar E. Plant leaf disease classificationusingefficientnetdeeplearningmodel.EcolInform.2021;61:101182.