GRAI3: Generalizable soil particle size distribution from smartphone images
We present GRAI3, a device-agnostic web application for generalizable prediction of soil particle size distribution from standardized smartphone images. GRAI3 couples a streamlined acquisition protocol using a photo-box with a deep learning pipeline based on EfficientNetV2-S, trained on an expanded, diverse dataset. The method models the cumulative particle size distribution with a two-parameter Weibull function, inferring its scale and shape directly from an image. To achieve device-agnostic performance, GRAI3 automatically reads camera EXIF metadata, retrieves per-device pixel density from a calibration table or estimates pixel density when the device is unknown based on the typical angle of view. Images are normalized to a target pixel density and centre-cropped to a fixed resolution before inference, reducing covariate shift across cameras. A lightweight verification model checks whether the uploaded image depicts soil and adheres to photo-box capture requirements. The web application performs real-time inference and provides a one-click PDF report, embedding the original photo, PSD curve and computed parameters. Monte Carlo dropout was implemented to provide a measure of confidence in the model’s predictions. Comparison with a SAM-refined, U-Net-based segmentation pipeline shows that GRAI3 remains robust with fine textures. Validation on an expanded dataset and cross-device scenarios indicates improved generalizability relative to prior versions, attributable to the upgraded backbone and group cross-validation. GRAI3 thus offers a practical, reproducible workflow for soil granulometry estimation using commodity smartphones, supporting rapid screening, documentation and reporting in geotechnical and environmental applications.
Authors
- Enrico Soranzo (ORCID: https://orcid.org/0000-0001-5594-4509)
Institutions
- BOKU University (AT)
Publication Details
- Journal
- Computers and Geotechnics
- Published
- 2026-06-17
- DOI
- https://doi.org/10.1016/j.compgeo.2026.108362
- Primary Topic
- Soil Geostatistics and Mapping
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- HORIZON EUROPE Framework Programme