A method and system for accurate segmentation of material pore network based on topological preservation
By employing a deep segmentation method that combines multi-scale feature enhancement, skeleton generation, and topology consistency constraints, the problem of easily disrupted topology in material pore network segmentation is solved. This method enables the identification of fine pores and noise resistance, improving the accuracy and connectivity of the segmentation results, and is suitable for the detection of porous materials.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHONGBEI UNIV
- Filing Date
- 2026-02-05
- Publication Date
- 2026-05-19
AI Technical Summary
Existing technologies struggle to effectively maintain the topology of pore networks during nondestructive testing of materials. Tiny pores are difficult to identify and subject to significant noise interference, resulting in insufficient connectivity and accuracy of the segmentation results, which in turn affects the analysis of permeability and physical properties.
By introducing multi-scale feature enhancement, skeleton generation, topology consistency constraints, and porous network repair, a topology-preserving deep segmentation method is constructed. By utilizing multi-scale operators and skeleton prior information, combined with topology loss function and path energy optimization, the connectivity and structural integrity of the porous network are ensured.
It significantly improves the topology preservation capability of pore networks, enhances the identification capability of fine pore structures, effectively resists noise interference, and provides more accurate porosity and connectivity analysis, making it suitable for non-destructive testing of complex multi-scale materials.
Smart Images

Figure CN121639717B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of nondestructive testing and image analysis of materials, specifically a method and system for accurate segmentation of material pore networks based on topology preservation. Background Technology
[0002] The pores, fissures, and resulting three-dimensional network structure within materials are crucial for characterizing the physical properties of various engineering materials. Their connectivity, dominant channel morphology, pore size, and spatial configuration not only determine the permeability of core samples but also influence the structural strength of ceramics and concrete, the density of powder metallurgy materials, and the mechanical stability of sintered metal bodies. With the development of high-resolution imaging technologies such as X-ray micro-CT, industrial CT, and scanning electron microscopy, image-based methods have gradually become the core means for non-destructive testing of material microstructures. However, accurately identifying the complex pore network within a material image remains a critical technical bottleneck. This is mainly due to the high complexity of pore morphology, which typically exhibits large scale spans, elongated shapes, tortuous orientations, multiple branches, and is often accompanied by weak local grayscale variations, low contrast, and severe noise interference. In such environments, traditional image processing methods often fail to reliably extract pore structures and are prone to problems such as pore channel breakage, blurred boundaries, or misidentification due to local grayscale distortion and uneven texture.
[0003] Thresholding, region growing, and edge-feature-based segmentation methods remain widely used, but these methods inherently rely on image grayscale distribution or local consistency features, often exhibiting significant limitations when dealing with complex material internal structures. For example, low grayscale contrast can easily lead to indistinguishability between pore regions and matrix regions, while noise and scattering artifacts can disrupt the continuity of channels, making the results unsuitable for subsequent physical property calculations. Deep learning semantic segmentation techniques have made significant progress in many fields and are gradually being introduced into material image analysis scenarios. Although deep networks possess strong texture and semantic representation capabilities and can identify complex boundaries and heterogeneous regions to some extent, their convolutional structures typically smooth the image during feature extraction, making fine structures such as slender channels and microcracks easily weakened or even completely eliminated. Furthermore, since segmentation networks primarily optimize for pixel-level classification and lack direct constraints on the topological structure of the material pore network, the networks often fail to understand the structural feature of pores as connected channels, resulting in common problems such as broken channels, missing pathways, and main channel morphology deviating from the true structure in the segmentation results.
[0004] The connectivity of a material's pore network is crucial for permeability and flowability assessments, as well as subsequent numerical simulations. When segmentation disrupts the original pore topology, porosity is underestimated or overestimated, connectivity indices are distorted, pore size distribution deviations are exacerbated, and the resulting seepage simulations exhibit systematic errors. This means that maintaining the pore network's topology is not only a technical requirement of the segmentation task itself but also a prerequisite for ensuring the reliability of material physical property analysis. While some methods attempt to repair pore breakpoints through skeleton extraction and post-processing strategies, skeleton extraction is extremely sensitive to noise, easily producing pseudo-skeletons or losing the true structure. Furthermore, post-processing is an external compensation method, not involved in the training process, and cannot guarantee the authenticity and continuity of the pore structure from within the learning framework.
[0005] With the development of topological data analysis techniques, researchers have proposed using methods such as persistent homology to measure structural topological features and improve image processing results through topological information. However, these methods are still immature in engineering applications, with high computational complexity and a lack of natural integration with deep learning, making them difficult to serve as a stable solution for material pore segmentation tasks. Overall, existing techniques consistently fail to effectively maintain the connectivity of pore networks during actual segmentation and struggle to balance cross-scale detail recovery with robustness in noisy environments. The fine pores and microcracks that actually exist in materials are often smoothed out during deep network convolution, and local grayscale distortion severs the pore structure, while the preservation of complex topological morphology lacks a dedicated constraint mechanism.
[0006] Therefore, how to construct a method that can directly maintain the material's pore network topology during the segmentation stage, while having the ability to recover small pores, effectively resist noise and imaging artifacts, and adapt to complex scenarios where large-scale pores and micro-scale pores coexist, has become a key problem that urgently needs to be solved in the field of nondestructive testing of materials. Summary of the Invention
[0007] To address the technical bottlenecks in material porosity network segmentation, such as the susceptibility to topological disruption, difficulty in identifying fine pores, and significant noise interference, this paper proposes a precise segmentation method and system for material porosity networks with topology preservation capabilities. By introducing topological priors and connectivity constraints into multiple stages, including feature extraction, deep model design, training constraints, and post-processing structural restoration, the segmentation process can fully utilize the true physical morphological characteristics of the material, fundamentally improving the accuracy, connectivity, and stability of porosity structure identification. The overall idea of this invention is to incorporate multi-scale texture information, main channel skeleton information, and topological feature information from material images as additional priors into the segmentation model. This allows the model to move beyond pixel-level classification and understand the morphological patterns of the porosity network at the structural level, thereby achieving accurate reconstruction of complex porosity structures.
[0008] A method for accurate segmentation of material pore networks based on topology preservation includes the following steps:
[0009] Step S1: Use multi-scale operators to enhance the features of the material grayscale image and construct a pore-sensitive feature map to alleviate the problems of low grayscale, high noise and large pore size range in the original image;
[0010] Step S2: Generate a preliminary skeleton structure of material pores using an image structure approximation method, and use the preliminary skeleton structure as a structural prior input to the depth segmentation model, so that the depth segmentation model can actively retain the basic shape of the main pore channel during the learning process.
[0011] Step S3: In order to enable the deep segmentation model to automatically learn to maintain the topology during training, a topology consistency constraint mechanism was constructed. By calculating the differences between the predicted pore structure and the reference structure in terms of connectivity, main channel continuity and key topology features, the topology information was incorporated into the training framework in the form of a loss function.
[0012] Step S4: After the deep segmentation model prediction is completed, a pore network repair module is constructed to structurally repair any possible local fractures. The pore network repair module uses a local path energy optimization strategy to track the potential pore extension direction, so that the main pore channel can be reclosed in a probabilistic sense, avoiding the segmentation results from misleading subsequent physical analysis. The repair results will be fused with the model output to form a final pore mask with higher topological consistency and stronger structural continuity.
[0013] Further, step S1: using multi-scale operators to enhance the features of the material grayscale image and constructing a pore-sensitive feature map, thereby alleviating the problems of low grayscale, high noise, and large pore size range in the original image; includes the following processes:
[0014] The acquired grayscale image of the material is denoted as... ,in Represents the pixel coordinates on the image plane; to eliminate dimensional differences caused by different imaging devices and acquisition conditions, the original grayscale is normalized to the interval through linear mapping. Let the normalization operation be... ,get:
[0015] ;
[0016] in, This is a grayscale image of the original material, representing the material's location in two-dimensional space. The grayscale value at that location; These are pixel coordinates, representing spatial position indices in the image plane; The normalized image is obtained by linear mapping from the original image, and the grayscale range is compressed to... ; The normalization operator is a mapping function that linearly maps the input grayscale to a standard range.
[0017] in, As the base image for subsequent feature construction and model input; in the preprocessing stage, high-frequency noise can be suppressed by combining Gaussian smoothing and edge-preserving filtering, while preserving as much aperture edge information as possible. This can be abstracted as a combination of linear and nonlinear filtering operators. The denoised image is obtained:
[0018] ;
[0019] in, The result obtained by applying a filtering operator to a normalized image to denoise it. It is a filtering operator, including a composite operator of Gaussian smoothing and edge-preserving filtering;
[0020] To enhance the response of porous regions at different scales, multi-scale convolutional features are constructed in the scale space; the Gaussian kernel is denoted as:
[0021] ;
[0022] in, This is a Gaussian kernel function, used to construct a two-dimensional Gaussian function in scale space; This is a scale parameter, controlling the positive number of the Gaussian kernel smoothing scale;
[0023] Multi-scale smoothing of the denoised image yields:
[0024]
[0025] in, This represents the convolution operation. Indicates the first Standard deviation of each scale; This is a multi-scale smoothed image, the result of convolving the original image with a Gaussian kernel; the gradient magnitude or local energy feature is calculated at each scale, and a gradient operator can be defined. Then we have:
[0026] ;
[0027] in, It is a gradient operator, consisting of the first-order partial derivatives of the image with respect to spatial coordinates; These are partial derivative operators, representing the grayscale changes in the horizontal and vertical directions, respectively; The magnitude of the gradient is the modulus of the gradient vector of the multi-scale image.
[0028] Alternatively, through wavelet basis functions Extracting local energy:
[0029] ;
[0030] in, These are wavelet basis functions used to extract local frequency and energy information; The local energy characteristic is the response amplitude of the image after wavelet or high-pass filtering;
[0031] By weighted fusion of features at different scales, a porosity-sensitive feature field can be constructed:
[0032] ;
[0033] in, This is a weighted fusion result of multi-scale gradient and energy features for a porosity-sensitive feature field. and The scale weighting coefficients are learnable or preset to control the coefficients contributing to the gradient and energy features at different scales; the pore-sensitive feature field gives a higher response in slender channels and maintains a lower response in the homogeneous matrix region, thus mathematically achieving an explicit enhancement of the pore structure.
[0034] Further, step S2: generating a preliminary framework structure of material pores using an image structure approximation method, and using the preliminary framework structure as a structural prior; includes the following processes:
[0035] In terms of structural prior construction, an approximation of the material pore skeleton is generated through distance transformation and a thinning operator; the binary reference image is denoted as... Define the Euclidean distance transformation:
[0036] ;
[0037] in, The pore mask is obtained by coarse segmentation of a binary pore reference image; For the set of boundaries of binary regions; For Euclidean distance transformation, the Euclidean distance to the nearest boundary point is calculated; this is achieved by finding the maxima of the distance field along the local normal direction and combining this with an iterative refinement operator. By removing redundant boundary points, a skeleton set that approximately reflects the location of the main pore channels can be constructed:
[0038] ;
[0039] in, For the skeleton set, it represents the set of points representing the centerline of the main pore channel;
[0040] The skeleton set is further represented as a skeleton prior graph. By assigning larger values to regions containing the skeleton and zero or smaller values to regions outside the skeleton, an explicit structural prior field is obtained in continuous space.
[0041] Further, step S3: In order to enable the deep segmentation model to automatically learn to maintain the topological structure during training, a topological consistency constraint mechanism is constructed. By calculating the differences between the predicted pore structure and the reference structure in terms of connectivity, main channel continuity, and key topological features, the topological information is incorporated into the training framework in the form of a loss function; including the following processes:
[0042] In the deep segmentation model construction stage, the denoised image Pore-sensitive characteristic field With skeletal prior diagram Concatenate the input tensors along the channel dimension to form a multi-channel input tensor:
[0043] ;
[0044] Through parameters Segmentation network Mapped to the predicted porosity probability field:
[0045] ;
[0046] in Indicates the location The probability that it belongs to the pore category; To segment the network mapping, by parameters Nonlinear mapping function for control; For network parameters, it is a set of convolutional kernel weights and biases;
[0047] The encoder part inside the network can be formalized as a series of convolutions and nonlinear transformations:
[0048] ;
[0049] in, The activation function is the nonlinear transformation function in the network. and For network parameters, for the first Layer convolution kernel and bias; This is the initial feature representation, equivalent to the network input features. , serving as the starting point for feature recursion; The multi-channel input features are formed by stitching together the denoised image, multi-scale porosity features, and skeleton priors in the channel dimension. For the first Layer features, network in the first layer The intermediate feature representation extracted from the layer; For the first Layer features are feature representations obtained after convolution, bias, and nonlinear transformation; This is a network layer index, representing the first [layer] in the network. One encoding or decoding layer;
[0050] The decoder part uses deconvolution or upsampling operators. By gradually restoring spatial resolution and introducing low-level features into skip connections, the deep segmentation model can simultaneously possess global semantic expression and local detail preservation capabilities in its mathematical structure.
[0051] In the design of the loss function, pixel-level segmentation loss is used to constrain the difference between the predicted value and the true label, and the topological structure difference is also explicitly incorporated into the optimization objective in mathematical form; let the true pore label image be denoted as... Therefore, cross-entropy or Dice loss can be used as the basic segmentation loss. For example, the binary cross-entropy loss can be written as:
[0052] ;
[0053] in Indicates the image domain; The segmentation loss measures the difference between the predicted probability and the true label.
[0054] In terms of topology preservation, the number of connected components in the pore region can be denoted as a function. Then the difference between the predicted result and the actual result in terms of connectivity can be expressed as:
[0055] ;
[0056] in, This is an indicator function that takes the value 1 if the condition is true, and 0 otherwise. The threshold is used to convert the probability field into a binary mask. The difference between the predicted and actual connectivity structure is used to measure connectivity loss.
[0057] Connectivity loss mathematically penalizes inconsistencies between predicted and actual topological connectivity, encouraging the network to maintain a reasonable number and structure of porous connected sets during training. To further preserve narrow channels, a fine-path-preserving loss is constructed, focusing on the predicted probabilities on the skeleton prior graph as constraints, defined as follows:
[0058] ;
[0059] in, The penalty term for low probability in skeleton regions is used to preserve the loss for fine paths;
[0060] When the prediction probability at the skeleton point is low, the fine path preservation loss increases, thereby driving the network to increase the pore prediction probability near the skeleton during optimization and reduce the loss of fine pore structure.
[0061] At a higher level, utilizing the concept of persistent homology, the topological features of the pore structure are abstracted into a quantitative description of the Betti number; let the topological feature vectors corresponding to the predicted mask and the real mask be respectively... and This can include topological quantities such as the number of connected components and the number of holes, and then the topological difference loss can be defined:
[0062] ;
[0063] in, Topology difference loss measures the difference between the predicted and the actual topology.
[0064] Topological difference loss constrains the prediction results to approximate the real porous network from the perspective of the overall topological morphology.
[0065] Considering the above losses, the overall optimization objective can be written as:
[0066] ;
[0067] in These are non-negative weighting coefficients used to balance the effects of different loss terms; by minimizing It is possible to achieve a joint optimization between segmentation accuracy and topology preservation in mathematics.
[0068] Further, step S4: After the depth segmentation model prediction is completed, a pore network repair module is constructed to structurally repair any potential local fractures. The pore network repair module uses a local path energy optimization strategy to track the potential pore extension direction, enabling the main pore channels to probabilistically reclose, thus avoiding misleading subsequent physical analysis by the segmentation results. The repair results will be fused with the model output to form a final pore mask with higher topological consistency and stronger structural continuity; including the following processes:
[0069] In the post-processing stage, a class of path energy functions is defined on the probability field to repair residual local fractures in the prediction mask.
[0070] The path within the predicted pore region is denoted as Then, path energy based on probability and intensity gradient can be constructed:
[0071] ;
[0072] in, A porous connection path is an ordered path composed of consecutive pixels. This is the path energy function, which measures the cumulative energy of the path cost; Assigning non-negative weights to control the degree of influence of different energy terms; finding the optimal weights between skeleton breakpoints. The minimum path can be mathematically derived as an optimal connection trajectory that follows the potential pore channels while avoiding the matrix region. This optimal connection trajectory is then incorporated into the final pore mask, thereby restoring the connectivity of the pores. The minimization problem can be solved numerically using algorithms such as dynamic programming or A-Star search, giving the post-processing process a theoretically clear energy-optimal interpretation.
[0073] A topology-preserving material pore network precision segmentation system includes an image input module, a feature enhancement module, a skeleton generation module, a topology-preserving depth segmentation model, a structure repair module, and a structure analysis module.
[0074] The image input module provides material image data;
[0075] The feature enhancement module improves the recognizability of porous regions.
[0076] The skeleton generation module provides structural priors;
[0077] The topology-preserving segmentation model is responsible for predicting the aperture mask;
[0078] The structural repair module is used to restore locally incompletely segmented fine channels;
[0079] The structural analysis module can further calculate material property indicators including porosity, connectivity paths, and pore size distribution.
[0080] This invention possesses the advantages of significantly improving the topology preservation capability of pore networks, enhancing the identification capability of fine pore structures, and effectively resisting noise interference. By introducing structural priors and topological constraints, this invention fundamentally solves the technical problem that deep learning models easily destroy the true topology of pores, making the segmentation results more suitable for permeability analysis, porosity measurement, fluid simulation, and other studies of material physical properties. The cross-scale structure identification capability achieved by this invention enables the segmentation model to take into account both macroscopic large pores and microscopic channels, thus making it suitable for non-destructive testing tasks of complex, multi-scale materials, and possessing significant engineering application value and innovative significance. Attached Figure Description
[0081] Figure 1 This is an overall structural block diagram of the present invention.
[0082] Figure 2 This is a diagram showing the results of multi-scale pore feature extraction in this invention. Detailed Implementation
[0083] The present invention will now be described in further detail with reference to the accompanying drawings and specific preferred embodiments.
[0084] This invention first utilizes multi-scale operators to enhance the features of material images, and constructs a pore-sensitive feature map through indicators such as gradient response, local variance, wavelet coefficients, and texture direction, thereby alleviating the problems of low grayscale, high noise, and large pore size range in the original image.
[0085] Subsequently, a preliminary skeleton structure of the material pores is generated using image structure approximation methods such as thinning and skeleton extraction. This skeleton is then used as a structural prior input to the deep segmentation model, enabling the model to actively preserve the basic morphology of the main pore channels during the learning process. Unlike traditional networks, this invention proposes a deep segmentation model with topology preservation capabilities. In the feature fusion stage, this model inputs original image features, enhanced features, and skeleton priors together, enabling the network to further possess structural alignment capabilities on top of multi-scale semantic representation.
[0086] To enable the segmentation model to automatically learn and maintain topological structure during training, this invention constructs a topological consistency constraint mechanism. This mechanism calculates the differences between the predicted pore structure and the reference structure in terms of connectivity, main channel continuity, and key topological features, incorporating topological information into the training framework as a loss function. This loss not only focuses on the accuracy of pixel classification but also measures the integrity of the structural morphology, ensuring the model maintains continuous pore pathways even when facing weak boundaries, blurred regions, and low-grayscale fine pores. The topological constraint design integrates structural similarity measurement and persistent coherence, enabling the model to identify topological features that critically impact material properties and avoid pore breakage and structural defects even under noise interference.
[0087] After the model prediction is completed, this invention further constructs a pore network repair module to structurally repair any potential local fractures. This module utilizes a local path energy optimization strategy to track the potential channel extension direction, enabling the main pore channels to probabilistically reclose and avoiding misleading subsequent physical analysis by the segmentation results. The repair results are then fused with the model output to form a final pore mask with higher topological consistency and stronger structural continuity.
[0088] In terms of system architecture, this invention constructs a complete system consisting of an image input module, a feature enhancement module, a skeleton generation module, a topology-preserving depth segmentation model, a structure repair module, and a structure analysis module. The image input module provides material image data, the feature enhancement module improves the recognition of pore regions, the skeleton generation module provides structural priors, the topology-preserving segmentation model is responsible for predicting pore masks, the structure repair module is used to restore locally incomplete fine pores, and the structure analysis module can further calculate material property indicators such as porosity, connectivity paths, and pore size distribution. This system is not only applicable to common detection scenarios such as core samples, ceramics, concrete, sintered metals, and powder materials, but can also be extended to other engineering material fields that require accurate characterization of porous structures.
[0089] A method for accurate segmentation of material pore networks based on topology preservation includes the following steps:
[0090] Step S1: Use multi-scale operators to enhance the features of the material grayscale image. Construct a pore-sensitive feature map by using indicators such as gradient response, local variance, wavelet coefficients and texture direction to alleviate the problems of low grayscale, high noise and large pore size in the original image.
[0091] The acquired grayscale image of the material is denoted as... ,in Represents the pixel coordinates on the image plane; to eliminate dimensional differences caused by different imaging devices and acquisition conditions, the original grayscale is normalized to the interval through linear mapping. Let the normalization operation be... ,get:
[0092] ;
[0093] in, This is a grayscale image of the original material, representing the material's location in two-dimensional space. The grayscale value at that location; These are pixel coordinates, representing spatial position indices in the image plane; The normalized image is obtained by linear mapping from the original image, and the grayscale range is compressed to... ; The normalization operator is a mapping function that linearly maps the input grayscale to a standard range.
[0094] in, As the base image for subsequent feature construction and model input; in the preprocessing stage, high-frequency noise can be suppressed by combining Gaussian smoothing and edge-preserving filtering, while preserving as much aperture edge information as possible. This can be abstracted as a combination of linear and nonlinear filtering operators. The denoised image is obtained:
[0095] ;
[0096] in, The result obtained by applying a filtering operator to a normalized image to denoise it. It is a filtering operator, including a composite operator of Gaussian smoothing and edge-preserving filtering;
[0097] To enhance the response of porous regions at different scales, multi-scale convolutional features are constructed in the scale space; the Gaussian kernel is denoted as:
[0098] ;
[0099] in, This is a Gaussian kernel function, used to construct a two-dimensional Gaussian function in scale space; This is a scale parameter, controlling the positive number of the Gaussian kernel smoothing scale;
[0100] Multi-scale smoothing of the denoised image yields:
[0101]
[0102] in, This represents the convolution operation. Indicates the first Standard deviation of each scale; This is a multi-scale smoothed image, the result of convolving the original image with a Gaussian kernel; the gradient magnitude or local energy feature is calculated at each scale, and a gradient operator can be defined. Then we have:
[0103] ;
[0104] in, It is a gradient operator, consisting of the first-order partial derivatives of the image with respect to spatial coordinates; These are partial derivative operators, representing the grayscale changes in the horizontal and vertical directions, respectively; The magnitude of the gradient is the modulus of the gradient vector of the multi-scale image.
[0105] Alternatively, through wavelet basis functions Extracting local energy:
[0106] ;
[0107] in, These are wavelet basis functions used to extract local frequency and energy information; The local energy characteristic is the response amplitude of the image after wavelet or high-pass filtering;
[0108] By weighted fusion of features at different scales, a porosity-sensitive feature field can be constructed:
[0109] ;
[0110] in, This is a weighted fusion result of multi-scale gradient and energy features for a porosity-sensitive feature field. and The scale weighting coefficients are learnable or preset to control the coefficients contributing to the gradient and energy features at different scales; the pore-sensitive feature field gives a higher response in slender channels and maintains a lower response in the homogeneous matrix region, thus mathematically achieving an explicit enhancement of the pore structure.
[0111] Step S2: Generate a preliminary skeleton structure of the material pores by image structure approximation methods such as thinning and skeleton extraction, and input the preliminary skeleton structure as a structural prior into the depth segmentation model so that the depth segmentation model can actively retain the basic shape of the main pore channel during the learning process.
[0112] In terms of prior structure construction, this invention generates an approximation of the material pore skeleton through distance transformation and a refinement operator; the binary reference image (such as a manually coarsely segmented or threshold-based initial pore mask) is denoted as... Define the Euclidean distance transformation:
[0113] ;
[0114] in, The pore mask is obtained by coarse segmentation of a binary pore reference image; For the set of boundaries of binary regions; For Euclidean distance transformation, the Euclidean distance to the nearest boundary point is calculated; this is achieved by finding the maxima of the distance field along the local normal direction and combining this with an iterative refinement operator. By removing redundant boundary points, a skeleton set that approximately reflects the location of the main pore channels can be constructed:
[0115] ;
[0116] in, For the skeleton set, it represents the set of points representing the centerline of the main pore channel;
[0117] The skeleton set is further represented as a skeleton prior graph. By assigning larger values to regions containing the skeleton and zero or smaller values to regions outside the skeleton, an explicit structural prior field is obtained in continuous space.
[0118] Step S3: In order to enable the deep segmentation model to automatically learn to maintain the topology during training, a topology consistency constraint mechanism was constructed. By calculating the differences between the predicted pore structure and the reference structure in terms of connectivity, main channel continuity and key topology features, the topology information was incorporated into the training framework in the form of a loss function.
[0119] In the deep segmentation model construction stage, the denoised image Pore-sensitive characteristic field With skeletal prior diagram Concatenate the input tensors along the channel dimension to form a multi-channel input tensor:
[0120] ;
[0121] Through parameters Segmentation network Mapped to the predicted porosity probability field:
[0122] ;
[0123] in, Indicates the location The probability that it belongs to the pore category; To segment the network mapping, by parameters Nonlinear mapping function for control; For network parameters, it is a set of convolutional kernel weights and biases;
[0124] The encoder part inside the network can be formalized as a series of convolutions and nonlinear transformations:
[0125] ;
[0126] in, The activation function is the nonlinear transformation function in the network. and For network parameters, for the first Layer convolution kernel and bias; This is the initial feature representation, equivalent to the network input features. , serving as the starting point for feature recursion; The multi-channel input features are formed by stitching together the denoised image, multi-scale porosity features, and skeleton priors in the channel dimension. For the first Layer features, network in the first layer The intermediate feature representation extracted from the layer; For the first Layer features are feature representations obtained after convolution, bias, and nonlinear transformation; This is a network layer index, representing the first [layer] in the network. A single encoding or decoding layer; the decoder part uses deconvolution or upsampling operators. By gradually restoring spatial resolution and introducing low-level features into skip connections, the deep segmentation model can simultaneously possess global semantic expression and local detail preservation capabilities in its mathematical structure.
[0127] In the design of the loss function, pixel-level segmentation loss is used to constrain the difference between the predicted value and the true label, and the topological structure difference is also explicitly incorporated into the optimization objective in mathematical form; let the true pore label image be denoted as... Therefore, cross-entropy or Dice loss can be used as the basic segmentation loss. For example, the binary cross-entropy loss can be written as:
[0128] ;
[0129] in Indicates the image domain; The segmentation loss measures the difference between the predicted probability and the true label.
[0130] In terms of topology preservation, the number of connected components in the pore region can be denoted as a function. Then the difference between the predicted result and the actual result in terms of connectivity can be expressed as:
[0131] ;
[0132] in, This is an indicator function that takes the value 1 if the condition is true, and 0 otherwise. The threshold is used to convert the probability field into a binary mask. The difference between the predicted and actual connectivity structure is used to measure connectivity loss.
[0133] Connectivity loss mathematically penalizes inconsistencies between predicted and actual topological connectivity, encouraging the network to maintain a reasonable number and structure of porous connected sets during training. To further preserve narrow channels, a fine-path-preserving loss is constructed, focusing on the predicted probabilities on the skeleton prior graph as constraints, defined as follows:
[0134] ;
[0135] in, The penalty term for low probability in skeleton regions is used to preserve the loss for fine paths;
[0136] When the prediction probability at the skeleton point is low, the fine path preservation loss increases, thereby driving the network to increase the pore prediction probability near the skeleton during optimization and reduce the loss of fine pore structure.
[0137] At a higher level, utilizing the concept of persistent homology, the topological features of the pore structure are abstracted and quantitatively described by the Betti number; let the topological feature vectors corresponding to the predicted mask and the real mask be respectively... and This can include topological quantities such as the number of connected components and the number of holes, and then the topological difference loss can be defined:
[0138] ;
[0139] in, Topology difference loss measures the difference between the predicted and the actual topology.
[0140] Topological difference loss constrains the prediction results to approximate the real porous network from the perspective of the overall topological morphology.
[0141] Considering the above losses, the overall optimization objective can be written as:
[0142] ;
[0143] in These are non-negative weighting coefficients used to balance the effects of different loss terms; by minimizing It is possible to achieve a joint optimization between segmentation accuracy and topology preservation in mathematics.
[0144] Step S4: After the deep segmentation model prediction is completed, a pore network repair module is constructed to structurally repair any possible local fractures. The pore network repair module uses a local path energy optimization strategy to track the potential pore extension direction, so that the main pore channel can be reclosed in a probabilistic sense, avoiding the segmentation results from misleading subsequent physical analysis. The repair results will be fused with the model output to form a final pore mask with higher topological consistency and stronger structural continuity.
[0145] In the post-processing stage, a class of path energy functions is defined on the probability field to repair residual local fractures in the prediction mask.
[0146] The path within the predicted pore region is denoted as Then, path energy based on probability and intensity gradient can be constructed:
[0147] ;
[0148] in, A porous connection path is an ordered path composed of consecutive pixels. This is the path energy function, which measures the cumulative energy of the path cost; Assigning non-negative weights to control the degree of influence of different energy terms; finding the optimal weights between skeleton breakpoints. The minimum path can be mathematically derived as an optimal connection trajectory that follows the potential pore channels while avoiding the matrix region. This optimal connection trajectory is then incorporated into the final pore mask, thereby restoring the connectivity of the pores. The minimization problem can be solved numerically using algorithms such as dynamic programming or A-star search, giving the post-processing process a theoretically clear energy-optimal interpretation.
[0149] In terms of system architecture, this invention constructs a topology-preserving material pore network precision segmentation system, including an image input module, a feature enhancement module, a skeleton generation module, a topology-preserving depth segmentation model, a structure repair module, and a structure analysis module. The image input module provides material image data; the feature enhancement module improves the recognition of pore regions; the skeleton generation module provides structural priors; the topology-preserving segmentation model is responsible for predicting pore masks; the structure repair module is used to restore locally incomplete pores; and the structure analysis module can further calculate material property indicators such as porosity, connectivity paths, and pore size distribution. This system is not only applicable to common detection scenarios such as core samples, ceramics, concrete, sintered metals, and powder materials, but can also be extended to other engineering material fields that require precise characterization of porous structures.
[0150] In summary, by preprocessing the input image and constructing multi-scale features, extracting the skeleton prior and fusing multiple channels, modeling the segmentation network with topological constraints, and performing local repair based on path energy minimization, this invention forms a complete mathematical description from pixel grayscale space to topological structure space and then to path optimization space. This enables the material pore network to not only have high accuracy at the pixel level in the segmentation results, but also maintain a high degree of consistency with the real pore network in terms of topological structure, providing a reliable structural foundation for subsequent porosity calculation, connectivity analysis, and seepage simulation.
[0151] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for accurate segmentation of material pore networks based on topology preservation, characterized in that: Includes the following steps: Step S1: Use multi-scale operators to enhance the features of the material grayscale image and construct a pore-sensitive feature map to alleviate the problems of low grayscale, high noise and large pore size range in the original image; Step S2: Generate a preliminary skeleton structure of material pores using an image structure approximation method, and use the preliminary skeleton structure as a structural prior input to the depth segmentation model, so that the depth segmentation model can actively retain the basic shape of the main pore channel during the learning process. Step S3: A topological consistency constraint mechanism was constructed. By calculating the differences between the predicted pore structure and the reference structure in terms of connectivity, main channel continuity and key topological features, the topological information was incorporated into the training framework in the form of a loss function. Step S4: The repair results will be fused with the model output to form a final pore mask with higher topological consistency and stronger structural continuity; Step S3: A topological consistency constraint mechanism is constructed. By calculating the differences between the predicted pore structure and the reference structure in terms of connectivity, main channel continuity, and key topological features, topological information is incorporated into the training framework in the form of a loss function; including the following processes: In the deep segmentation model construction stage, the denoised image Pore-sensitive characteristic field With skeletal prior diagram Concatenate the input tensors along the channel dimension to form a multi-channel input tensor: ; Through parameters Segmentation network Mapped to the predicted porosity probability field: ; in, Indicates the location The probability that it belongs to the pore category; To segment the network mapping, by parameters Nonlinear mapping function for control; The network parameters are a set of convolutional kernel weights and biases. The encoder portion inside the network is formalized as a series of convolutions and nonlinear transformations: ; in, The activation function is the nonlinear transformation function in the network. and For network parameters, for the first Convolutional kernel and bias; For the first Layer features, network in the first layer The intermediate feature representation extracted from the layer; For the first Layer features are feature representations obtained after convolution, bias, and nonlinear transformation; This is a network layer index, representing the first [layer] in the network. One encoding or decoding layer; Record the actual pore size label image as follows Then, cross-entropy or Dice loss is used as the basic segmentation loss. The binary cross-entropy loss is written as: ; in Indicates the image domain; The segmentation loss measures the difference between the predicted probability and the true label. In terms of topology preservation, the number of connected components in the pore region is denoted as a function. The difference between the predicted result and the actual result in terms of connectivity is expressed as: ; in, This is an indicator function that takes the value 1 if the condition is true, and 0 otherwise. The threshold is used to convert the probability field into a binary mask. The difference between the predicted and actual connectivity structure is used to measure connectivity loss. Construct a fine-path-preserving loss, focusing on the predicted probabilities on the skeleton prior map as the key constraints, defined as follows: ; in, The penalty term for low probability in skeleton regions is used to preserve the loss for fine paths; A skeleton set; The topological features of the pore structure are abstracted into a Betti quantitative description; let the topological feature vectors corresponding to the predicted mask and the real mask be respectively... and If the topological quantities, including the number of connected components and the number of holes, are included, then the topological difference loss is defined as follows: ; in, Topology difference loss measures the difference between the predicted and the actual topology. Taking into account the above losses, the overall optimization objective can be written as: ; in, It is a non-negative weighting coefficient used to balance the effects of different loss terms.
2. The method for accurate segmentation of material pore networks based on topology preservation according to claim 1, characterized in that: Step S1: Use multi-scale operators to enhance the features of the material grayscale image and construct a pore-sensitive feature map to alleviate the problems of low grayscale, high noise and large pore size range in the original image; include The following process: The acquired grayscale image of the material is denoted as... ,in Represents pixel coordinates on the image plane; normalizes the original grayscale to the interval using a linear mapping. Let the normalization operation be... ,get: ; in, This is a grayscale image of the original material, representing the material's location in two-dimensional space. The grayscale value at that location; These are pixel coordinates, representing spatial position indices in the image plane; The normalized image is obtained by linear mapping from the original image, and the grayscale range is compressed to... ; The normalization operator is a mapping function that linearly maps the input grayscale to a standard range. in, The image serves as the foundation for subsequent feature construction and model input; it is abstracted into a combination of linear and nonlinear filtering operators. The denoised image is obtained: ; in, The result obtained by applying a filtering operator to a normalized image to denoise it. It is a filtering operator, including a composite operator of Gaussian smoothing and edge-preserving filtering; Let the Gaussian kernel be: ; in, This is a Gaussian kernel function, used to construct a two-dimensional Gaussian function in scale space; This is a scale parameter, controlling the positive number of the Gaussian kernel smoothing scale; Indicates the first Standard deviation of each scale; Multi-scale smoothing of the denoised image yields: ; in, This represents the convolution operation. Indicates the first Standard deviation of each scale; This is a multi-scale smoothed image, the result of convolving the original image with a Gaussian kernel; For denoising images, calculate the gradient magnitude or local energy features at each scale, and define the gradient operator. Then we have: ; in, It is a gradient operator, consisting of the first-order partial derivatives of the image with respect to spatial coordinates; These are partial derivative operators, representing the grayscale changes in the horizontal and vertical directions, respectively; The magnitude of the gradient is the modulus of the gradient vector of the multi-scale image. Alternatively, through wavelet basis functions Extracting local energy: ; in, These are wavelet basis functions used to extract local frequency and energy information; The local energy characteristic is the response amplitude of the image after wavelet or high-pass filtering; We construct a porosity-sensitive feature field by weighted fusion of features at different scales: ; in, This is a weighted fusion result of multi-scale gradient and energy features for a porosity-sensitive feature field. and These are learnable or preset scale weight coefficients that control the contribution of gradients and energy features at different scales.
3. The method for accurate segmentation of material pore networks based on topology preservation according to claim 2, characterized in that: Step S2: Generate a preliminary skeleton structure of material pores using an image structure approximation method, and input the preliminary skeleton structure as a structural prior into the depth segmentation model so that the depth segmentation model can actively retain the basic shape of the main pore channel during the learning process. Includes the following processes: Let the binary reference image be . Define the Euclidean distance transformation: ; in, The pore mask is obtained by coarse segmentation of a binary pore reference image; For the set of boundaries of binary regions; For Euclidean distance transformation, the Euclidean distance to the nearest boundary point; Construct a skeleton set that approximately reflects the location of the main pore channels: ; in, For the skeleton set, it represents the set of points representing the centerline of the main pore channel; The skeleton set is represented as a skeleton prior graph. .
4. The method for accurate segmentation of material pore networks based on topology preservation according to claim 3, characterized in that: Step S4: The repair result will be fused with the model output to form a final pore mask with higher topological consistency and stronger structural continuity; including the following processes: In the post-processing stage, a class of path energy functions is defined on the probability field to repair residual local fractures in the prediction mask. The path within the predicted pore region is denoted as Then, construct the path energy based on probability and intensity gradient: ; in, A porous connection path is an ordered path composed of consecutive pixels. This is the path energy function, which measures the cumulative energy of the path cost; Assigning non-negative weights to control the degree of influence of different energy terms; finding the optimal weights between skeleton breakpoints. The shortest path.
5. A topology-preserving material pore network precise segmentation system, used to implement the topology-preserving material pore network precise segmentation method as described in any one of claims 1-4, characterized in that: It includes an image input module, a feature enhancement module, a skeleton generation module, a topology-preserving depth segmentation model, a structure repair module, and a structure analysis module; The image input module provides material image data; The feature enhancement module improves the recognizability of the pore region. The skeleton generation module provides structural priors; The topology-preserving depth segmentation model is responsible for predicting the aperture mask; The structural repair module is used to restore locally incompletely segmented fine channels; The structural analysis module calculates material property parameters including porosity, connectivity, and pore size distribution.