The system will integrate five machine learning models: Crop Recommendation, Crop Yield Prediction, Fertilizer Suggestion, Market Price Prediction, and Plant Disease Detection. Each of these uses supervised learning models such as Random Forest Classifier, Random Forest Regressor, XGBoost, and Convolutional Neural Networks in image-based disease diagnosis. The back-end is developed on FastAPI and Python while the React.js-based frontend allows farmers to input their native soil and environmental parameters in a user-friendly manner. Experimental results demonstrate high performance across models that have attained the accuracies of 95-99% in recommendation and prediction tasks.
Introduction
KhetAI – Smart Farming Advisor is an AI-driven decision support system designed to assist farmers across the agricultural cycle by answering key questions: what to grow, how much, what fertilizer to use, expected market price, and early detection of plant diseases. The system integrates five modules: Crop Recommendation, Crop Yield Prediction, Fertilizer Suggestion, Market Price Prediction, and Plant Disease Detection, using machine learning (Random Forest, XGBoost) and deep learning (CNN) algorithms.
System Architecture & Methodology:
Data Collection & Preprocessing: Datasets from Kaggle, PlantVillage, and data.gov.in are processed through encoding, normalization, outlier detection, and feature analysis.
Model Training & Evaluation: Modules are trained with train-test splits and evaluated using accuracy, R², RMSE, and MAE. Models are serialized (.pkl, .h5) and integrated via FastAPI backend with a React.js/Tailwind frontend.
Module Performance:
Crop Recommendation: 98% accuracy.
Crop Yield Prediction: R² ≈ 0.99.
Fertilizer Recommendation: 98% accuracy.
Market Price Prediction: High R², low RMSE/MAE.
Plant Disease Detection: Initial training accuracy 49% (expected to improve with further training/transfer learning).
Integration & Interface: The backend APIs interact with the frontend for real-time predictions through a user-friendly web interface, providing farmers with actionable insights.
Conclusion
The KhetAI system provides an integrated intelligent platform for artificial intelligence and machine learning in acquiring data-driven insights in agriculture. Integrating these predictive models on Crop Recommendation, Yield Prediction, Fertilizer Suggestion, Market Price Forecasting, and Plant Disease Detection into one web-based decision-support system, the KhetAI effectively addresses main challenges faced by farmers in crop planning, disease management, and market decisions.
References
[1] J. Singh, A. Sharma, and P. Patel, “Machine Learning-Based Crop Recommendation System for Precision Agriculture,” International Journal of Advanced Computer Science, vol. 12, no. 4, pp. 221–230, Apr. 2022.
[2] PlantVillage Dataset – Open Source Leaf Disease Image Dataset, Pennsylvania State University. Accessed: Jan. 2025.
[3] Kaggle, “Crop Recommendation Dataset,” Kaggle Open Data Platform. Accessed: Jan. 2025.
[4] Government of India, “Agmarknet – Agricultural Produce Market Price Data,” Open Government Data (OGD) Platform India. Accessed: Jan. 2025.
[5] T. Chen and C. Guestrin, “XGBoost: A Scalable Tree Boosting System,” in Proceedings of the 22nd ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD), San Francisco, CA, USA, 2016, pp. 785–794.
[6] F. Chollet, “Keras: The Python Deep Learning API,” GitHub Repository, 2015. Accessed: Jan. 2025.
[7] FastAPI Documentation, “FastAPI: High performance web framework for building APIs with Python.” Accessed: Jan. 2025.
[8] Meta Platforms Inc., “ReactJS Documentation.” Accessed: Jan. 2025.
[9] S. R. Chaurasia, “Crop Yield Prediction Using Random Forest Regression,” in IEEE International Conference on Computational Techniques, 2023, pp. 507–512.
[10] R. Hasan, “AI-driven Market Price Forecasting System Using Regression Models,” Journal of Agriculture Informatics, vol. 15, no. 3, pp.