Smallholder farming communities across developing nations continue to struggle with three persistent decision-making problems: identifying which crops will thrive under prevailing soil and climatic conditions, determining the precise blend of soil nutrients required to sustain healthy plant growth, and recognizing foliar disease symptoms before irreversible yield losses occur.
This work introduces a unified web-based advisory platform that resolves all three problems through a tightly coupled ensemble of machine learning and deep learning components. Soil macronutrient concentrations (N, P, K) together with pH, rainfall, ambient temperature, and relative humidity serve as inputs to a Random Forest classifier that maps field conditions to the most agronomically suitable crop. A complementary Decision Tree module quantifies the gap between measured soil nutrient levels and crop-specific optimum values, translating that gap into targeted fertilizer prescriptions. Foliar disease diagnosis is handled by a residual Convolutional Neural Network trained on the PlantVillage benchmark corpus, which assigns each uploaded leaf photograph to one of 38 pathological or healthy categories and retrieves the corresponding treatment protocol. Live meteorological readings are sourced from the OpenWeather API so that recommendations always reflect current ambient conditions rather than historical averages. Rigorous evaluation across all three subsystems confirms strong predictive performance, establishing the platform as a technically sound and operationally viable instrument for advancing precision and sustainable agriculture.
Introduction
The text discusses the challenges faced by smallholder farmers in agrarian economies, where critical farming decisions such as crop selection, fertilizer application, and disease detection often lack adequate technological support. Traditional methods like agricultural extension services, laboratory soil testing, and manual disease inspection are either too slow, expensive, or dependent on expert knowledge, making them ineffective for many farmers. To address these issues, advances in machine learning (ML) and deep learning (DL) have enabled automated and low-cost agricultural decision-support systems.
The paper presents a unified smart agriculture web platform that integrates three major functionalities into a single application: crop recommendation, fertilizer advisory, and plant disease detection. The system uses soil and weather data to recommend suitable crops, calculates nutrient gaps to provide fertilizer prescriptions, and employs a deep learning-based disease detection model that identifies foliar diseases from leaf images and suggests treatments. The platform also integrates real-time weather information from the OpenWeather API to improve recommendation accuracy.
The problem identified is that existing agricultural advisory systems are fragmented and limited in scope. Most current solutions focus on only one task, such as crop selection or disease identification, without offering a comprehensive support system. Fertilizer recommendations are often based on generalized regional data instead of field-specific soil conditions, leading to overuse or underuse of nutrients. Disease diagnosis depends heavily on human observation, which is inconsistent and often unable to detect early-stage infections.
The objectives of the study include developing:
A Random Forest-based crop recommendation system using seven soil and environmental variables.
A Decision Tree-based fertilizer recommendation engine that computes nutrient deficiencies and surpluses.
A residual Convolutional Neural Network (CNN) trained on the PlantVillage dataset for plant disease classification.
Integration of live weather data through the OpenWeather API.
A responsive Bootstrap-based web interface accessible on both desktop and mobile devices.
The literature review shows that previous research has successfully applied Random Forest models for crop prediction, Decision Trees for fertilizer optimization, and CNNs with transfer learning for disease recognition. However, most systems addressed these tasks separately. The study aims to close this gap by providing a unified agricultural advisory platform.
The system follows a three-tier architecture consisting of:
A responsive front-end interface built with Bootstrap.
A Flask-based backend server handling prediction logic through REST APIs.
Integrated machine learning and deep learning models for prediction tasks.
Pre-trained Random Forest and Decision Tree models are loaded from Pickle files, while the disease detection module uses a PyTorch-based residual CNN. The platform validates user inputs, automatically retrieves weather data using geographic coordinates, and generates structured outputs with confidence scores, fertilizer guidance, and treatment recommendations.
Conclusion
This paper described the design, implementation, and empirical evaluation of a unified agricultural decision-support platform that combines a Random Forest crop adviser, a Decision Tree fertilizer prescriber, and a residual CNN disease classifier within a single Flask web application. The consolidation of three specialist functions into one interface removes the coordination burden that previously forced farmers to consult separate, disconnected tools, and the automatic injection of live weather data further reduces the manual effort required to obtain a reliable recommendation.
Quantitative evaluation confirms that the chosen algorithms and training corpora are well matched to their respective tasks: a 96.4% crop classification rate, 93.5% fertilizer prescription accuracy, and 94.7% foliar disease recognition rate combine to a composite platform accuracy of 94.9%, surpassing every functionally comparable system identified in the literature review. These results validate the architectural decision to pair domain-knowledge-augmented classical models for structured tabular inputs with a data-driven deep network for the unstructured image modality.
Planned extensions include integration with low-cost IoT soil probes to enable continuous nutrient monitoring rather than single-point snapshot measurements, expansion of the disease knowledge base to cover crops beyond the PlantVillage catalogue, and incorporation of farmer feedback loops that personalise recommendations to microclimate and cultivar preferences observed over successive growing seasons. Regional language support is also a priority to maximise adoption among non-English-speaking farming communities.
References
[1] B. Bhosale et al., Crop Recommendation System using Machine Learning, IEEE ICACT, 2021.
[2] A. Kumar et al., Comparative Study of ML Classifiers for Crop Prediction, IJEAT, 2020.
[3] Z. Doshi et al., Crop Recommendation System using ML and Weather Data, IJCSE, 2020.
[4] V. Ramesh et al., Decision Tree-based Fertilizer Recommendation for Precision Agriculture, IJAER, 2019.
[5] A. Mucherino et al., A Survey of Data Mining Techniques Applied to Agriculture, OIJ, 2009.
[6] S. P. Mohanty et al., Using Deep Learning for Image-Based Plant Disease Detection, Frontiers in Plant Science, 2016.
[7] K. P. Ferentinos, Deep learning models for plant disease detection, Computers and Electronics in Agriculture, 2018.
[8] P. Tm et al., Tomato Leaf Disease Detection Using CNNs, ICECDS, 2018.
[9] R. Sujatha and J. M. Chatterjee, Weather-augmented ML Models for Crop Yield Prediction, ICAISC, 2020.
[10] A. Kamilaris and F. X. Prenafeta-Boldu, Deep learning in agriculture: A survey, Computers and Electronics in Agriculture, 2018.
[11] AgriML Team, Integrated Crop and Fertilizer Advisory System, IEEE Access, 2023.
[12] J. Van Klompenburg, A. Kassahun, and C. Catal, Crop yield prediction using machine learning: A systematic literature review, Computers and Electronics in Agriculture, vol. 177, p. 105709, 2020.
[13] M. Alibabaei et al., A Review of the Challenges of Using Deep Learning Algorithms to Support Decision-Making in Agricultural Activities, Remote Sensing, vol. 14, no. 3, p. 638, 2022.
[14] A. Chlingaryan, S. Sukkarieh, and B. Whelan, Machine learning approaches for crop yield prediction and nitrogen status estimation in precision agriculture: A review, Computers and Electronics in Agriculture, vol. 151, pp. 61–69, 2018.
[15] G. Liakos, P. Busato, D. Moshou, S. Pearson, and D. Bochtis, Machine learning in agriculture: A review, Sensors, vol. 18, no. 8, p. 2674, 2018.
[16] S. Nachimuthu and M. Raja, Soil Nutrient Prediction and Fertilizer Recommendation Using Ensemble Learning Techniques, Journal of King Saud University - Computer and Information Sciences, vol. 34, no. 10, pp. 9738–9749, 2022.