Reflectance Multispectral Imaging for Soil Composition Estimation and USDA Texture Classification
Authors: G. A. S. L Ranasinghe, J. A. S. T. Jayakody, M. C. L. De Silva, G. Thilakarathne, G. M. R. I. Godaliyadda, H. M. V. R. Herath, M. P. B. Ekanayake, S. K. Navaratnarajah
Organizations: Department of Electrical and Electronic Engineering, University of Peradeniya, Peradeniya 20400, Sri Lanka · Multidisciplinary AI Research Center, University of Peradeniya, Peradeniya 20400, Sri Lanka · Department of Electrical and Information Engineering, University of Ruhuna, Hapugala, Galle 80000, Sri Lanka · Department of Civil Engineering, University of Peradeniya, Peradeniya 20400, Sri Lanka
Soil texture is a foundational attribute that governs water availability and erosion in agriculture, as well as load bearing capacity, deformation response, and shrink-swell risk in geotechnical engineering. Yet texture is still typically determined by slow and labour intensive laboratory particle size tests, while many sensing alternatives are either costly or too coarse to support routine field scale deployment. This paper proposes a robust and field deployable multispectral imaging (MSI) system and machine learning framework for predicting soil composition and the United States Department of Agriculture (USDA) texture classes. The proposed system uses a cost effective in-house MSI device operating from 365 nm to 940 nm to capture thirteen spectral bands, which effectively capture the spectral properties of soil texture. Regression models use the captured spectral properties to estimate clay, silt, and sand percentages, while a direct classifier predicts one of the twelve USDA textural classes. Indirect classification is obtained by mapping the regressed compositions to texture classes via the USDA soil texture triangle. The framework is evaluated on mixture data by mixing clay, silt, and sand in varying proportions, using the USDA classification triangle as a basis. Experimental results show that the proposed approach achieves a coefficient of determination R^2 up to 0.99 for composition prediction and over 99% accuracy for texture classification. These findings indicate that MSI combined with data-driven modeling can provide accurate, non-destructive, and field deployable soil texture characterization suitable for geotechnical screening and precision agriculture.
Figures & tables
Fig. 1: Schematic of the multispectral imaging system.
Fig. 2: Map of Sri Lanka showing the locations of soil collection sites: clay rich soil from Menikhinna, silt rich soil from Gelioya, and sand rich soil from Chavakachcheri. Coordinates are provided in WGS84.
Fig. 3: USDA soil texture triangle showing the distribution of samples used in this study. Green dots indicate the three source soils (clay, silt, and sand rich endmembers), blue dots indicate mixtures used for model development (training/testing), and red dots indicate mixtures used for external validation.
Source soil
Clay (%)
Silt (%)
Sand (%)
Clay rich soil
78.63
21.37
0.00
Sand rich soil
0.00
0.00
100.00
Silt rich soil
5.75
94.25
0.00
TABLE I: Laboratory-measured particle size composition of the source soils.
Fig. 4: Representative monochrome spectral band images of a soil sample acquired using the proposed MSI system under thirteen narrow band LED illuminations (one image per wavelength).
Fig. 5: Workflow of the proposed MSI based pipeline. After preprocessing and LDA based dimensionality reduction, three studies are evaluated: (Strategy 1) direct USDA texture class classification, (Strategy 2) regression based clay, silt, and sand prediction, and (Strategy 3) indirect USDA texture classification via texture triangle mapping, using the designated test/validation splits.
Fig. 6: Representative ROI intensity histograms at λ=735 nm, (a) before and (b) after the proposed bounded contrast normalization, computed from the dark corrected ROI. The same preprocessing is applied to all bands and samples.
Fig. 7: Spectral feature extraction from the preprocessed 100×100 pixel ROI. The ROI is partitioned into 10×10 blocks, and block wise mean intensities are computed for each of the thirteen wavelength bands to form a per sample feature matrix X∈R100×13 .
Fig. 8: Spectral signatures grouped by the twelve USDA soil texture classes using the training/testing dataset. Each curve represents the mean intensity of the 100×100 pixel ROI across the thirteen wavelength bands. Values are min-max normalized column wise (per wavelength band) for visualization.
Fig. 9: Spectral signatures grouped by composition levels (clay, silt, and sand) using the training/testing dataset. Each curve represents the mean intensity of the 100×100 pixel ROI across thirteen wavelength bands. Values are min-max normalized column wise (per wavelength band) for visualization. Abbreviations in the legend denote Clay (Cl), Silt (M), and Sand (S).
Fig. 10: Two dimensional LDA visualization (LDA1 vs. LDA2) of the training/testing dataset, learned using USDA soil texture class labels. Dashed ellipses indicate three macro clusters: A (sand dominant textures), B (clay/loam dominant textures), and C (silt dominant textures).
Fig. 11: Two dimensional LDA visualization (LDA1 vs. LDA2) of the training/testing dataset, learned using composition group labels derived from clay (Cl), silt (M), and sand (S) percentages. Dashed ellipses indicate three macro clusters: A (sand dominant mixtures), B (clay/loam dominant mixtures), and C (silt dominant mixtures).
Model
Accuracy
F1-score
Recall
Mean
Std.
Mean
Std.
Mean
Std.
KNN
0.9955
0.0007
0.9960
0.0007
0.9966
0.0005
RF
0.9942
0.0010
0.9946
0.0009
0.9947
0.0008
DT
0.9819
0.0012
0.9835
0.0014
0.9838
0.0013
CB
0.9899
0.0010
0.9904
0.0011
0.9918
0.0006
XGB
0.9951
0.0012
0.9955
0.0012
0.9956
0.0010
TABLE II: Direct soil-type classification performance on the test set
Fig. 12: Normalized confusion matrix of the KNN classifier for direct soil classification.
Model
Clay
Silt
Sand
R2
RMSE
R2
RMSE
R2
RMSE
Mean
Std
Mean
Std
Mean
Std
Mean
Std
Mean
Std
Mean
Std
RF
0.9956
0.0002
1.3525
0.0373
0.9957
0.0003
1.6936
0.0507
0.9926
0.0004
2.3963
0.0678
KNN
0.9993
0.0001
0.5300
0.0279
0.9988
0.0001
0.9159
0.0469
0.9982
0.0002
1.1747
0.0569
DT
0.9928
0.0008
1.7377
0.0980
0.9928
0.0004
2.1970
0.0617
0.9879
0.0004
3.0653
0.0560
CB
0.9900
0.0003
2.0485
0.0357
0.9924
0.0004
2.2577
0.0517
0.9869
0.0006
3.1851
0.0715
TABLE III: Regression results on held out testing data
Fig. 13: True vs predicted soil composition (%) for the testing samples using the KNN regressor: (a) clay, (b) sand, and (c) silt.
Fig. 14: True vs predicted soil composition (%) for the validation samples using the KNN regressor: (a) clay, (b) sand, and (c) silt.
Model
Accuracy
F1-Score
Recall
Mean
Std.
Mean
Std.
Mean
Std.
KNN
0.9698
0.0024
0.9682
0.0021
0.9787
0.0016
RF
0.9650
0.0015
0.9652
0.0017
0.9724
0.0017
DT
0.9560
0.0021
0.9550
0.0015
0.9659
0.0016
CB
0.9250
0.0032
0.9226
0.0029
0.9339
0.0025
XGB
0.9455
0.0015
0.9427
0.0012
0.9568
0.0017
TABLE IV: Indirect soil-type classification performance on the test set
Fig. 15: Normalized confusion matrix of the KNN model for indirect soil texture classification.
Accurate soil moisture (SM) estimation is critical for precision agriculture, water resources management and climate monitoring. Yet, existing satellite SM products are too coarse (>1km) for farm-level applications. We present a high-resolution (10m) SM estimation framework for vegetated areas across Europe, combining Sentinel-1 SAR, Sentinel-2 optical imagery and ERA-5 reanalysis data through machine learning. Using 113 International Soil Moisture Network (ISMN) stations spanning diverse vegetated areas, we compare modality combinations with temporal parameterizations, using spatial cross-validation, to ensure geographic generalization. We also evaluate whether foundation model embeddings from IBM-NASA's Prithvi model improve upon traditional hand-crafted spectral features. Results demonstrate that hybrid temporal matching - Sentinel-2 current-day acquisitions with Sentinel-1 descending orbit - achieves R^2=0.514, with 10-day ERA5 lookback window improving performance to R^2=0.518. Foundation model (Prithvi) embeddings provide negligible improvement over hand-crafted features (R^2=0.515 vs. 0.514), indicating traditional feature engineering remains highly competitive for sparse-data regression tasks. Our findings suggest that domain-specific spectral indices combined with tree-based ensemble methods offer a practical and computationally efficient solution for operational pan-European field-scale soil moisture monitoring.
Ioannis Kontogiorgakis, Athanasios Askitopoulos, Iason Tsardanidis +4
BEYOND EO Centre, IAASARS, National Observatory of Athens, Athens, Greece · Artificial Intelligence, Wageningen University & Research, The Netherlands
Soil properties relevant to agricultural and environmental applications are conventionally measured using elaborate laboratory methods involving physical and chemical processing. While highly accurate, these conventional methods are costly and time-consuming. In contrast, optical spectroscopy paired with machine learning enables rapid and cost-effective predictions of multiple soil properties. However, spectroscopic modelling is often considered unreliable, as the predictive accuracy varies between soil properties and individual samples. To balance this trade-off between cost and reliability, we introduce reject-to-remeasure: an AI-based measurement framework that combines probabilistic modelling with uncertainty-guided rejection. In this framework, soil samples are first analysed using spectroscopy, after which predictions are rejected if their predictive uncertainty exceeds predefined quality constraints. Rejected samples are subsequently remeasured using conventional laboratory procedures. On a regional visible-near-infrared spectral soil library from Québec, we demonstrate that reject-to-remeasure with modern foundation models (TabPFNv2.5 and TabICLv2) can facilitate the integration of optical spectroscopy into routine laboratory workflows while meeting user-defined accuracy requirements and reducing measurement costs.
Jonas Schmidinger, Robin Gebbers, Marc-Olivier Gasser +3
Joint Lab Artificial Intelligence and Data Science, Osnabrück University, Osnabrück, Germany. · Department of Agromechatronics, Leibniz Institute for Agricultural Engineering and Bioeconomy (ATB), Potsdam, Germany. · Research and Development Institute for the Agri-environment (IRDA), Qu´ebec City, Canada. +1
Visible and near-infrared (vis-NIR) and mid-infrared (MIR) spectroscopy enable rapid, cost-effective prediction of soil properties. Yet, translating high-dimensional, highly collinear spectra into accurate soil property predictions remains challenging, particularly when employing machine learning. We systematically investigated regression models and dimensionality reduction approaches for spectroscopic modeling across 85 regression tasks from open benchmark datasets in pedometrics spanning field-scale digital soil mapping and a global soil spectral library. We compared an in-context learning tabular foundation model (TabPFN), a convolutional neural network (CNN), rule-based regression (Cubist), Random Forest, and partial least squares regression (PLSR) using full spectra as well as features derived from principal component analysis (PCA) and partial least squares (PLS) latent variables. TabPFN consistently delivered the best overall performance across scales, including large spectral library tasks with tens of thousands of soil samples. Notably, TabPFN applied directly to full spectra already surpassed all classical baselines, showing that explicit dimensionality reduction is not strictly required for strong performance. Further improvements were achieved through PLS, which proved to be an effective dimensionality reduction strategy for all models. Combining PLS latent variables with TabPFN yielded the best predictions overall. Our findings provide evidence-based guidance for spectroscopic calibration model selection across operational scales, demonstrating that the long-standing advantages of PLSR and modern tabular foundation models complement each other in chemometrics.
Viacheslav Barkov, Jonas Schmidinger, Robin Gebbers +1
Osnabrück University, Joint Lab Artificial Intelligence and Data Science, Osnabrück, Germany · Leibniz Institute for Agricultural Engineering and Bioeconomy (ATB), Department of Agromechatronics, Potsdam, Germany · German Research Center for Artificial Intelligence (DFKI), Cooperative and Autonomous Systems (CAS), Osnabrück, Germany