Image-Based Soil Nutrient Prediction Using Machine Learning and Deep Learning Models

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.

Authors

Institutions

Publication Details

Journal
Computing and artificial intelligence.
Published
2026-10-28
DOI
https://doi.org/10.59400/cai4241
Primary Topic
Smart Agriculture and AI
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Image-Based Soil Nutrient Prediction Using Machine Learning and Deep Learning Models

Preity Mishra, Naresh Kumar, S.K. Chaulya, Vikash Kumar et al.
4 links
Computing and artificial intelligence.
Smart Agriculture and AI
article

Image-Based Soil Nutrient Prediction Using Machine Learning and Deep Learning Models

Preity Mishra, Naresh Kumar, S.K. Chaulya, Vikash Kumar, Abhinek Agarwal, Anant Stephen Besra
article en

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.Vol. 4(3)
Central Institute of Mining and Fuel Research (IN)
Ministry of Electronics and Information technology, CSIR-Central Institute of Mining and Fuel Research
Zero hunger
Openalex Percentile: Top 15%
Smart Agriculture and AI
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon