Skip to main content

3D stochastic reconstruction of porous media based on attention mechanisms and residual networks


Because of the complex internal porous structures, the reconstruction of porous media has encountered many difficulties in practical research and development. At present, numerical simulation methods are widely used in the field of reconstructing porous media, which can reconstruct results similar to the true pore structure, but generally are CPU-intensive and time-consuming. Recently, with the rapid development of deep learning, the powerful ability of feature extraction and structure prediction owned by deep learning can be transferred to reconstruct porous media. The convolutional neural network (CNN) is one of the classical methods in deep learning. A traditional CNN is unable to specially focus on the effective features in learning and possibly has degradation problem with the increase of layers. To address the degradation problem and make CNNs extract important features, residual networks and attention mechanisms are combined in CNNs to respectively alleviate network degradation and focus on the important features in the reconstruction of porous media. Besides, the bilinear interpolation is used to enlarge the size of compressed data. Compared with some traditional numerical reconstruction methods, CNN, GAN and some variants of GAN, our method has shown its practicability and effectiveness.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14


  1. Blunt MJ, Bijeljic B, Dong H, Gharbi O, Iglauer S, Mostaghimi P, Paluszny A, Pentland C (2013) Pore-scale imaging and modelling. Adv Water Resour 51:197–216

    Article  Google Scholar 

  2. Dong H, Blunt MJ (2009) Pore-network extraction from micro-computerized-tomography images. Phys Rev E Stat Nonlinear Soft Matter Phys 80:36307

    Article  Google Scholar 

  3. Dzmitry B, Kyunghyun C, Yoshua B (2014) Neural machine translation by jointly learning to align and translate. arXiv preprint

  4. FEI C (2009) Avizo 9 User's Guide, FEI Corporation

  5. Feng JX, Teng QZ, Li B, He XH, Chen HG, Li Y (2020) An end-to-end three-dimensional reconstruction framework of porous media from a single two-dimensional image based on deep learning. Comput Methods Appl Mech Eng 368:113043

    Article  Google Scholar 

  6. Fredrich JT (1999) 3D imaging of porous media using laser scanning confocal microscopy with application to microscale transport processes. Phys Chem Earth Part A 24(7):551–561

    Article  Google Scholar 

  7. Goodfellow IJ, Jean PA, Mehdi M, Xu B, David WF, Sherjil O, Aaron C, Yoshua B (2014) Generative adversarial networks. arXiv preprint

  8. Hazlett RD (1997) Statistical characterization and stochastic modeling of pore networks in relation to fluid flow. Math Geol 29(6):801–822

    Article  Google Scholar 

  9. He Y, Chen D (2009) Sequential indicator simulation and indicator kriging estimation of 3-dimensional soil textures. Aust J Soil Res 47(6):622–631

    Article  Google Scholar 

  10. He KM, Zhang XY, Ren SQ, Sun J (2015) Deep Residual Learning for Image Recognition. arXiv preprint

  11. Hélène B, Didier R (2015) Truncated Gaussian and derived methods. CR Geosci 348(7):510–519

    Google Scholar 

  12. Hemes S, Desbois G, Urai JL, Schrppel B, Schwarz JO (2015) Multi-scale characterization of porosity in Boom Clay (HADES-level, Mol, Belgium) using a combination of X-ray μ-CT, 2D BIB-SEM and FIB-SEM tomography. Microporous Mesoporous Mater 208:1–20

    CAS  Article  Google Scholar 

  13. Hou J, Zhang SK, Sun RY, Li ZQ, Li YB (2007) Reconstruction of 3D network model through CT scanning. In: 69th European association of geoscientists and engineers conference and exhibition 2007: securing the future. Incorporating SPE EUROPEC, vol 6. p. 3398–3408

  14. Hu J, Shen L, Albanie S, Sun G, Wu EH (2017) Squeeze-and-excitation networks. arXiv preprint

  15. Hyman JD, Guadagnini A, Winter CL (2015) Statistical scaling of geometric features in stochastically generated pore microstructures. Comput Geosci 19(4):845–854

    Article  Google Scholar 

  16. Jonathan TB (2017) A general and adaptive robust loss function. arXiv preprint

  17. Kamrava S, Tahmasebi P, Sahimi M (2019) Enhancing images of shale formations by a hybrid stochastic and deep learning algorithm. Neural Netw 118:310–320

    Article  Google Scholar 

  18. Karol G, Ivo D, Alex G, Danilo JR, Daan W (2015) DRAW: A Recurrent Neural Network For Image Generation. arXiv preprint

  19. Kelvin X, Jimmy B, Ryan K, Kyunghyun C, Aaron C, Ruslan S, Richard Z, Yoshua B (2016) Show, attend and tell: neural image caption generation with visual attention. arXiv preprint

  20. Krishnan S, Journel AG (2003) Spatial connectivity: from variograms to multiple-point measures. Math Geol 35(8):915–925

    Article  Google Scholar 

  21. Lin W, Li XZ, Yang ZM, Wang J, Xiong SC, Luo YT, Wu GM (2017) Construction of dual pore 3-D digital cores with a hybrid method combined with physical experiment method and numerical reconstruction method. Transp Porous Media 120(1):227–238

    Article  Google Scholar 

  22. Lin W, Li XZ, Yang ZM, Lin LJ, Xiong SC, Wang ZY, Wang XY, Xiao QH (2018) A new improved threshold segmentation method for scanning images of reservoir rocks considering pore fractal characteristics. Fractals 26(2):1840003

    Article  Google Scholar 

  23. Lin W, Xiong SC, Liu Y, He Y, Chu SS, Liu SY (2021) Spontaneous imbibition in tight porous media with different wettability: pore-scale simulation. Phys Fluids 33(3):032013

    CAS  Article  Google Scholar 

  24. Liu YH (2006) Using the Snesim program for multiple-point statistical simulation. Comput Geosci 32(10):1544–1563

    Article  Google Scholar 

  25. Lu J, Xia M, Li W, Yang KC (2013) An improved bilinear interpolation algorithm using center coordinates of pixels. Sens Transducers 19:89–93

    Google Scholar 

  26. Lymberopoulos DP, Payatakes AC (1992) Derivation of topological, geometrical, and correlational properties of porous media from pore-chart analysis of serial section data. J Colloid Interface Sci 150(1):61–80

    CAS  Article  Google Scholar 

  27. Mariethoz G, Renard P, Straubhaar J (2010) The direct sampling method to perform multiple-point geostatistical simulations. Water Resour Res 46(11):W11536

    Google Scholar 

  28. Martin A, Soumith C, Léon B (2017) Wasserstein GAN. arXiv preprint

  29. Max J, Karen S, Andrew Z, Koray K (2015) Spatial transformer networks. arXiv preprint

  30. Mirza M, Osindero S (2014) Conditional generative adversarial nets. arXiv preprint

  31. Mnih V, Heess N, Graves A, Kavukcuoglu K (2014) Recurrent models of visual attention. Adv Neural Inf Process Syst 3:2204–2212

    Google Scholar 

  32. Odena A, Dumoulin V, Olah C (2016) Deconvolution and checkerboard artifacts. Distill 1(10):1–13

    Article  Google Scholar 

  33. Okabe H, Blunt MJ (2005) Pore space reconstruction using multiple-point statistics. J Petrol Sci Eng 46(1–2):121–137

    CAS  Article  Google Scholar 

  34. Singh M, Mohanty KK (2000) Permeability of spatially correlated porous media. Chem Eng Sci 55(22):5393–5403

    CAS  Article  Google Scholar 

  35. Strebelle S (2002) Conditional simulation of complex geological structures using multiple-point statistics. Math Geol 34(1):1–21

    Article  Google Scholar 

  36. Tomutsa L, Silin DB, Radmilovic V (2007) Analysis of chalk petrophysical properties by means of submicron-scale pore imaging and modeling. SPE Reservoir Eval Eng 10(3):285–293

    CAS  Article  Google Scholar 

  37. Valsecchi A, Damas S, Tubilleja C, Arechalde J (2020) Stochastic reconstruction of 3D porous media from 2D images using generative adversarial networks. Neurocomputing 399:227–236

    Article  Google Scholar 

  38. Vogel HJ, Roth K (2001) Quantitative morphology and network representation of soil pore structure. Adv Water Resour 24(3–4):233–242

    Article  Google Scholar 

  39. Wang YZ, Arns CH, Rahman SS, Arns JY (2018) Porous structure reconstruction using convolutional neural networks. Math Geosci 50(7):781–799

    Article  Google Scholar 

  40. Wirth R (2004) Focused ion beam (FIB). Eur J Miner 16(6):863–876

    CAS  Article  Google Scholar 

  41. Woo S, Park J, Lee JY, Kweon IS (2018) CBAM: convolutional block attention module. In: Ferrari V, Hebert M, Sminchisescu C, Weiss Y (eds) ECCV 2018: computer vision – ECCV 2018. Springer, Cham, pp 3–19

    Chapter  Google Scholar 

  42. Wu KJ, Nunan N, Crawford JW, Young IM, Ritz K (2004) An efficient Markov chain model for the simulation of heterogeneous soil structure. Soil Sci Soc Am J 68(2):346–351

    CAS  Article  Google Scholar 

  43. Zhang T, Du Y, Huang T, Yang J, Lu F, Li X (2016) Reconstruction of porous media using ISOMAP-based MPS. Stoch Env Res Risk Assess 30(1):395–412

    Article  Google Scholar 

  44. Zheng Q, Zhang DX (2020) Digital rock reconstruction with user-defined properties using conditional generative adversarial networks. arXiv preprint

Download references


This work is supported by the National Natural Science Foundation of China (Nos. 41672114, 41702148).

Author information



Corresponding author

Correspondence to Pengfei Xia.

Ethics declarations

Conflict of interest

The authors declare that we have no conflict of interest.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.


Appendix 1: The main functions and parameters of our method

As shown in Fig. 5, our method is based on CNNs, combining a CBAM with ResNets as well as bilinear interpolation to realize porous media reconstruction. The specific parameters and functions of our method are shown in Table 

Table 9 Parameters and structures in our method

9. Some parameters and terms are described below.

  1. 1.

    Conv2d: a 2D convolution operation that is used to extract features of 2D data.

  2. 2.

    Hidden layer of MLP: the hidden layer in the fully-connected network MLP.

  3. 3.

    Output layer of MLP: the output layer in the fully-connected network MLP.

  4. 4.

    Units: the number of neural units in a layer of the network.

  5. 5.

    batch_normalization: a regularization function that normalizes the input data, alleviates the problem of scattered distribution of data features, and makes the network model more stable.

  6. 6.

    kernel_size: the size of a convolution kernel in a layer.

  7. 7.

    Stride: the step size of each convolution kernel.

  8. 8.

    leaky_relu: an activation function that alleviates the problem of gradient vanishing.

  9. 9.

    Filters: the number of filters in one layer of networks.

  10. 10.

    Scale: a magnification (scale > 1) or contraction (0 < scale < 1) factor for a bilinear interpolation, e.g. ‘scale = 2’ means that the original feature map is enlarged to twice using bilinear interpolation.

  11. 11.

    leaky_relu: an activation function.

  12. 12.

    Padding = '‘same’: “padding” means the filling of image edges, and “same” is a filling attribute, which means the output size and input size of the layer are same after they are divided by the stride size and rounded up.

Note that in Conv_1 and Conv_2 there are altogether six layers, and in Conv_3 and Conv_4 there are also exactly the same six layers. The reason is that in Conv_1 and Conv_2 the convolution operation gradually reduces the size of feature maps for six times; on the contrary, bilinear interpolation used as the reverse operation of reducing the size of feature maps enlarges the feature maps gradually for six times, too. Although convolution operations are used in Conv_3 and Conv_4, the size of feature maps is not influenced since their kernel size is 1 × 1 and the stride is 1.

Appendix 2: Discussion on the influence of different network layers

As shown in Table 9 and discussed in Sect. 2.3, Conv_1 and Conv_2 altogether have six layers; Conv_3 and Conv_4 also have the same number of layers because the same number of bilinear interpolation operations are used to offset the effect of convolution operations used for the reduction of feature maps in Conv_1 and Conv_2. Normally the layer numbers of Conv_1 (layer number = 1) and Conv_4 (layer number = 2) in our method are fixed. Let the total layer number in the Conv_1 and Conv_2 be i, so the total layer number in Conv_3 and Conv_4 is i, too. We will discuss the influence of i on the reconstruction time and quality.


Table 10 The reconstruction time for only one result using different i layers

10 shows the reconstruction time for only one result when i = 3, 4, 5, 6, respectively. Note that when i = 3, since the layer numbers of Conv_1 (layer number = 1) and Conv_4 (layer number = 2) are fixed, it can be inferred that the layer number of Conv_2 is 2 and that of Conv_3 is 1. Similarly, when i = 4, the layer number of Conv_2 is 3 and that of Conv_3 is 2; when i = 5, the layer number of Conv_2 is 4 and that of Conv_3 is 3; when i = 6, Conv_2’s layer number is 5 and Conv_3’s is 4.

It can be seen from Table 10 that with the increase of i, the reconstruction time also increases. Figures 

Fig. 15

MPC curves the TI and reconstructions using different i layers in three directions

15a–c show MPC curves of using different i layers in three directions. As shown in Fig. 15, it can be seen that the reconstructed result is closest to TI when i = 6. In real reconstruction, the reconstruction time and quality should be balanced. Generally, increasing the number of layers can improve the reconstruction quality, but the reconstruction time also increases dramatically. In our experiment, i = 6 seems to be an appropriate balance between reconstruction quality and time.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Zhang, T., Xia, P. & Lu, F. 3D stochastic reconstruction of porous media based on attention mechanisms and residual networks. Stoch Environ Res Risk Assess (2021).

Download citation


  • Porous media
  • Reconstruction
  • Convolutional neural network
  • Convolution block attention module
  • Residual network