porositAI: An open-source, interactive tool for rapid and reproducible quantification of pore space in soil thin sections
Authors:
- Cedric J. HagenCHCedric J. Hagen
- Axel Cerón GonzálezAGAxel Cerón González
- Lilit PogosyanLPLilit Pogosyan
- Tyler D. KarnsTKTyler D. Karns
- Henry W. LoescherHLHenry W. Loescher
- Michael D. SanClementsMSMichael D. SanClements
Preprint
- 4 August 2026
- preprint
- Published by Elsevier in SSRN Electronic Journal
Abstract
Accurate quantification of pore space from soil thin-section imagery is central to understanding soil structure, soil formation, and associated ecosystem functions, yet remains limited by challenges in segmentation robustness, reproducibility, and user effort. Here, we present porositAI, a free and open-source, interactive image analysis tool designed for rapid and reproducible quantification of pore space using user-guided, sample-specific machine learning. The workflow combines sparse pixel labeling (~15-25 clicks/labels) with on-the-fly random forest classification to generate pore masks, estimate areal porosity, and extract pore-scale metrics, with optional uncertainty visualization and refinement. We evaluated porositAI using a validation dataset of 167 soil thin-section images, for which porosity was independently estimated by two experts and by an automated thresholding approach. porositAI showed strong agreement with expert-derived porosity (r = 0.89), with low mean absolute error (MAE; 2.4%) and small but statistically significant bias (-1.2%). Notably, model error was substantially smaller than inter-expert variability (~5.6%), indicating performance within the inherent uncertainty of manual interpretation. In contrast, the threshold-based method exhibited large error (MAE = 18.9%), strong positive bias (~18.8%), and weaker correlation with expert estimates. All findings were obtained using single-modality plane-polarized light imagery, suggesting that performance represents a conservative baseline. Because porositAI is designed to integrate multiple co-registered imaging modalities, accuracy is expected to improve when additional information is available. By reducing user effort while improving accuracy and reproducibility, porositAI provides a practical and scalable framework for quantitative soil micromorphology and supports more consistent reporting of pore-space metrics across studies.Keywords
This publication has 43 references indexed in Scilit:
- Pore space memory of the Tlalpan pedosedimentary sequence as an indicator of paleopedogenesisJournal of Plant Nutrition and Soil Science, 2024
- Application of deep learning for semantic segmentation of sandstone thin sectionsComputers & Geosciences, 2021
- Active Learning2012
- jPOR: An ImageJ macro to quantify total optical porosity from blue-stained thin sectionsComputers & Geosciences, 2011
- Short contribution: A new method of analyzing and documenting micromorphological thin sections using flatbed scanners: Applications in geoarchaeological studiesGeoarchaeology, 2002
- Topological characterization of pore space in soil — sample preparation and digital image-processingGeoderma, 1996
- Cautionary notes for the automated analysis of soil pore-space imagesGeoderma, 1992
- Evaluation of pores under different management systems by image analysis of clay soils in Saskatchewan, CanadaGeoderma, 1992
- On the histogram as a density estimator:L 2 theoryProbability Theory and Related Fields, 1981
- A Mathematical Theory of CommunicationBell System Technical Journal, 1948