An Ensembled Crop Recommendation System Using Soil Analysis and Image Classification
Keywords:
Hybrid Crop Recommendation System, Soil Image Classification, Convolutional Neural Network (CNN), Logistic Regression, Precision Agriculture.Abstract
The increasing demand for intelligent agricultural decision support systems has led to the development of numerous crop recommendation models. However, most existing systems in the literature rely solely on either soil nutrient data or image-based soil classification, resulting in limited accuracy, reduced flexibility, and poor adaptability in real-world farming scenarios, especially in resource-constrained regions. Additionally, many approaches require complete and manually inputted soil parameters, which are often unavailable to smallholder farmers. To address these limitations, this study proposes a hybrid crop recommendation system that integrates both soil nutrient analysis and image-based soil classification to improve prediction reliability and usability. The system employs a Convolutional Neural Network (CNN) for soil image classification and a Logistic Regression model for crop
prediction based on soil nutrient parameters, including Nitrogen (N), Phosphorus (P), Potassium (K), pH, and soil type. While advanced variants of CNN and more complex classifiers exist, the selected models were chosen due to their computational efficiency, interpretability, and suitability for deployment in low-resource environments. The CNN model classifies soil images into five categories Alluvial, Black, Clay, Red, and Sandy with an accuracy of 92.95%, while the Logistic Regression model achieves 87.40% accuracy in crop prediction. A hybrid decision framework is introduced to combine outputs from both models, allowing users to input either nutrient data, soil images, or both, thereby enhancing system flexibility. The system is implemented in Python and deployed using a Streamlit-based web interface, providing real-time and user-friendly crop recommendations. By integrating multiple data sources, the proposed approach improves decision accuracy, reduces dependency on complete data inputs, and supports sustainable agricultural practices. This study further highlights the need for extending crop
recommendation systems to include fertilizer type and quantity recommendations using multidimensional Hybrid Crop Recommendation System,agricultural data.
