🔒
Global Research Press
Serving Researchers Since 2012

Smart Crop Yield Forecasting with CNN and Mobile-Based User Input

DOI : 10.17577/IJERTCONV14IS010040
Download Full-Text PDF Cite this Publication

Text Only Version

Smart Crop Yield Forecasting with CNN and Mobile-Based User Input

Nithesh

Student, St. Joseph Engineering College, Mangalore

Rakshitha P

Assistant Professor, St. Joseph Engineering College, Mangalore

Abstract – Agriculture forms the foundation of the Indian economy, providing a large portion of the work and livelihood of the population. However, the latest fast climate change and unstable environmental factors have made harvest yields extremely difficult. This has led to poor yields on farmers and increased pressure. The purpose of this study is to support both new and experienced farmers by creating crop prediction systems with machine learning. Revenue forecasts were generated using CNN algorithm for deep learning by considering various agricultural factors related to crop yield, such as harvest, season, condition, area, cultivation, and amount of fertilizer and pesticides. We have developed a special application for users to manually enter parameters. This provides predictable knowledge to support decision processes related to plant growth. The model trained with TensorFlow and Python code shows reliable paths to improve revenue forecasting and decision-making in agriculture.

Keywords – CNN, machine learning,TensorFlow, Python, precision farming, KrishiSetu

  1. INTRODUCTION

    Agriculture acts as the foundation stone across the Indian economy, produces billions of income . Traditionally seen as an economic spine, it plays an major role not only for the food production and also to create value-added products and promote rural economic growth, ensuring food security for 400 million homes. However, despite its vast contribution, the sector faces significant obstacles. Major challenges include the issues with climate change and irregular weather patterns, soil quality (including mineral content and decline) and strongly uncertainty of chronic farming practices. When you look at the big picture, these factors create more uncertainty for farmers. This, in turn, reduces crop income, sparks an economic crisis, and decreases agricultural productivity overall. India's declining agricultural contribution to GDP highlights these challenges, dropping by 17.2% in 2005, 11.1% in 2012, and another 2% in early 2020. These numbers hit the farming community the to hardest, revealing serious problems in key agricultural systems. therefore 80% of agricultural workers are small and marginal

    farmers. The unpredictability of income makes hard to tell from the financial results of agriculture and speculative investments.

    Because of the technology is become more important in farming specially machine learning (ML).

    With the help of technology, farmers can use ML techniques to analyzing the huge data records and discover patterns that cannot be recognized by human. This kind of technology allow farmers to make more efficient decisions.

    In this context, we propose the intelligent solutions for farmers to use intelligent techniques called folding networks (CNNs) to enable farmers to understand crop yields. Our solution is part of an Android-based, fully developed mobile application, as an KrishiSetu with the intended goal of creating a bridge from advanced agricultural knowledge to farmer's daily decision- making

    KrishiSetu: Smart Agricultural Assistant

    KrishiSetu has been conceived as a comprehensive agricultural platform, which is an all-in-one digital solution for farmers. This enables the farmers to input major factors including such as crop types, current weather conditions, geographical locations, planted area and fertilizer and pesticide used. Depending on this data, a trained firm nerve network (CNN) model predicts the expected yield. This CNN model, developed using python and TensorFlow, has been trained on broad historical agricultural data, which enables it to provide highly accurate estimates. These predictions empower the enables farmers to make data- driven choices before the planting cycle starts

    KrishiSetu separates itself from other digital farm management solutions through its integrated approach to digital farming:

    • User Management: Farmers can register, update their profiles, and attach the system through individual dashboard.

    • Crop calendar and scheduling: Users can maintain planting programs based on crop, soil and weather information.

    • Crop produce module: CNN method uses the method to predict the yield based on the existing input.

    • Product Market: All users allow to make listing and sell agricultural products, fertilizers and production.

    • Order Management: Applies to order tracking, payment connection and delivery logistics

    • Community engagement: A social component for the app where user can share experience, question and solution.

    • Learning: Tutorials, expert advice and video created by agricultural experts.

    • Administrator Control: Provides facilities to manage the system moderate, approval materials and platforms.

    In providing these capabilities, agriculture is more than an forecast equipment-it is a complete agricultural-technical ecosystem. This enables informed decisions, enhances productivity, promotes cooperation, and connects farmers with markets and sources of knowledge.

    The objective of this study is to examine how Convolutional Neural Networks (CNNs) were designed and trained, and to demonstrate their integration within the KrishiSetu App. It also evaluates how this technology enables traditional farming practices in becoming more data-driven, adaptive, and ultimately more profitable.

  2. LITERATURE REVIEW

    Over time, the machine learning (ML) has become a valuable tool in agricultural research, especially to predict crop types and assess yields. Traditional agricultural practices often lead to lack of accuracy and conflict with efficient data management, resulting in errors and inconsistent consequences. To solve these challenges, many in the agriculture sector are now hugging advanced ML models capable of examining historical data and provide more accurate and reliable insight.

    1. Kalimuthu et al. A naive beauty classifier was created to predict the best crops based on environmental characteristics such as temperature, humidity and moisture content. He developed a mobile phone application, which allowed individuals to input basic environmental parameters, and it automatically produced a prediction for the most suitable crop. This study showed how ML can help novice farmers by providing suggestions in more accessible mobile technology context.

    2. Shreepati rao et al undertook research to evaluate crop suitability in tamilnadu employing multiple supervised machine learning techniques, including k-nearest neighbors (KNN), decision tree (DT), and random forest (RF). The model was trained using important agricultural characteristics like soil pH, nitrogen and potassium levels, rainfall, and humidity. Their findings indicated that the random forest algorithm yielded the highest accuracy, attaining a performance of 99.32%, surpassing the other models. The system also have an android app with GPS abilities, which helped farmers helps the right crops, forecast rainfall, and get well timed advice on fertilizer utilization.

    3. ElbC et al. To are expecting crop yields, a deep comparative examine of 15 system studying algorithms. He evaluated guide vector regression, balloting regression and random forest based on totally on real climate and soil records. He concluded that soil propertiessuch as NPK content, moisture levels, and the accuracy of pH predictionhad a significant impact. The author mentioned he phone totally clever-forming utilities, consisting of local choice belongs to the crop desire, irrigation and advertising and marketing, in conjunction with supervised studying facilities to help the farmer.

    4. Gautham et al. Another research study focused on predicting the yield by integrating soil figures, irrigation costs, and crop-specific variables, using several algorithms including decisions trees, naive bays and KNN. KNN achieved more accuracy than the decision tree and thus had a more suitable algorithm for dataset with separate soil and input variables.

    5. Thani et al. In predicting crop yields, the effectiveness of the predictive model was detected, enhanced using adbost techniques with naive bays and support vector machine (SVM) algorithm, also know n as Adanaive and AdasVM. Hi research highlighted the significance factors such as rain and temperature are affecting crop yield. They found that the adaboost-enhanced models achieve better performance than when using a single algorithm alone. The system also included a simple and interactive interface, making it easy for users to access and understand predictions.

    6. Manjunath et al. The support vector machine (SVM) and decision provided a crop recommender system using tree techniques. The user was fully felt by taking inputs with inputs

      -taking sensor data (eg temperature, humidity, soil pH, etc.), and would receive a recommendation for crops growing, fertilizer types and quantity and estimated market prices. They also depended on government data, which is available to farmers, in addition to the weather reports as well as their model to increase the performance and regional specificity

  3. DATA AND METHODOLOGY

      1. Problem Description

        This research concentrates primarily on. designing and developing an intelligent and automatic crop yield prediction system to assist farmers in selecting the correct crops and estimating potential yield based on necessary agricultural inputs. As currently it stands up, the yield estimate mainly depends on manual projections or old data, lack of ability to specify current and accurate data for their region, thus wrong yields result in forecast that are not informed by local environmental conditions. Most research focuses on using a firm nervous network and deep learning methods to give accurate and real-time crop output predictions according to the data provided by the farmer. The objective of this study is to support farmers in making better plans and increasing

        productivity by providing them with informed information that enables them to make important decisions..

      2. Dataset Details

        The training dataset for the prediction model is a carefully selected agricultural dataset called Crop_yield. csv, which includes past crop yield information and details about farming practices. Dataset has over 10,000 entries related to many seasons in India and many crops in various geographical states. Details of each entry include:

        Crop type, weather, state, region's cultivation (hectares), fertilizer input (kg/hectare), pesticide input (kg/hectare), yield (target variable which is quintal/hectare)

        The information was taken from the most recent government agriculture report and the published research data set. All records were cleaned to remove inaccuracy, duplicate and incomplete values to ensure that the statistical sound and strong for the model's training phase.

      3. Data Preroposing

        The data was prepared for data as a condition to train the model and to help the model to standardize the data: Categorical information like crop types and seasons was changed into numbers using label encoding. Numerical regions were generalized, areas, fertilizers and pesticides were extended between 0 and 1. The labeled dataset was split into training and test sets with an 80:20 ratio. To address class imbalance, we used SMOTE to generate synthetic samplespaying special attention to underrepresented crop typeswhich helped improve the models generalization. To reduce any possible slant on learning, the outlairs were located and smooth" using the Interquerial Range (IQR) filtering

      4. Model architecture

        Figure 3.1

        The proposed model uses the Convolutional Neural Network (CNN) architecture designed to process structured agricultural data in a multi-dimensional tensor format. The input layer

        takes six key features: crop type, season, state, region, fertilizer usage, and pesticide application.

        The model has three 1D convolutional layers in a row. It uses 32, 64, and 128 filters. Each layer uses a filter size of 3 and the ReLU activation function to learn features. After every convolution layer, max pooling is applied to lower the scale of the records and assist allow the model to generalize better Dropout layers was implemented with the dropout rate of 0.25 and 0.5 to reduce overfitting. the last convolutional layer, output is flattened and sent through a dense (completely related) layer with 64 neurons. The output layer consists of a single neuron it have a linear activation function that predicts the crop yield price.

      5. Training configuration

    We built a CNN model with TensorFlow and Keras, training it on single samples featuring an input shape of (6, 1). The model was trained in batches of 32 samples over a maximum of 100 epochs, using the Adam optimizer (initial learning rate = 0.001) to maintain stable convergence. For this kind of crop yield prediction task (a regression problem), we employed mean squared error (MSE) as the loss function and assessed performance using MAE, RMSE, and R-squared metrics.To prevent overfitting, we implemented early stopping – the training would automatically halt if validation loss failed to improve for 10 consecutive epochs. After fine-tuning, we packaged the model for deployment in our mobile farm app, where it analyzes real field data to give farmers precise yield estimates.

  4. RESULT ANALYSIS

    This study described a real-time a crop forecasting model based on a CNN-based model for mobile devices. Farmers using our system get instant yield predictionsjust enter your field details and see your harvest forecast in seconds. which proves more accurate than traditional methods. Developed in Python and TensorFlow, we trained and tested the model using real farm records to guarantee reliable performance.

    1. CNN Model Performance

      The CNN model was designed to process structured agricultural data. the model integrates needful agricultural variables such as crop type, local weather conditions, geographic location (state), cultivated area, and input usage (fertilizers and pesticides). Following rigorous data cleaning and preprocessing, we split the dataset into three subsets: training, validation, and testing. The CNN was trained using the Adam optimizer for a maximum of 100 epochs, incorporating early stopping to mitigate overfitting.

      The finalized model demonstrated high predictive accuracy, achieving high accuracy and low error rates while demonstrating robust generalization on unseen data. Specifically, it attained 94.2% training accuracy, 91.8%

      validation accuracy, and 90.5% test accuracy, underscoring its reliability for crop yield prediction. The model delivers excellent forecasting results, with an MSE of 0.085 (RMSE: 0.291) and an impressive R² score of 0.905 – showing it can reliably predict future outcomes. The learning curves demonstrate stable convergence, with training and validation loss decreasing in tandem – a clear indication that the model performs effectively on unseen data without overfitting.

      Figure 4.1: CNN Training vs Validation Accuracy and Loss

    2. Comparative Model Evaluation

      To validate the CNN models effectiveness, we benchmarked it against conventional approachesincluding Random Forest, SVM, and Linear Regresionusing identical training data and standard performance metrics.

      The CNN outperformed all other models in accuracy and error. Random Forest achieved an accuracy of 87.2% while SVM scored 84.6%. The CNN model surpassed both with an accuracy of 90.5% and the lowest RMSE of 0.291. This shows that the CNN is a good choice for high-dimensional and nonlinear agricultural data, where conventional models struggle to identify patterns.

      Figure 4.2: Comparative Performance of CNN and Traditional ML Models

    3. Mobile Application Deployment

    To ensure the practical use of the CNN model, we integrated it into a custom Android application, called the KrishiSetu. The app focused on simple and user adapted. This allows farmers to reach important agricultural information such as crop types, weather conditions, farming areas, rain, fertilizers and pesticides. After submitting the information, the app processes

    it using the trained CNN model and shows an estimated yield on the screen

    Figure 4.4: KrishiSetu – Mobile App Interface for Yield Prediction

  5. FUTURE SCOPE

    While the current system already gives accurate and useful predictions, were working on some exciting upgrades. We can adding real-time seasonal data via APIs to make things more better By consistent updating weather and climate information, and can make predictions even more precise and up-to-date.

    Were also exploring the use of IoT deviceslike soil moisture sensors, pH meters, and drone imageryto automatically feed data into the system. This can be remove manual data entry, thus enabling the whole process more efficiently and fully automated.

    Future work will extend the system to support intercropping, provide field-specific advice for the farmers, and even add multilanguage support to help farmers overall the India. Another big step would be combining yield predictions with price forecasts, giving farmers complete guidancefrom planting to selling their crops.

  6. CONCLUSION

    This research provides a complete solution to estimate crop yields through the use of Convolutional Neural Networks (CNN) in a mobile application designed for farmers. By combining deep learning with real agricultural data, the model acquired a test accuracy of 90.5%. This performance achieves significantly better results than traditional approaches such as random forest and linear regression.

    The application called KrishiSetu enables farmers easily enter agricultural details and achieve quick, data-operated yield forecast. It also includes modules for education, product management and user interactions, making it more than only one prediction tool. It acts as a complete agricultural assistance system.

    High accuracy of the system, rapid response time and user – friendly design suggest that it can be widely adopted, especially by small and marginal farmers in India. With the ongoing updates such as real-time season integration and sensor-based automation, this platform can contribute significantly to the future of accurate farming and sustainable agriculture.

  7. REFERENCES

  1. Kalimuthu, M., P. Vaishnavi, and M. Kishore. "Crop prediction using machine learning." 2020 third international conference on smart systems and inventive technology (ICSSIT). IEEE, 2020.

  2. Rao, Madhuri Shripathi, et al. "Crop prediction using machine learning." Journal of Physics: Conference Series. Vol. 2161. No. 1. IOP Publishing, 2022.

  3. Elbasi, Ersin, et al. "Crop prediction model using machine learning algorithms." Applied Sciences 13.16 (2023): 9288.

  4. Champaneri, M., Chachpara, D., Chandvidkar, C. and Rathod, M., 2016. Crop yield prediction using machine learning. Technology, 9(38).

  5. Patil, Pavan, Virendra Panpatil, and Shrikant Kokate. "Crop prediction system using machine learning algorithms." Int. Res. J. Eng. Technol.(IRJET) 7.02 (2020).

  6. Nischitha, K., et al. "Crop prediction using machine learning approaches." International Journal of Engineering Research & Technology (IJERT) 9.08 (2020): 23-2