✨
International Publishing Platform
Serving Researchers Since 2012

Krishinova: Precision Crop, Fertilizers and Pesticides Recommendation for Smart Farming

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

Text Only Version

Krishinova: Precision Crop, Fertilizers and Pesticides Recommendation for Smart Farming

Aishwarya H S | Hithaishree B S | Neethushree B P

4MG23CS002 | 4MG23CS022 | 4MG23CS036

Department of Computer Science and Engineering

G. Madegowda Institute of Technology Bharathinagara, Maddur Taluk, Mandya, Karnataka, India

Mrs. Shwetha L

Assistant Professor

Department of Computer Science and Engineering

  1. Madegowda Institute of Technology Bharathinagara, Maddur Taluk, Mandya, Karnataka, India

    Abstract- KrishiNova is an intelligent farming assistant that helps farmers determine ideal crops to grow, suitable fertilizers to use and the type of disease afflicting their plants. It uses data sets, machine learning models, weather data and image processing. The crop recommendation takes the previous crop, previous crop yield and location and uses accessible weather data to estimate soil nutrients. The features are then passed to a Random Forest model. The fertilizer recommendation takes crop and field data. The disease detection uses a convolutional neural network to classify leaf images from the user into 53 different plant health categories. The application has been created using React, Python (Flask) and the MySQL database with SQLAlchemy. The disease detection model had been tested on 13007 validation images. The accuracy, macro F1 score and weighted F1 score were 91.21%, 85.85% and 91.28% respectively. The application also has user authentication, prediction history, feedback, notifications and English-Kannada functionality. The results show that it is possible to create an application which can help provide multiple pieces of advice for farming. However more validation would need to be done in the field for the NPK estimation and recommendations to be used as alternatives to a soil test or professional agronomist.

    Keywords- Smart farming, precision agriculture, crop recommendation, fertilizer recommendation, pesticides, NPK estimation, Random Forest, plant disease detection, convolutional neural network, Flask.

    1. INTRODUCTION

      Agriculture requires decisions to be made regarding what crops to grow, nutritional levels, watering and plant protection. These decisions are based on soil characteristics, weather, previous crop and pests/diseases. Farmers may use their own knowledge or external sources to make these decisions making it hard to get timely and consistent information.

      Using machine learning can help make decisions while farming. Historical data can be analysed to determine patterns. Images can be classified to determine any visible

      plant diseases from leaf images. Incorporating this into an easy to use application means farmers will receive multiple pieces of advice.

      KrishiNova (Precision Crop, Fertilizers and Pesticides Recommendation for Smart Farming) was created by the Department of Computer Science and Engineering at G. Madegowda Institute of Technology. This application incorporates crop recommendation, fertilizers and leaf disease detection, along with weather data, user data, notifications and multilingual.

      1. Problem Statement

        Farmers may not have easy access to a single piece of software that can help them decide what crops to grow, provide nutritional advice and detect plant diseases. Manually determining soil and weather data can be challenging. Farmers may also be using generalised advice for fertilisers and may not be able to quickly detect diseases without expert help. An easy to use decision support system is required that can provide organised information for farming.

      2. Objectives

        1. To Estimate soil nutrient levels using available farm data such as soil type, previous crop yield and region.

        2. To Provide suitable crop and fertilizer recommendations using machine learning techniques and available agricultural data.

        3. To Detect plant diseases from leaf images provided by the user and provide related pesticide/treatment information.

        4. To Provide multilingual (English/Kannada) and voice input.

        5. To Keep a record of predictions, collect feedback from users and provide notifications for crop care.

    2. LITERATURE REVIEW

      Singla et al. (2024) discussed how AI, Machine Learning and IoT can be implemented for predicting crop diseases. This study shows how crop disease can be predicted using data, this can help with crop management, improve fertilizer usage and boost overall agricultural

      productivity. Issues can occur when deploying due to the requirement for large amounts of agricultural data and hardware to collect the data. Due to this, it can become expensive to implement [1].

      Mallikarjun B. C. et al. (2025) proposed a Smart Agriculture System which provides recommendations on the best fertilizer to use. This system uses sensors to collect NPK values from nitrogen, phosphorus and potassium sensors and moisture levels from moisture sensors. The data is then sent using LoRa technology. This allows for low power long range communication of data. This data is then analysed using a deep learning model to provide recommendations on what fertilizer to use. This example shows how crop data can be obtained from sensors and machine learning can be used for precision agriculture. However, the system would rely on having sensors to collect data, LoRa nodes and receiving hardware. This can increase the cost of installation [2].

      Deepika et al. (2025) proposed Precision Crop Care: Leaf Infection Analytics and Fertilizer Advice. This paper discusses a new way of detecting and classifying plant leaf diseases using an image pre-processing stage and ResNet-CNN (based on residual networks). The pre- processing stage involves removing noise, balancing brightness and colour and resizing. The ResNet based model will extract textural features and vein features from the leaf to classify the leaf. The decision making module will link the leaf disease to the correct agricultural advice. This shows how image detection can be used alongside treatment advice. However, this will depend on having the correct training images and images will need to be of a high quality. Lighting, background and leaf issues will affect the performance [3].

      Patel et al. (2025) proposed Plant Care: Leaf Disease Detection & Crop Recommendation System. This combines machine learning and IoT. The disease detection section uses a convolutional neural network to classify the image. The crop recommendation section uses a Random Forest classifier. The system also has NPK, temperature and moisture levels using IoT. The paper shows that this system has a high accuracy of around 97% for leaf disease detection and 95% for crop recommendation. This shows how image recognition, sensor data and table based machine learning can be combined into an agricultural support system. However, this relies on having sensors in the field and the quality of the training data will affect the predictions [4].

      The studies show that AI, Machine Learning, Deep Learning, Image Processing and IoT can be used to support various aspects of agriculture. Singla et al. focus on using AI to predict crop diseases and the need for data and infrastructure for smart farming [1]. Mallikarjun et al. focus on real time monitoring of soil nutrients and moisture levels using LoRa to provide recommendations on fertilizer and pesticides [2]. Deepika et al. focus on pre-processing images and using ResNet-CNN to classify diseases [3]. Patel et al. focus on combining CNN disease recognition, Random Forest crop recommendation and IoT monitoring

      in the field [4].

      Overall the systems do provide some useful solutions but there is a lot of focus on sensor data in the field. KrishiNova is a software solution which provides recommendations on crops, fertilizer, crop disease and any related pesticides or treatments. The crop recommendation will use previous crop and yield information, along with region, location and weather information. The NPK values are estimated and will need to be verified. The system also contains farmer information, prediction history, feedback and notifications. The system will allow multiple recommendations in one app without the need for sensors in the field. Recommendations will act as decision making information and will need to be verified at the field level by experts.

    3. PROPOSED SYSTEM

      Overall KrishiNova will be using a Client-Server architecture. The farmer can interact with the web interface and input values to the Flask backend. These requests are processed by the appropriate route in the backend. The backend runs the correct recommendation/prediction service. Input from the user is processed by the Machine Learning models. User data, prediction data and feedback is stored using MySQL and SQLAlchemy ORM.

      1. Crop Recommendation

        The farmer inputs what crop was grown previously, yield and region. If allowed and service is available, the application will determine the location and use the weather service to find relevant information (temperature, humidity, rainfall). The backend will calculate estimated NPK values using the estimation method. The data will then be passed to the crop recommendation model. The Random Forest model makes a prediction on the best crop to grow based on the available soil and environmental features.

      2. Fertiliser and Pesticide Recommendation

        The fertiliser recommendation section will be separate to the crop recommendation. The farmer selects what crop is currently being grown and enters any available information about their crop (previous crop, yield, soil type, region and environmental factors). This data is processed by the fertiliser recommendation model/algorithm. Disease related pesticide recommendations and treatments are found using the knowledge base if there is a matching disease entry.

      3. Plant Disease Detection

      The farmer uploads an image of their plant leaf. The backend will ensure the image is valid and store the image. The image will be preprocessed and passed to the CNN model. The original model outputs a probability for each of the 53 output classes. The index of the class is matched using the labels.json file to determine what plant and disease has been predicted. The application will check the knowledge base for any available information on the causes, treatment and pesticides of the disease.

    4. METHODOLOGY

      1. Data Collection and Preprocessing

        The project contains structured data relating to crops and fertilisers and unstructured image data relating to plant diseases. The structured data has been preprocessed to ensure correct columns are present, missing/inappropriate values have been handled and categorical variables encoded appropriately. The leaf images have been read, converted to RGB and scaled to 160×160 pixels. The disease model contains an inbuilt scaling layer.

      2. Crop Recommendation Model

        A Random Forest model has been used for the crop recommendation. It works well with tabular data and combines predictions from multiple decision trees. The crop data contains N, P, K, temperature, humidity, pH and rainfall as features. The target variable is the crop name. The farmer will enter the previous crop, yield and region. The backend will provide or calculate the additional features.

      3. Fertiliser Recommendation Model

        The fertiliser recommendation section will use the current crop, soil data, crop history and environmental data. The project contains fertiliser data with around 10,000 rows and 20 columns. Please see the results of the real test set to understand how the final results will perform.

      4. CNN Disease Classifier

        The disease model has been created using TensorFlow and Keras. The original model had an input shape of 160×160×3 and 53 output classes. The class with the highest probability will be selected and matched to the class name using the labels.json. The disease will be matched to entries in the knowledge base (local JSON).

      5. Application Features

      The application allows farmers to register/login, view a dashboard, view prediction history, give feedback/rating, receive notifications, translate between English and Kannada and provide voice input. The frontend will communicate with the backend using routes. The backend services will communicate with MySQL using SQLAlchemy ORM. The weather will be found using the weather service.

    5. TOOLS & TECHNOLOGIES

      Python and Flask were used for the backend of the application. React.js and web technologies were used for the frontend. MySQL was used for the data storage with SQLAlchemy ORM. Scikit-learn, Pandas and NumPy were used for data manipulation and machine learning. TensorFlow and Keras were used for deep learning. OpenCV and Pillow were used for image processing. Visual Studio Code was used as the development environment. Open-Meteo and Nominatim were used for weather and location service.

    6. IMPLEMENTATION

      The system consists of a frontend, backend, machine learning, dataset, knowledge base and SQL database. The frontend includes screens for logging in, farmer dashboard, recommendations, uploading leaf images and the results. Requests are sent to routes in flask and the correct service is called. The crop and fertiliser modules take in structured data. The disease service calls the trained CNN model. Disease, fertiliser and pesticide information are stored in local JSON files within the knowledge base. The SQL database is manipulated using SQLAlchemy ORM and migrations are used for any schema changes.

      The crop module takes in past crop, past yield and region. It then gathers available weather information and creates predicted soil nutrient data. The fertiliser module takes in current crop and field information. The disease module checks the uploaded image is valid, pre-processes the image and makes a prediction of 1 of the 53 classes. Prediction history and feedback are tracked in the supporting services. Language and notifications are also available.

    7. RESULTS & DISCUSSION

      1. Disease Detection

        The 53-class disease model was tested with 13007 validation images. The model reached an accuracy of 91.21%, macro precision of 86.32%, macro recall of 87.08%, macro F1-Score of 85.85% and a weighted F1- Score of 91.28%. These results show that the model performs well with the validation data created. However, there is no guarantee that this would perform with the same accuracy with images taken in the field as lighting, background, quality of camera and severity will differ.

      2. Functionality

        When testing the diagnosis functionality of the original model, the validation image of Apple scab was

        correctly identified with a predicted probability of 99.91% and the validation image of Tomato (healthy) was correctly identified with a predicted probability of 99.88%. This only shows that the two examples tested were predicted correctly. When testing the upload function, it was noticed that the same prediction of Eggplant (insect pest) was repeatedly predicted. This means that the upload pathway and end to end inference needs to be validated further to ensure that it is reliable in the real world.

      3. Crop & Fertiliser

        The crop and fertiliser modules had an accuracy of 99.09% and 86.95% respectively when tested in the project presentation. No further information was inferred from these results. The test data should be kept to ensure the model can be reproduced.

      4. Discussion

      The results show that it is possible to create a web application with multiple advisory modules for agriculture. The disease classifier has been quantitatively validated. The crop and fertiliser modules have been tested with the

      reported accuracy. The NPK estimation will need to be tested separately with actual soil measurements. The recommendations should be taken as guidance only.

    8. CONCLUSION

      KrishiNova is a holistic intelligent solution that helps farmers in crop recommendation, fertilizers and pesticides, and plant diseases. Our system consists of many technologies such as the React framework, Flask framework, MySQL database, and Machine Learning. We have provided many features to simplify the usage of the system for the farmers such as history, feedback, alerts, and English to Kannada. Our disease detection model had an accuracy of 91.21% for 13,007 validation images for 53 classes. We have achieved an accuracy of 99.09% for crop recommendation and 86.95% for fertilizers. Further improvements must be made to ensure that our NPK estimation is correct by comparing it to actual measurements. Also, we must ensure that the problem of consistent prediction for certain uploaded images. Our system KrishiNova will be a starting point for accessible data driven decisions for farmers.

    9. FUTURE SCOPE

We can enhance our project by gathering more data from across the region relating to the crop history, output, location, and actual NPK measurements. Improve our NPK estimation by comparing it to lab results. Improve our fertilizer recommendation using data from the field. Test our disease detection on a variety of images from farms. Implement a explainable AI so farmers know why recommendations are being made. Improve weather and crop care predictions. Improve the Kannada speech recognition and vocabulary. Add support for mobile devices and offline. Add support for satellite or remote sensing information.

(ICTBIG), 2025.

https://doi.org/10.1109/ICTBIG68706.2025.11323724

[4] A. Patel, B. Patel, R. Vasoya, Z. Shah, "Plant Care: Leaf Disease Detection & Crop Recommendation System", In 4th OPJU International Technology Conference (OTCON), 2025.

https://doi.org/10.1109/OTCON65728.2025.11071112.

ACKNOWLEDGMENT

We would like to thank Mrs. Shwetha L, Assistant Professor, Department of Computer Science and Engineering, G. Madegowda Institute of Technology, for her guidance and support. We would also like to thank our

Department of Computer Science and Engineering and institute for giving us this opportunity and resources.

REFERENCES

  1. M. Singla, D. Gupta, R.K. Dang, Integrating Smart Farming with AI Techniques For Crop Disease Prediction. (All the details of the publication werent given during the project presentation so it was completed with the full source details including the volume page numbers and DOI).

  2. M.B.C Mallikarjun, K.S. Karthik, A.K.M.B. Akhil Kumar, C.S. Jain,

    A.T.G Anirudh, "Smart Agriculture With Fertilizer/Pesticide Recommendation System", In 3rd International Conference on Smart Systems for Applications in Electrical Sciences (ICSSES), 2025. https://doi.org/10.1109/ICSSES64899.2025.11009330

  3. P. Deepika, J.J.B Jayachandran, K. Rajkumar, S. Mandu, D. Sravanthi, A.T. Reddy, "Precision Crop Care: Leaf Infection Analytics & Fertilizer Advice", In IEEE 5th International Conference on ICT in Business Industry & Government