AgroGuardian: An Intelligent Web-Based System for Crop Recommendation and Plant Disease Detection Using Machine Learning and CNN
Abstract
Agriculture plays a crucial role in the development of many countries, particularly India, where it provides employment to millions of people. However, farmers continue to face challenges such as unpredictable climate conditions, soil degradation, and crop diseases. To address these problems, this paper presents AgroGuardian, an intelligent web-based system designed to assist farmers with real-time crop recommendations and plant disease detection. The system uses multiple environmental parameters such as soil nutrients (N, P, K), pH, temperature, humidity, and rainfall to recommend suitable crops for cultivation. Several machine learning models—Decision Tree, Naïve Bayes, Support Vector Machine (SVM), Logistic Regression, Random Forest, XG Boost, and K-Nearest Neighbors (KNN)—were trained and evaluated. Among these, the Random Forest model achieved the highest accuracy, making it the most suitable for crop prediction. In addition, a Convolutional Neural Network (CNN) model was developed for automatic plant disease detection from leaf images. This feature enables early identification and prevention of crop losses. The integration of both modules within a single Streamlit web application provides a user-friendly interface for farmers. By combining AI-based crop recommendation and disease detection, AgroGuardian contributes to sustainable farming, better decision-making, and improved agricultural productivity.
Copyright (c) 2026 R. Priyadharshini, M. Srisankar

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

