Machine Learning Driven Colorimetric Approach for Soil Nitrogen and Phosphorus Estimation
摘要
The health of humans and the cultivation of crops rely on soil nutrients; therefore, optimal fertilization can be problematic. We generated datasets using mobile phone cameras and an Android application as portable reflectometers, employing colorimetry to assess the levels of nitrogen and phosphorus in soil. The nitrogen dataset comprises 150 measurements, whereas the phosphorus dataset contains 100 readings. Various regression techniques were assessed to develop predictive models from the dataset, incorporating color ranges associated with each concentration. The Mean Squared Error (MSE) was 1.06, the Mean Absolute Error (MAE) was 0.80, and the Root Mean Squared Error (RMSE) was 1.03 for several machine learning models, resulting in the choice of the model that included all attributes. The study demonstrated that a comprehensive model incorporating Red, Green, Blue (RGB), Hue, Saturation, Value (HSV), and Cyan, Magenta, Yellow, Key (Black) (CMYK) color spaces is more precise than individual models. The K-Nearest Neighbors (KNN) and Support Vector Regression (SVR) methods achieved the lowest RMSE values for nitrogen and phosphorus estimation, respectively. The mobile-based framework suggested is a mobile-based and cost-effective solution to accurate assessment of soil nutrient in the field to aid in precision agriculture activities.