Assessing the fidelity of neural network-based segmentation of soil XCT images based on pore-scale modelling of saturated flow properties

https://doi.org/10.1016/j.still.2021.104942Get rights and content

Highlights

  • We present the initial results of a novel method of using neural networks for soil XCT image segmentation.

  • Depending on the sample, the accuracy in terms of permeability hit 5% error.

  • To segment soil images, we used hybrid U-net + ResNet-101 architecture.

  • It was shown that the low representativity of XCT images could explain low accuracy cases.

  • Larger image libraries, better ground-truth data and network architecture were proposed as ways forward.

Abstract

Direct imaging methods, among which X-ray computed tomography (XCT) continues to dominate, enable the study of soil structure at different scales. However, to compute different morphological parameters or assess soil physical properties using pore-scale modelling we need to perform image segmentation to divide the XCT greyscale image representing local absorption of X-ray radiation into major constituents or phases. Here we focused on the simplest type of segmentation procedure – binarization into pores and solid phases. We present the initial results for soil XCT image segmentation using convolutional neural networks (CNN). We assumed that current state-of-the-art local segmentation approaches could provide ground truth data to perform neural network training. We used hybrid U-net + ResNet-101 architecture and segmented seven soil XCT images. The training was performed by excluding the segmented image from training and validation datasets. The segmentations’ accuracy was assessed using standard computer vision metrics (precision, recall, intersection over union or IoU) and pore-scale simulations to compute the permeability of resulting 3D binary soil images. Depending on the soil sample, the error of segmentations in terms of computed hydraulic properties varied from 5% to 130%. The IoU metric was found to be the most sensitive to false positive and false negative porosity predictions by the neural network. To explain observed variations, we performed ground-truth and original XCT greyscale images analysis with the help of correlation and covariance functions. In addition to a comparison between images, we also trained another segmentation neural network that used all samples as a training/verification dataset that helped to explain the inaccuracies caused by insufficient representativeness of some soil sample structures in the training dataset. We discussed possible ways to improve the segmentation results in the future, including the usage of larger soil image libraries, physically modelled ground-truth data, and advanced neural network architectures.

Introduction

Soil scientists have acknowledged for many decades that the structure of soils, i.e., the spatial organization of the constituent phases, influences significantly the processes that take place in soils.. Soil structure reflects and connects all key functions: e.g., microorganism and soil fauna growing and functioning (Vidal et al., 2018), plant vegetation (Zhao et al., 2017; Metzger et al., 2017), organic matter transformation and its sequestration (Wang et al., 2017), soil resistance to erosion (Barthès & Roose, 2002), water fluxes and transport of solutes (Janssen et al., 2010; Gerke et al., 2015a) – this brief list is far from being complete. Here by soil structure we refer to its spatial composition at all scales from meters to nanometers (Martín et al., 2017; Karsanina et al., 2018; Gerke et al., 2021), unlike the historical misnomer terminology that relates structure exclusively to soil aggregates. This latter misconception is especially unattractive considering the possibility that soil aggregates are not structure forming units (Baveye, 2020); however, this idea is currently debated (e.g., Yudina and Kuzyakov, 2019) and actively researched. One of the most important soil structural components is the pore space that provides the roadway for microorganisms and fauna migration, water and solute fluxes to flow and is dynamic by its nature due to the influence of all the aforementioned functions, including plant roots as well as the influence of other environmental factors (such as climate). While macroscopically, some soils may have similar characteristics, the microscopic structure may significantly affect the soil functions due to differences in pore sizes and their interconnectivity (Baveye et al., 2018 and references therein; Koestel et al., 2020). As all soil functions and soil structure constantly affect each other, such metrics for soil structure as pore-size distribution (e.g., Pires et al., 2017) and correlation functions (e.g., Karsanina et al., 2015) can be used to monitor soil functions (Rabot et al., 2018). Moreover, soil structural data may be used to numerically evaluate soil physical properties (Vogel & Roth, 2001; Khan et al., 2012; Gerke et al., 2019; Pot et al., 2020; Gerke et al., 2020).

There are plenty of methods to assess soil structures, which can be roughly divided into two classes: indirect semi-integral and direct imaging approaches. The first class includes water-retention curve inversion, nuclear magnetic resonance and mercury/gas porosimetry (Hajnos et al., 2006). The second class is predominated by classical thin-sectioning (Skvortsova & Kalinina, 2004; Bryk, 2018), X-ray computed tomography (XCT) imaging (Wildenschild et al., 2002; Gerke et al., 2012; Cnudde et al., 2006), SEM (Schaefer et al., 2004) and FIB-SEM (Gerke et al., 2021) imaging. Direct imaging provides information in the form of a 2/3D digital image that is much more robust, as indirect methods tend to provide approximate or simply unreliable results (e.g., Diamond, 2000). On the other hand, all direct approaches usually suffer from resolution versus field-of-view trade-off (Gerke et al., 2015b) and are more time-consuming/laborious. The former issue can be circumvented with multi-scale image fusion (Karsanina et al., 2018), potentially building a multi-scale 3D digital soil model of any complexity (Karsanina and Gerke, 2018; Karsanina et al., 2020). Among the direct imaging methods, XCT is currently the most prominent approach to the study of soil structure at the micro-scale due to its 3D non-destructive nature. However, XCT imaging results represent stacks of images with local X-ray attenuation at each pixel/voxel and require image processing to extract more useful information needed for soil structure analysis.

The key step in analyzing soil structure based on XCT images is segmentation, or, in case we are considering only pores and solids – binarization. This procedure classifies each pixel/voxel on the XCT greyscale image into the major material or phase. It is important to note that XCT information alone is not enough to segment different chemical/mineral components, as X-ray attenuation is affected by both Zeff- (effective atomic number) and density. Although the problem can be tackled in some cases using multi-energy scanning and inverse problem solving (Yang et al., 2013; Victor et al., 2017), it is hardly useful for soils due to their vast number of constituents. The multi-energy scanning can be performed with mono and polychromatic X-ray sources, but synchrotron radiation is usually preferable because the polychromatic case humpers inverse problem’s solution and introduces more noise into the resulting distribution. In this context, XCT image segmentation is an approximation, more so due to the inherent problem of partial volume effects – while real materials and interfaces between them have an infinite resolution (well, up to a molecular scale), XCT images have some resolution limitation and, thus, each pixel/voxel may contain a mixture of phases. Nonetheless, in most cases, we do need to perform image processing before analysis and modelling.

The current state-of-the-art segmentation techniques are mainly consisting of local segmentation techniques such as indicator kriging (Oh & Lindquist, 1999; Houston et al., 2013), region growth (Hashemi et al., 2014; Gerke & Karsanina, 2020) or converging active contours (Sheppard et al., 2004). In these methods, unlike in inferior global segmentation approaches (Iassonov et al., 2009), each of the two phases has two thresholds. For example, in the case of binarization, there are the two following thresholds – one at the bottom in which we are sure all pixels/voxels are pores, and the other on top, which is solid. Now, all the pixels/voxels between these two thresholds are processed using different statistical techniques to add them to either the pore or the solid bin. Such thresholds can be chosen either manually or automatically (Schlüter et al., 2010). Unfortunately, as was quite elegantly shown by Baveye et al. (2010), no automatic technique is better than a skilled operator at the time of that study, yet all the operators are prone to severe errors and the results disagree significantly between operators. Another class of segmentation approaches is based on unsupervised learning with clustering (Chauhan et al., 2016). While this may look like a solution to the segmentation problem, in reality, these approaches are far from being perfect. The clustering procedure itself requires the number of clusters as an input parameter dependent on an operator. Markov random field (MRF) methods can perform multi-phase segmentation with an automatic decision on the number of clusters but depend on an additional input parameter (Kulkarni et al., 2012). Furthermore, these segmentations' quality is far from adequate (especially for multi-phase segmentation with “sandwiched” intermediate phase effects) – this is not surprising due to the simplicity of the clustering technique.

To eliminate errors due to the operators or the inaccuracies of automatic/clustering techniques, supervised machine learning with neural networks can be used (Karimpouli & Tahmasebi, 2019; Varfolomeev et al., 2019). The major problem with unsupervised methods lies in the absence of ground-truth data (GT) for training. This paper aims to check the accuracy of neural networks-based segmentations for soil XCT images based on computing saturated flow properties using binarized pore geometries. While the methodology to create GTs for XCT images is under active development, in this contribution we hypothesize that images processed with current state-of-the-art local segmentation methods can serve as proxies for GT datasets. This way, after building a robust technology to create GT, we shall have readily available and robust supervised segmentation tools at our disposal.

Section snippets

Samples, XCT imaging and ground-truth (GT) images

For this study, we selected a collection of 3D soil XCT images previously used by our group. In total, 7 soil samples were chosen based on their quality, size and soil structure. All the images represent different soil genetic horizons and depths, which was important to check neural networks' ability to process images not represented within the training dataset. To perform training using the same volume of data, all XCT images were cropped to the same cube size of 7003 voxels. During cropping,

General segmentation results

Table 1 summarized all segmentation results in terms of computer vision metrics as previously described. Computer metrics that characterize the accuracy of segmentations (Table 1) are well explained by local false positive/negative prediction patterns (Fig. 4) and porosity data (Table 2). The Supplementary Materials provide considerably more visual details for each sample in addition to Fig. 4. Our segmentation approach produced 3D images with both over- and under-predicted porosities.

All

Summary

In this contribution, we presented the initial results of soil XCT image segmentation using neural networks. To perform neural network training, we assumed that existing state-of-the-art local segmentation approaches could provide ground truth data for training. We used hybrid U-net + ResNet-101 architecture and segmented seven soil XCT images. The training was performed by excluding the segmented image from training and validation datasets. The accuracy of segmentations was assessed using

Declaration of Competing Interest

The authors report no declarations of interest.

Acknowledgements

This work was supported by the Russian Science Foundation grant no 19-74-10070 (segmentation with machine learning). Soil samples were obtained and processed with the help of the Russian Foundation for Basic Research grant no 18-34-20131 мол_а_вед. A collaborative effort of the authors within the Flow and Transport in Media with Pores research group (FaT iMP, www.porenetwork.com) and uses of some of its software.

We thank two anonymous Reviewers for very useful comments that helped in

References (72)

  • M. Hajnos et al.

    Complete characterization of pore size distribution of tilled and orchard soil using water retention curve, mercury porosimetry, nitrogen adsorption, and water desorption methods

    Geoderma

    (2006)
  • A.N. Houston et al.

    Adaptive-window indicator kriging: A thresholding method for computed tomography images of porous media

    Computers & geosciences

    (2013)
  • S. Karimpouli et al.

    Segmentation of digital rock images using deep convolutional autoencoder networks

    Computers & geosciences

    (2019)
  • M.V. Karsanina et al.

    Enhancing image resolution of soils by stochastic multiscale image fusion

    Geoderma

    (2018)
  • S. Khirevich et al.

    Coarse-and fine-grid numerical behavior of MRT/TRT lattice-Boltzmann schemes in regular and random sphere packings

    Journal of Computational Physics

    (2015)
  • J. Koestel et al.

    Scale and REV analyses for porosity and pore connectivity measures in undisturbed soil

    Geoderma

    (2020)
  • D. Marcotte

    Fast variogram computation with FFT

    Computers & Geosciences

    (1996)
  • M.Á. Martín et al.

    Soil structure and function in a changing world: Characterization and scaling

    Geoderma

    (2017)
  • A. Mehnert et al.

    An improved seeded region growing algorithm

    Pattern Recognition Letters

    (1997)
  • L.F. Pires et al.

    Soil structure changes induced by tillage systems

    Soil and Tillage Research

    (2017)
  • V. Pot et al.

    Effect of resolution, reconstruction settings, and segmentation methods on the numerical calculation of saturated soil hydraulic conductivity from 3D computed tomography images

    Geoderma

    (2020)
  • E. Rabot et al.

    Soil structure as an indicator of soil functions: a review

    Geoderma

    (2018)
  • C.E.G.R. Schaefer et al.

    EDS/SEM study on microaggregates of Brazilian Latosols, in relation to P adsorption and clay fraction attributes

    Geoderma

    (2004)
  • S. Schlüter et al.

    Segmentation of X-ray microtomography images of soil using gradient masks

    Computers & Geosciences

    (2010)
  • A.P. Sheppard et al.

    Techniques for image enhancement and segmentation of tomographic images of porous materials

    Physica A: Statistical mechanics and its applications

    (2004)
  • H.J. Vogel et al.

    Quantitative morphology and network representation of soil pore structure

    Advances in Water Resources

    (2001)
  • D. Wang et al.

    Biochar additions can enhance soil structure and the physical stabilization of C in aggregates

    Geoderma

    (2017)
  • D. Wildenschild et al.

    Using X-ray computed tomography in hydrology: systems, resolutions, and limitations

    Journal of Hydrology

    (2002)
  • Y.S. Yang et al.

    A data-constrained modelling approach to sandstone microstructure characterisation

    Journal of Petroleum Science and Engineering

    (2013)
  • D. Zhao et al.

    Quantification of soil aggregate microstructure on abandoned cropland during vegetative succession using synchrotron radiation-based micro-computed tomography

    Soil and Tillage Research

    (2017)
  • A. Albert et al.

    Using convolutional networks and satellite imagery to identify patterns in urban environments at a large scale

    Proceedings of the 23rd ACM SIGKDD international conference on knowledge discovery and data mining

    (2017)
  • I. Arganda-Carreras et al.

    Trainable Weka Segmentation: a machine learning tool for microscopy pixel classification

    Bioinformatics

    (2017)
  • P.C. Baveye et al.

    Emergent properties of microbial activity in heterogeneous soil microenvironments: different research approaches are slowly converging, yet major challenges remain

    Frontiers in Microbiology

    (2018)
  • P.C. Baveye

    Bypass and hyperbole in soil research: Worrisome practices critically reviewed through examples

    European Journal of Soil Science.

    (2020)
  • S. Berg et al.

    Generation of ground truth images to validate micro-CT image-processing pipelines

    The Leading Edge

    (2018)
  • T. Bultreys et al.

    Unsupervised segmentation evaluation measures for parameter optimization in indicator-Kriging

    1st International conference on Tomography of Materials and Structures (ICTMS 2013)

    (2013)
  • Cited by (0)

    View full text