Verified Scholarly Platform
Serving Researchers Since 2012

Smart Crop Recommendation System

DOI : 10.5281/zenodo.22245869
Download Full-Text PDF Cite this Publication

Text Only Version

Smart Crop Recommendation System

Jayashree S P, S Sahana

Assistant Professor, Student Department of Computer Science and Engineering

P.E.S College of Engineering, Mandya

Abstract – Agriculture remains the primary driver of India's economic stability and food security. However, conventional farming heavily relies on subjective experience rather than scientific data, resulting in sub- optimal crop selection, improper resource usage, and heightened vulnerability to changing weather and plant diseases. To resolve these limitations, this paper presents the Smart Crop Recommendation System, an integrated decision-support web platform utilizing Artificial Intelligence, Machine Learning, Deep Learning, and Real-time Weather Analytics. The proposed application evaluates soil composition specifically Nitrogen (N), Phosphorus (P), Potassium (K), and pH levelsalongside environmental parameters including temperature, humidity, and rainfall to accurately recommend optimal crops using Scikit-Learn classification algorithms. Real-time weather forecasting is integrated via the OpenWeather API to guide critical agricultural schedules such as sowing and irrigation. Furthermore, a Deep Learning module employing a Convolutional Neural Network (CNN) detects crop diseases from uploaded leaf images and outputs targeted treatment strategies. Implemented with a Django web framework, SQLite database, Power BI analytical dashboards, and cloud infrastructure, the platform offers an end-to-end digital assistant that boosts yield productivity, minimizes farming risks, and supports sustainable precision agriculture.

Keywords – Smart Agriculture, Crop Recommendation, Machine Learning, Deep Learning, Convolutional Neural Networks (CNN), Soil Analysis (NPK), Weather Analytics, Django, Power BI, Plant Disease Detection.

  1. INTRODUCTION

    Agriculture plays a vital role in food security, economic development, and the livelihood of a large population. However, farmers face several challenges in achieving consistent agricultural productivity due to variations in soil conditions, unpredictable weather, pest infestations, plant diseases, and limited access to timely agricultural guidance. Selecting an unsuitable crop for a particular soil and environmental condition can result in reduced yield, inefficient resource utilization, and financial losses.

    Traditional crop selection practices are often based on farmers' experience, local knowledge, and general observations.

    Figure 1. Home Page

    Although these approaches can be useful, they may not consider multiple soil and environmental parameters simultaneously. Important factors such as Nitrogen (N), Phosphoru(P), Potassium (K), temperature, humidity, pH, and rainfall can significantly influence crop suitability and productivity. Therefore, there is a need for data-driven systems that can analyze these parameters and provide suitable crop recommendations

    The rapid development of Artificial Intelligence (AI), Machine Learning (ML), Deep Learning, Data Analytics, and Web Technologies provides new opportunities for improving agricultural decision-making. Machine Learning techniques can analyze agricultural data and identify patterns that support crop prediction, while Deep Learning techniques can be used for image-based plant disease detection. Weather APIs can further provide real-time environmental information to support farming activities such as irrigation, cultivation, and harvesting.

    The proposed Smart Crop Recommendation System is a web- based platform that combines crop recommendation, plant disease detection, weather monitoring, and analytics. It uses soil and environmental parameters to recommend suitable crops and a CNN model to detect plant diseases from leaf images.

    The system uses the OpenWeather API for real-time weather data and combines ML and Deep Learning to support crop planning and disease detection.

  2. LITERATURE SURVEY

    Recent research in agriculture has increasingly adopted Artificial Intelligence (AI), Machine Learning (ML), and Deep Learning to improve productivity and support data-driven farming decisions. Existing studies mainly focus on crop

    recommendation, plant disease detection, and smart agriculture.

    Machine Learning-based crop recommendation systems analyze soil and environmental parameters such as Nitrogen (N), Phosphorus (P), Potassium (K), pH, temperature, humidity, and rainfall to recommend suitable crops. Algorithms such as Random Forest, Decision Tree, and Support Vector Machine (SVM) are commonly used for crop classification and prediction.

    Deep Learning techniques, particularly Convolutional Neural Networks (CNNs), are used for plant disease detection through leaf image analysis. These systems identify symptoms such as spots, discoloration, and texture changes, helping in early disease diagnosis and reducing crop losses.

    time databases facilitate instant synchronization of donation information across multiple users.

    Smart agriculture systems also integrate AI and IoT technologies to monitor environmental conditions such as temperature, humidity, soil moisture and rainfall. Such information helps farmers improve irrigation, crop planning and resource utilization.

    However, many existing systems focus on individual agricultural tasks rather than providing an integrated solution. The proposed system addresses this gap by combining crop recommendation, plant disease detection, real-time weather monitoring and analytics within a single web-based platform.

  3. PROPOSED METHODOLOGY

    The proposed Smart Crop Recommendation System follows a modular approach that integrates Machine Learning, Deep Learning, weather services, and data analytics. The system is designed to provide farmers with crop recommendations, disease detection, and real-time weather information through a single web-based platform.

    • Crop Recommendation Module

      The farmer provides soil and environmental parameters such as Nitrogen (N), Phosphorus (P), Potassium (K), temperature, humidity, pH and rainfall. After preprocessing the input data, the Machine Learning model predicts the most suitable crop and provides fertilizer suggestions.

    • Plant Disease Detection Module

      Farmers can upload images of plant leaves. The uploaded image is processed by a CNN-based Deep Learning model to identify possible diseases and provide treatment recommendations.

    • Weather Monitoring Module

      The system uses the OpenWeather API to obtain real-time weather information, including temperature, humidity, and

      rainfall conditions. This information supports better crop planning and agricultural decision-making.

    • History and Analytics Module

      The system stores previous predictions and allows users to review their records. Dashboard analytics provide information such as total predictions, crop distribution, feedback, and user activity. PDF and Excel reports can also be generated for further analysis.

      Figure 2. Workflow

  4. SYSTEM ARCHITECTURE

    The proposed Smart Crop Recommendation follows a three-tier architecture consisting of the Presentation Layer, Application Layer, and Data Layer. The architecture integrates crop recommendation, plant disease detection, weather monitoring, and data analytics within a single platform.

    • Presentation Layer

      The presentation layer provides theweb interface through which farmers can register, enter agricultural parameters, receive crop recommendations, upload leaf images, and view prediction results and reports.

    • Application Layer

      The application layer is developed using Django and manages the core system operations. It connects the crop recommendation module, CNN-based disease detection module, weather API, authentication, and data processing components.

    • Data Layer

      The data layer uses SQLite to store user information, crop predictions, disease detection records, feedback, and prediction history. The system also provides dashboard analytics and PDF/Excel report generation.

      The overall architecture enables communication between users, machine learning models, external weather services, and stored agricultural data, providing an integrated platform for intelligent agricultural decision-making.

      Figure 3. Overall System Architecture

  5. IMPLEMENTATION

    The Smart Crop Recommendation System is implemented as a web-based application integrating Machine Learning, Deep Learning, weather services, and data analytics. The major technologies used in the implementation are described below.

    • Frontend Technologies

      The user interface is developed using HTML5, CSS3, JavaScript, and Bootstrap, providing a responsive and user- friendly platform for accessing the system features.

    • Backend and Database

      Django is used as the backend framework for handling application logic and user authentication. SQLite is used to store user details, crop predictions, disease records, feedback, and prediction history.

    • Machine Learning and Deep Learning

      Scikit-Learn is used for the crop recommendation model, while

      TensorFlow/Keras is used for CNN-based plant disease detection. NumPy and Pandas support data processing and analysis.

    • Weather and Analytics

      The OpenWeather API provides real-time weather information. Power BI is used for dashboard analytics and visualization.

    • Report Generation and Deployment

      OpenPyXL and ReportLab are used to generate Excel and PDF reports. The application is deployed using a cloud platform for accessibility.

      Figure 4. Technologies used in Smart Crop Recommendation System

  6. SYSTEM WORKFLOW

    The proposed system follows a structured workflow that begins with farmer input and processes soil and environmental parameters for crop recommendation. The system also supports plant disease detection, real-time weather monitoring, prediction history, and dashboard analytics, providing integrated agricultural decision support.

    • User Registration/Login Farmer securely accesses the system.

    • Input Data Enters soil and environmental parameters such as N, P, K, pH, temperature, humidity, and rainfall.

    • Data Preprocessing The entered data is cleaned and prepared for prediction.

    • Crop Recommendation ML model analyzes the data and recommends a suitable crop.

    • Disease Detection Farmer uploads a leaf image, which is analyzed using a CNN model.

    • Weather Monitoring Real-time weather information is obtained through the OpenWeather API.

    • Prediction History Crop and disease prediction results are stored for future reference.

    • Dashboard & Reports Results are displayed through analytics, and PDF/Excel reports can be generated.

    Figure 5. User Registration/Login

    Figure 6. Input Data

    Figure 7. Crop Recommendation

    Figure 8. Disease Detection

    Figure 9. Weather Monitoring

    Figure 10. Prediction History

    Figure 11. Dashboard & Reports

  7. RESULTS AND DISCUSSION

    The The Smart Crop Recommendation System was successfully developed and tested. The system provides crop recommendations based on soil and environmental parameters, plant disease detection using CNN, real-time weather information, prediction history, dashboard analytics, and report generation.

    The Machine Learning module analyzes parameters such as N, P, K, pH, temperature, humidity and rainfall to recommend suitable crops. The CNN-based disease detection module identifies plant diseases from uploaded leaf images and provides relevant information to the user.

    The integration of the OpenWeather API provides real-time weather information, helping users consider weather conditions during agricultural planning. The dashboard presents prediction records and analytical information in a visual format. The prediction history feature allows users to access previous recommendations and disease detection results, while PDF and Excel report generation improves record management and accessibility.

    Overall, the results demonstrate that combining Machine Learning, Deep Learning, weather services, and web technologies can provide an integrated platform for data-driven agricultural decision-making and support better crop planning and disease identification.

  8. FUTURE ENHANCEMENTS

    The proposed system can be further improved by adding advanced technologies and additional agricultural services:

    • IoT Integration Use sensors for real-time soil and environmental monitoring.

    • Mobile Application Develop Android/iOS applications for easier farmer access.

    • Advanced AI Models Improve crop prediction and disease detection accuracy.

    • Satellite and Remote Sensing Enable large- scale crop and field monitoring.

    • Multilingual Support Provide the system in regional languages.

    • Market Price Analysis Include real-time crop market prices for better crop selection.

    • Government Services Integrate agricultural schemes, subsidies, and expert consultation.

  9. CONCLUSION

    The proposed Smart Crop Recommendation System successfully integrates Machine Learning, Deep Learning, weather services, and web technologies into a single agricultural platform. The system provides suitable crop recommendations based on soil and environmental parameters, detects plant diseases from leaf images, and provides real-time weather information.

    The integration of prediction history, dashboard analytics, and report generation further supports effective agricultural data management. Overall, the system demonstrates the potential of AI-based technologies to support data-driven crop planning, early disease detection, and improved agricultural decision-making.

  10. REFERENCES

For the final research paper, I recommend using proper research-paper references rather than only documentation/web links.

Based on your current project report, the references should cover these areas:

  1. A Crop Recommendation System for Smart Agriculture Using Random Forest Method, IEEE Conference Publication, IEEE Xplore.

  2. Crop Recommendation System using KNN and Random Forest considering Indian Data set, IEEE Conference Publication, IEEE Xplore.

  3. Machine learning based recommendation of agricultural and horticultural crop farming in India under the regime of NPK, soil pH and three climatic variables, Heliyon, vol. 10, no. 3, 2024, Art. no. e25112, doi: 10.1016/j.heliyon.2024.e25112.

  4. AIoT based soil nutrient analysis and recommendation system for crops using machine learning, Smart Agricultural Technology, vol.

    11, 2025, Art. no. 100924.

  5. Tiny ML based crop recommendation system for precision agriculture 5.0, Smart Agricultural Technology, vol. 12, 2025, Art. no. 101247, doi: 10.1016/j.atech.2025.101247.

  6. Towards an Efficient Recommender Systems in Smart Agriculture: A deep reinforcement learning approach, Procedia Computer Science, vol. 203, pp. 825830, 2022, doi: 10.1016/j.procs.2022.07.124.

  7. Data-Driven Crop Recommendation Framework using Machine Learning Models and IoT-Enabled Sensing, Procedia Computer Science, vol. 282,

    pp. 168178, 2026, doi: 10.1016/j.procs.2026.05.065.

  8. Crop Disease Prediction System, 2026 IEEE International Conference on Emerging Synergy Science and Technology (ICESST), 2026, doi: 10.1109/ICESST69086.2026.11582865.

  9. MobilePlantViT-LDA: A Lightweight Hybrid CNN-Transformer Model for Plant Leaf Disease Detection, 2026 International Conference on Computer Networks and Inventive Communication Technologies (ICCNCT), 2026, doi: 10.1109/ICCNCT68477.2026.11590033.