论文信息
论文解读
AI 辅助整理- 方法
- 1500张土壤图像经颜色校正与特征提取,比较五种机器学习模型及CNN基准。
- 发现
- 最优模型因养分和指标而异,XGBoost对磷、随机森林对钾表现最佳。
- 机会点
- 需用独立田间数据验证跨环境鲁棒性,可探索多源图像融合与轻量化边缘部署。
论文摘要
精准农业的最新进展使得利用机器学习和图像处理技术快速评估土壤养分成为可能。本研究提出了一种非破坏性方法,通过相机拍摄数字土壤图像并借助专用软件进行分析,以估算土壤养分含量。研究使用颜色校正、降噪和特征提取技术处理了包含1,500张土壤图像的数据集,以提高数据质量。评估了五种机器学习模型——随机森林(Random Forest)、极端梯度提升(XGBoost)、轻量梯度提升机(LightGBM)、梯度提升机(GBM)和堆叠回归器(Stacking Regressor)——对氮、磷、钾含量的预测性能,并以基于卷积神经网络(CNN)的深度学习模型作为基准。没有单一模型在所有养分和评价指标上均表现最佳。对于氮,GBM取得了最低的测试MAE(0.1652),而堆叠回归器取得了最高的测试R²(0.9886)。对于钾,随机森林取得了最低的测试MAE(0.0051),而XGBoost取得了最高的测试R²(0.9999)。对于磷,XGBoost同时取得了最低的测试MAE(0.1558)和最高的测试R²(0.9929)。因此,最佳性能模型取决于养分类型和评价指标。仍需使用独立的田间数据集进行进一步验证,以确定其在不同环境条件下的稳健性。
全文
Computing and artificial intelligence.Image-Based Soil Nutrient Prediction Using Machine Learning and Deep Learning Models
Abstract
Recent advances in precision agriculture have enabled the use of machine learning and image processing for rapid soil nutrient assessment. This study presents a non-destructive approach for estimating soil nutrient content from digital soil images captured using a camera and analyzed through specialized software. A dataset of 1,500 soil images was processed using color correction, noise reduction, and feature extraction techniques to improve data quality. Five machine learning models, Random Forest, Extreme Gradient Boosting (XGBoost), Light Gradient Boosting Machine (LightGBM), Gradient Boosting Machine (GBM), and a Stacking Regressor, were evaluated for predicting nitrogen, phosphorus, and potassium levels. A Convolutional Neural Network (CNN) based deep learning model was served as a benchmark. No single model was best for every nutrient and metric. For nitrogen, GBM achieved the lowest test MAE (0.1652), whereas the Stacking Regressor achieved the highest test R² (0.9886). For potassium, Random Forest achieved the lowest test MAE (0.0051), whereas XGBoost achieved the highest test R² (0.9999). For phosphorus, XGBoost achieved both the lowest test MAE (0.1558) and the highest test R² (0.9929). Thus, the best-performing model depends on the nutrient and evaluation metric. Further validation using independent field datasets is required to establish robustness under diverse environmental conditions.
Computing and Artificial Intelligence,
4(3). https://doi.org/10.59400/cai4241
Copyright (c) 2026 Preity Mishra, S.K. Chaulya, Vikash Kumar, Naresh Kumar, Abhinek Agarwal, Anant Stephen Besra
This work is licensed under a Creative Commons Attribution 4.0 International License.
References
[1]Davenport, J.R.; Jabro, J.D. Assessment of hand-held ion selective electrode technology for direct measurement of soil chemical properties. Commun. Soil Sci. Plant Anal. 2001, 32, 3077–3085. DOI: https://doi.org/10.1081/CSS-120001108
[2]Meenakshi, M.; Naresh, R. Soil health analysis and fertilizer prediction for crop image identification by Inception-V3 and Random Forest. Remote Sens. Appl.: Soc. Environ. 2022, 28, 100846. DOI: https://doi.org/10.1016/j.rsase.2022.100846
[3]Kanade, P. Soil Analysis using machine learning. Br. J. Multidiscip. Adv. Stud. 2023. 4, 1–11. DOI: https://doi.org/10.37745/bjmas.2022.0350
[4]Sheeba, T.B.; Vijay, A.L.D.; Manohar, G.; Saravana, S.C.; Bazil, W.C.; Muthukumar, K. Machine learning algorithm for soil analysis and classification of micronutrients in IoT-enabled automated farms. J. Nanomater. 2022. DOI: https://doi.org/10.1155/2022/5343965
[5]Li, D.; Li, C.; Yao, Y.; Li, M.; Liu, L. Modern imaging techniques in plant nutrition analysis: a review. Comput. Electron. Agric. 2020. 174, 105459. DOI: https://doi.org/10.1016/j.compag.2020.105459
[6]Puno, J.C.; Sybingco, E.; Dadios, E.; Valenzuela, I.; Cuello, J. Determination of soil nutrients and pH level using image processing and artificial neural network. In 9th International Conference on Humanoid, Nanotechnology, Information Technology, Communication and Control, Environment and Management, HNICEM 2017, 2017, pp. 1–6, IEEE. DOI: https://doi.org/10.1109/HNICEM.2017.8269472
[7]Padarian, J.; Minasny, B.; McBratney, A.B. Using deep learning to predict soil properties from regional spectral data. Geoderma Reg. 2019. 16, e00198. DOI: https://doi.org/10.1016/j.geodrs.2018.e00198
[8]Petersen, C.T.; Abrahamsen, P. Predicting effects of soil compaction on crop yield and nitrogen dynamics. Department of Plant and Environmental Sciences, University of Copenhagen. 2021. Retrieved from https://daisy.ku.dk/projects-and-collaboration/projects/commit/Simulating_compaction_effects_gudp.pdf
[9]Gomes, W.P.C.; Gonçalves, L.; da Silva, C.B.; Melchert, W.R. Application of multispectral imaging combined with machine learning models to discriminate special and traditional green coffee. Comput. Electron. Agric. 2022, 198, 107097. DOI: https://doi.org/10.1016/j.compag.2022.107097
[10]Attri, I.; Awasthi, L.K.; Sharma, T.P.; Rathee, P. A review of deep learning techniques used in agriculture. Ecol. Inform. 2023, 77, 102217. DOI: https://doi.org/10.1016/j.ecoinf.2023.102217
[11]Padarian, J.; Minasny, B.; McBratney, A.B. Machine learning and soil sciences: a review aided by machine learning tools. Soil. 2020, 6, 35–52, https://doi.org/10.5194/soil-6-35-2020
[12]Benos, L.; Tagarakis, A.C.; Dolias, G.; Berruto, R.; Kateris, D.; Bochtis, D. Machine learning in agriculture: a comprehensive updated review. Sensors, 2021, 21(11), 3758. DOI: https://doi.org/10.3390/s21113758
[13]Aggarwal, L.; Sachdeva, S.; Goswami, P. Quantum healthcare computing using precision based granular approach. Appl. Soft Comput. 2023, 144, 110458. DOI: https://doi.org/10.1016/j.asoc.2023.110458
[14]Meng, T.; Jing, X.; Yan, Z.; Pedrycz, W. A survey on machine learning for data fusion. Inf. Fusion. 2020, 57, 115–129. DOI: https://doi.org/10.1016/j.inffus.2019.12.001
[15]Kashyap, B.; Kumar, R. Sensing methodologies in agriculture for soil moisture and nutrient monitoring. IEEE Access. 2021, 9, pp. 14095–14121. DOI: https://doi.org/10.1109/ACCESS.2021.3052478
[16]Buthelezi, K.; Kibirige, D.M.K.; Buthelezi-Dube, N.N. The evolution of methods and tools used to assess soil health indicators − a scoping review. Geoderma, 2026, 468, 117765. DOI: https://doi.org/10.1016/j.geoderma.2026.117765
[17]Lin, J.; Wang, M.; Zhang, M.; Zhang, Y.; Chen, L. Electrochemical Sensors for Soil Nutrient Detection: Opportunity and Challenge. In: Li, D. (eds) Computer and Computing Technologies in Agriculture, Volume II. The International Federation for Information Processing, 2008, vol. 259. Springer, Boston, MA. DOI: https://doi.org/10.1007/978-0-387-77253-0_77
[18]Najdenko, E.; Lorenz, F.; Dittert, K.; Olfs, H.W. Rapid in-field soil analysis of plant-available nutrients and pH for precision agriculture - a review. Precision Agric. 2024, 25, 3189–3218. DOI: https://doi.org/10.1007/s11119-024-10181-6
[19]Wolpert, D.H. Stacked generalization. Neural Netw. 1992, 5(2), 241–259. DOI: https://doi.org/10.1016/S0893-6080(05)80023-1
[20]Breiman, L. Random forests. Mach. Learn. 2001. 45(1), 5–32. DOI: https://doi.org/10.1023/A:1010933404324
[21]Friedman, J.H. Greedy function approximation: a gradient boosting machine. Ann. Stat. 2001, 29(5), 1189–1232. DOI: https://doi.org/10.1214/aos/1013203451
[22]Chen, T.; Guestrin, C. XGBoost: A scalable tree boosting system. In Proceedings of the 22nd International Conference on Knowledge Discovery and Data Mining. 2016. pp. 785–794, ACM. DOI: https://doi.org/10.1145/2939672.2939785
[23]Ke, G.; Meng, Q.; Finley, T.; Wang, T.; Chen, W.; Ma, W.; Liu, T.Y. LightGBM: A highly efficient gradient boosting decision tree. In 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. https://proceedings.neurips.cc/paper_files/paper/2017/file/6449f44a102fde848669bdd9eb6b76fa-Paper.pdf
[24]Liakos, G.K.; Busato, P.; Moshou, D.; Pearson, S.; Bochtis, D. Machine learning in agriculture: a review. Sensors. 2018, 18, 2674. DOI: https://doi.org/10.3390/s18082674
[25]Wu, C.; Chen, Y.; Hong, X.; Liu, Z.; Peng, C. Evaluating soil nutrients of Dacrydium pectinatum in China using machine learning techniques. For. Ecosyst. 2020, 7, 30. DOI: https://doi.org/10.1186/s40663-020-00232-5
[26]Xu, Z.; Guo, X.; Zhu, A.; He, X.; Zhao, X.; Han, Y.; Subedi, R. Using deep convolutional neural networks for image-based diagnosis of nutrient deficiencies in rice. Comput. Intell. Neurosci. 2020, 7307252. DOI: https://doi.org/10.1155/2020/7307252
[27]Srivastava, P; Shukla, A.; Bansal, A. A comprehensive review on soil classification using deep learning and computer vision techniques. Multimed. Tools Appl. 2021, 80(10), 14887–14914. DOI: https://doi.org/10.1007/s11042-021-10544-5
[28]Folorunso, O.; Ojo, O.; Busari, M.; Adebayo, M.; Joshua, A.; Folorunso, D.; Ugwunna, C.O.; Olabanjo, O.; Olabanjo, O. Exploring machine learning models for soil nutrient properties prediction: a systematic review. Big Data Cogn. Comput. 2023, 7, 113. DOI: https://doi.org/10.3390/bdcc7020113
[29]Sumathi, P.; Karthikeyan, V.V.; Kavitha, M.S.; Karthik, S. Improved soil quality prediction model using deep learning for smart agriculture systems. Comput. Syst. Sci. Eng. 2023, 45(2), 1545–1559. DOI: https://doi.org/10.32604/csse.2023.027580
[30]Sajindra, H.; Abekoon, T.; Jayakody, J.A.D.C.A.; Rathnayake, U. A novel deep learning model to predict the soil nutrient levels (N, P, and K) in cabbage cultivation. Smart Agr. Technol. 2024, 7. DOI: https://doi.org/10.1016/j.atech.2023.100395
[31]Chaudhary, A.; Singh, P.D.; Verma, R.; Sharma. M. Monitoring soil health using machine learning techniques for improved crop yield prediction. Cureus J. Comput. Sci. 2025, 2. DOI: https://doi.org/10.7759/s44389-025-04577-2
[32]Kumar, A.; Moharana, P.C; Jena, R.K.; Malyan, S.K.; Fagodiya, R.K.; Shabnam, A.A.; Vinodakumar, S.N.; Jigyasu, D.K.; Gull, A.; Kumari, K.M.V.; Subramaniam, G.D. Prediction of soil available nitrogen using machine learning and digital mapping techniques in Northeast India. Environ. Chall. 2026, 22, 101375. DOI: https://doi.org/10.1016/j.envc.2025.101375
[33]Rao, R.R.; Reddy, U.S. Agrimind intelligent deep learning framework for accurate soil fertility prediction. Sci. Rep. 2026, 16, 19657. DOI: https://doi.org/10.1038/s41598-026-50366-9
论文原文与出版信息
Computing and artificial intelligence.