A CT image segmentation method based on NGA-RSF model
By combining the NGA-RSF model with natural gradients and the AdamW algorithm to optimize the parameter space, the problems of high computational complexity and slow convergence speed in industrial CT image segmentation are solved, achieving efficient and high-precision image segmentation, especially significantly improving the segmentation effect in images with complex structures and uneven intensity of multiple materials.
Patent Information
- Application Number
- CN202211308439.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-25
- Publication Date
- 2026-01-16
- Estimated Expiration
- 2042-10-25
AI Technical Summary
Existing industrial CT image segmentation methods suffer from problems such as high computational complexity, slow convergence speed, and sensitivity to parameters, making it difficult to achieve high-precision and high-efficiency segmentation, especially in images with complex structures and uneven intensity of multiple materials.
A CT image segmentation method based on the NGA-RSF model is adopted. The parameter space is optimized by combining natural gradient and AdamW algorithm. By iteratively updating the level set function and adaptively controlling the scale of Gaussian kernel function, the parameter space and parameter control of the RSF model are optimized, thereby improving the convergence speed and segmentation efficiency.
It significantly improves the efficiency and accuracy of image segmentation, reduces computational complexity, enhances the robustness and convergence speed of the model, and can better handle image segmentation with uneven intensity of multiple materials and complex structures.
Smart Images

Figure CN115564758B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the field of CT image segmentation, in particular to a CT image segmentation method based on an NGA-RSF model. BACKGROUND
[0002] With the rapid advancement of the intelligent manufacturing era and industry 4.0, high precision and high efficiency have become important pursuit goals in the industrial field such as mechanical manufacturing, and the use of industrial CT technology to realize high-precision measurement of complex structure precision parts is also an urgent demand of some important industries. The accurate segmentation of the region of interest of an industrial CT image is not only a prerequisite guarantee for high-precision measurement, but also one of the research focuses and hot issues of industrial CT technology. The industrial CT image is different from other types of images, such as synthetic aperture radar images and nuclear magnetic resonance images, and has problems such as uneven target image grayscale, fuzzy edges and ring-like artifacts, which seriously affect the segmentation accuracy of the image. At the same time, high-resolution imaging means a huge amount of data, which puts higher requirements on the real-time performance of the image segmentation method.
[0003] The active contour model has attracted widespread attention due to its advantages of easy implementation, smooth and closed sub-pixel segmentation contour and the like. The existing active contour model can be divided into two categories of edge-based and region-based according to the segmentation form, and three categories of local information-based, global information-based and joint local information and global information according to the degree of utilization of local information. The region-based active contour model has the advantages of noise insensitivity and high robustness of initial position compared with the edge-based model; the local-based active contour model may be more suitable for accurate segmentation tasks of heterogeneous objects compared with the global-based model. Considering the characteristics of the industrial CT image, the selection of the segmentation model should consider the local region information-based active contour model, and the RSF model performs well in practical application. However, the model using local information has the problems of complex calculation and poor convergence, and simply increasing the computing device cannot meet the actual production requirements to realize high-precision and high-efficiency segmentation, so an acceleration optimization method suitable for the segmentation model is urgently needed. The gradient defined by the traditional active contour model mainly depends on the selection of the inner product, and the optimization gradient flow method proposed thereby can reduce the probability of the curve evolution process of the traditional active contour model falling into an irrelevant local minimum value; the Riemannian steep descent method uses information geometry-related knowledge to construct a natural gradient to effectively optimize the parameter space, and has advantages in calculation efficiency and noise resistance.
[0004] In addition, the RSF model has a unique advantage over other active contour models based on local region information, which is "region stretchability". The strength of the fitting energy is a local region centered on an image point, and the size of the region is controlled by the kernel function. Therefore, the scale of the kernel function is an important parameter of the RSF model. Under the same initial contour, different parameters may result in two different results, and the convergence speed is determined. Therefore, proper control of the main parameters of the RSF model is an important link to improve the convergence speed and segmentation accuracy. SUMMARY
[0005] The purpose of the present application is to provide a CT image segmentation method based on an NGA-RSF model.
[0006] The purpose of the present application is achieved by the technical scheme, and the specific steps are as follows:
[0007] 1) Obtain a CT image to be segmented, and pre-process the CT image to be segmented;
[0008] 2) Construct an RSF image segmentation model NGA-RSF based on a joint natural gradient and AdamW algorithm, set the objective function and initial parameters of the NGA-RSF model, and the initial parameters include the iteration stop condition, the AdamW parameter control condition, the AdamW algorithm adaptive adjustment parameter, and the image segmentation model parameter;
[0009] 3) Input the pre-processed CT image into the NGA-RSF model, and iteratively update the level set function;
[0010] 4) When the iteration process of step 3) reaches the iteration stop condition, the zero level set of the level set function is taken as the segmentation result.
[0011] Further, the objective function of the NGA-RSF model in step 2) includes the objective function of the AdamW algorithm, and the objective function of the AdamW algorithm is the ratio S of the L2 norm of the level set matrix before and after iteration i :
[0012]
[0013] In the formula, φ i-1 is the level set matrix after the i-1 iteration, and φ i is the level set matrix after the i iteration.
[0014] The iteration stop condition is that the absolute value of the difference between the L2 norm ratio of the level set matrix before and after n x iteration is less than a preset threshold:
[0015]
[0016] In the formula, is the L2 norm ratio of the level set matrix after the i+n x is the L2 norm ratio of the level set matrix after the i iteration, 10 i is the L2 norm ratio of the level set matrix after the i iteration, 10 -5 is a preset threshold of the iteration stop condition;
[0017] The AdamW parameter control condition is that the iteration number is greater than the initial iteration number n0 or n y The absolute value of the difference between the L2 norm ratio of the level set matrix before and after the iteration is greater than the preset threshold:
[0018]
[0019] In the formula, w start is the AdamW parameter control threshold, when the AdamW parameter control condition is met, the AdamW algorithm is used to adaptively control the RSF iteration step, thereby reducing the number of convolution operations and improving the operation efficiency;
[0020] The AdamW algorithm adaptive adjustment parameters include the learning rate α, the current estimated exponential decay rate β1, β2, the weight decay factor w, and the iteration coefficient η t , the first moment momentum m t=0 , the second moment momentum v t=0 , the initial time step t, the iteration initial kernel parameter σ t=0 , and the constant ε Adamw ;
[0021] The image segmentation model parameters include the model regularization term coefficient μ, the model length term coefficient v, the initial level set which is the amplitude of the binary step function c0, the coefficients λ1 and λ2 of the in-out profile energy fitting term, the model time step △t, the iteration number n of the model, the parameters ε in the functions H(·) and δ(·), the RSF model Gaussian kernel function size σ, and the initial iteration number n0 before the parameter control.
[0022] Further, the specific steps of updating the level set function in step 3) are as follows:
[0023] 3-1) input the preprocessed CT image into the regionally expandable fitting RSF model;
[0024] 3-2) use the natural gradient to optimize the parameter space of the RSF model to obtain a descending flow equation that meets the iteration condition, and start iteration;
[0025] 3-3) determine whether the level set matrix after iteration meets the stop iteration condition, if yes, go to step 4); if not, go to step 3-4);
[0026] 3-4) determining whether the level set matrix after iteration satisfies the AdamW parameter control condition, if yes, updating the scale of the Gaussian kernel function in the RSF model by the AdamW algorithm iteration, so as to optimize the parameter space and parameter adaptive control of the RSF model, and returning to step 3-2) for the next iteration; if not, directly returning to step 3-2) for the next iteration.
[0027] Further, the specific method for optimizing the parameter space of the regionally scalable fitting RSF model by using the natural gradient in step 3-2) is as follows:
[0028] The natural gradient is based on the Riemann steepest descent method of Marcelo Pereyra, which first uses information geometry to obtain a statistical manifold related to the active contour, and then solves the natural gradient on the statistical manifold:
[0029] A positive definite matrix A(φ) is used to optimize the gradient, and the gradient of the level set function is directly solved in the φ space through the inner product <φ, A(φ)φ>, wherein the statistical manifold M parameterized by φ is a flow space, and the probability density function F(y|φ) of the statistical manifold M is:
[0030]
[0031] In the formula, f(y i |θ) is an exponential family probability density function, θ1 and θ2 are statistical parameters related to the image foreground and background respectively, and the point φ on the flow space M represents that the probability distribution of the random variable Y is F(y|φ)=P[Y≤y], and y is composed of the foreground and the background;
[0032] According to the general Riemann steepest descent method of Marcelo Pereyra, it is known that the calculation of energy minimization and the calculation of the maximum likelihood estimator of φ for a given y have the same meaning, and the Fisher information matrix G with the Riemann metric tensor is used to measure the distance between φ and another point φ' on the flow space M:
[0033]
[0034] The steepest descent gradient flow of the energy E on the manifold space M is obtained as:
[0035]
[0036] In the formula, f(y characterizes the natural gradient of the energy E(y;φ)=-logf(y|φ) on the Riemann manifold space, represents the change of E with respect to the probability distribution F(y|φ) of φ, and γ t is a time step;
[0037] The regularization term of the level set energy fitting function of the RSF model is brought into the steepest descent gradient flow to obtain the following level set iterative equation:
[0038]
[0039] Wherein:
[0040]
[0041] e i =∫K σ (y-x)|I(x)-f i (y)| 2 dy
[0042]
[0043] M1(φ(y)=H(φ(y))
[0044] M2(φ(y)=1-H(φ(y))
[0045]
[0046] In the formula, φ t represents the level set function of the tth iteration, γ t is the time step, G is the Fisher information matrix, δ(·) is the regularization function of the Dirac triangle function, H(·) is the regularization function of the Heaviside function, λ1 and λ2 are the coefficients of the energy fitting terms inside and outside the contour respectively, μ represents the regularization term coefficient of the model, v represents the length term coefficient of the model, f i (y) represents the approximate fitting function of the image intensity on both sides of the contour.
[0047] Through the above calculation, the final descending flow equation that satisfies the iteration condition is obtained:
[0048]
[0049] is the Gaussian kernel function of the RSF model, and the expression is:
[0050]
[0051] Further, the specific method for updating the scale σ of the Gaussian kernel function in the RSF model by the AdamW algorithm in step 3-4) is:
[0052] The AdamW optimization model is:
[0053]
[0054] In the above formula:
[0055]
[0056] m t = β1m t-1 + (1-β1)g t
[0057]
[0058]
[0059]
[0060] In the formula, β1 and β2 are estimated exponential decay rates, respectively, w is a weight decay factor, η t is an iteration coefficient, α is a learning rate, f t (σ t-1 ) is a loss function under the parameter σ t-1 , m t and v t are matrix momentum.
[0061] The updated σ t is used to update the Gaussian kernel function in the RSF model, and the step 3-2) is returned for the next iteration.
[0062] Due to the adoption of the above technical solutions, the present application has the following advantages:
[0063] The present application uses natural gradient and AdamW algorithm to optimize the RSF model from the aspects of parameter space and parameter control, which not only improves the convergence speed of the RSF model, but also realizes the adaptive change of the kernel function scale, greatly improves the segmentation efficiency while ensuring the image segmentation quality, and greatly improves the model convergence speed and robustness.
[0064] Other advantages, objects, and features of the present application will be apparent to those skilled in the art from the following specification and claims, and will be learned from the practice of the present application. The objects and other advantages of the present application can be realized and obtained by the following specification and claims. BRIEF DESCRIPTION OF DRAWINGS
[0065] The drawings of the present application are as follows.
[0066] Figure 1 is a flowchart of the CT image segmentation method of the present application based on the NGA-RSF model.
[0067] Figure 2 (a), (b), (c), (d) are respectively the original images of the circle image, the blood vessel image, the complex casting CT image and the blade CT image in the embodiment of the application.
[0068] Figure 3 (a), (b), (c), (d) are respectively the original images of the circle image, the blood vessel image, the complex casting CT image and the blade CT image, the images obtained by the CV model segmentation, the images obtained by the RSF model segmentation, and the images obtained by the NGA-RSF model segmentation in the embodiment of the application.
[0069] Figure 4 It is a probe image segmented by the CV model, the RSF model and the NGA-RSF model in the embodiment of the application.
[0070] Figure 5 It is an original image of a large-size industrial CT image in the embodiment of the application.
[0071] Figure 6 (a), (b), (c), (d) are respectively the original image of the large-size industrial CT image, the image segmented by the CV model, the image segmented by the RSF model, and the image segmented by the NGA-RSF model in the embodiment of the application. DETAILED DESCRIPTION
[0072] The application will be further described below in combination with the drawings and embodiments.
[0073] Embodiment:
[0074] As shown in a CT image segmentation method based on a NGA-RSF model, the specific steps are as follows: Figure 1
[0075] 1) Obtain a CT image to be segmented, and pre-process the CT image to be segmented;
[0076] In the embodiment of the application, the pre-processing of the CT image includes but is not limited to image gray scale transformation, image noise reduction, image cropping and the like.
[0077] 2) Construct a RSF image segmentation model NGA-RSF combining natural gradient and AdamW algorithm, set the objective function and initial parameters of the NGA-RSF model, and the initial parameters include iteration stop condition, AdamW parameter control condition, AdamW algorithm adaptive adjustment parameter and image segmentation model parameter, and the specific method is as follows:
[0078] 2-1) The objective function of the NGA-RSF model includes the objective function of the AdamW algorithm, and the objective function of the AdamW algorithm is the ratio S of the L2 norm of the level set matrix before and after iteration i :
[0079]
[0080] wherein φ i-1 is the level set matrix after the i-1th iteration, φ i is the level set matrix after the ith iteration.
[0081] 2-2) the iteration stopping condition is that the absolute value of the difference between the L2 norm ratio of the level set matrices before and after the nth iteration is less than a preset threshold value: x
[0082]
[0083] wherein φ is the L2 norm ratio of the level set matrices after the i+n x th iteration, S i is the L2 norm ratio of the level set matrices after the ith iteration, 10 -5 is the preset threshold value of the iteration stopping condition.
[0084] In the examples of the present application, the iteration stopping condition is divided into two cases of determining the number of iterations and not determining the number of iterations. In the case of not determining the number of iterations, a more ideal result can be obtained by setting the threshold value of the absolute value of the difference between the L2 norm ratio of the level set matrices before and after the nth iteration; in the case of determining the number of iterations, the number of iterations can be directly set. x
[0085] 2-3) the AdamW parameter control condition is that the number of iterations is greater than the initial iteration number n0 or n y th iteration is greater than a preset threshold value:
[0086]
[0087] wherein w start is the AdamW parameter control threshold value, when the AdamW parameter control condition is met, the AdamW algorithm is used to adaptively control the RSF iteration step, so as to reduce the number of convolution operations and improve the operation efficiency.
[0088] 2-4) the AdamW algorithm adaptive adjustment parameters include a learning rate α, a current estimated exponential decay rate β1, β2, a weight decay factor w, an iteration coefficient η t , a first moment momentum m t=0 , a second moment momentum v t=0 , an initialization time step t, an iteration initial kernel parameter σ t=0 , and a constant ε Adamw .
[0089] In this embodiment of the invention, the learning rate α = 0.01, the currently estimated exponential decay rates β1 = 0.9 and β2 = 0.999, the weight decay factor w = 0.01, and the iteration coefficient η t =1, first-order moment of momentum m t=0 =0, second moment of momentum v t=0 =0; to prevent the divisor from being zero, the constant ε Adamw =10 -8 .
[0090] 2-5) The image segmentation model parameters include the model regularization coefficient μ, the model length coefficient ν, the initial level set is the amplitude c0 of the binary step function, the coefficients λ1 and λ2 of the contour-inside-outside energy fitting term, the model time step Δt, the model iteration number n, the parameter ε in the function H(·) and the function δ(·), the size σ of the Gaussian kernel function of the RSF model and the initial iteration number n0 before parameter control.
[0091] 3) Input the preprocessed CT images into the NGA-RSF model and iteratively update the level set function. The specific steps are as follows:
[0092] 3-1) The preprocessed CT image can be input into the extended RSF model;
[0093] 3-2) Optimize the parameter space of the RSF model using natural gradients to obtain a descending flow equation that satisfies the iteration conditions, and then begin iteration; the specific method for optimizing the parameter space of the regionally scalable fitted RSF model using natural gradients is as follows:
[0094] Parameter space optimization utilizes natural gradients to accelerate model convergence. The core idea is to introduce natural gradients into the RSF model. Natural gradients are a measure of the change in the Riemannian manifold, similar to the Euclidean Newton descent method, which has advantages such as second-order convergence speed and isotropy. The natural gradient is based on Marcelo Pereyra's steepest descent method of Riemann. First, information geometry is used to obtain the statistical manifold related to the activity contour, and then the natural gradient is solved on the statistical manifold, which can greatly improve the convergence efficiency.
[0095] 3-2-1)Ω is A bounded subset Given a D-dimensional image composed of p channels, this paper studies a two-dimensional grayscale image, where D is 2 and p is 1. y is composed of the foreground Ω1 and the background Ω2 = Ω / Ω1, at point... The image values have the following statistical distribution:
[0096] y(x)~f·(|θ1)if x∈Ω1
[0097] y(x)~f·(|θ2)if x∈Ω2
[0098] where θ1 and θ2 are statistical parameters related to the image foreground and background respectively, denotes the probability density function of the exponential distribution, the minimal curve is solved by using the level set method, and the disturbance of virtual time t is introduced to solve the Euler-Lagrange equation, that is, the gradient descent flow is obtained for actual processing:
[0099]
[0100] But in the above formula, the anisotropic gradient is the fundamental reason why the model needs a large number of iterations to converge, therefore, the positive definite matrix A(φ) is used to optimize the gradient, considering that the level set function belongs to a non-Euclidean space, the gradient of the level set function is directly solved in the φ space through the inner product <φ, A(φ)φ>, and the statistical manifold M of the flow field is parameterized by φ, and the probability density function F(y|φ) of the statistical manifold M is:
[0101]
[0102] where f(y i |θ) is the probability density function of the exponential family, θ1 and θ2 are statistical parameters related to the image foreground and background respectively, and the point φ on the statistical manifold M represents that the probability distribution of the random variable Y is F(y|φ)=P[Y≤y], y is composed of the foreground and the background;
[0103] 3-2-2) According to the general Riemann steepest descent method of Marcelo Pereyra, it is known that the energy minimization and the calculation of the maximum likelihood estimator of φ for a given y have the same meaning, and the Fisher information matrix G with the Riemann metric tensor is used to measure the distance between φ and another point φ' on the statistical manifold M:
[0104]
[0105] In the examples of the present application, in order to simplify the operation, when calculating the Fisher information matrix G of the Riemann metric tensor, an approximate solution is used to reduce the amount of operation, and the natural gradient approximate calculation is to replace the local fitting values f1(x) and f2(x) in the RSF model with the intensity mean values in the CV model, and the Fisher information matrix G is calculated by using the simplified gradient descent flow of the localized energy term.
[0106] 3-2-3) Through the above formula, the steepest descent gradient flow of the energy E on the statistical manifold M is:
[0107]
[0108] where The natural gradient of the energy E(y; φ) = -logf(y|φ) in the Riemannian manifold space represents the change of E with respect to the probability distribution F(y|φ) of φ t is the time step;
[0109] 3-2-4) The regularization term of the level set energy fitting function of the RSF model is brought into the steepest descent gradient flow to obtain the following level set iterative equation:
[0110]
[0111] Wherein:
[0112]
[0113] e i =∫K σ (y-x)|I(x)-f i (y)| 2 dy
[0114]
[0115] M1(φ(y)=H(φ(y))
[0116] M2(φ(y)=1-H(φ(y))
[0117]
[0118] In the formula, φ t represents the level set function of the tth iteration, γ t is the time step, G is the Fisher information matrix, δ(·) is the regularization function of the Dirac triangle function, H(·) is the regularization function of the Heaviside function, λ1, λ2 are the coefficients of the contour inside and outside energy fitting terms respectively, μ represents the regularization term coefficient of the model, v represents the length term coefficient of the model, f i (y) represents the approximate fitting function of the image intensity on both sides of the contour;
[0119] Through the above calculation, the final descending flow equation that satisfies the iteration condition is obtained:
[0120]
[0121] is the Gaussian kernel function of the RSF model, and the expression is:
[0122]
[0123] In the examples of the present application, because the level set regularization term of the RSF model essentially preserves the regularity of the level set function, while avoiding re-initialization of the level set function in the iterative process, the gradient descent flow under the optimized gradient is still preserved.
[0124] 3-3) Determine whether the iterated level set matrix satisfies the stop iteration condition, if yes, go to step 4); if not, go to step 3-4);
[0125] 3-4) Determine whether the iterated level set matrix satisfies the AdamW parameter control condition, if yes, update the Gaussian kernel function scale σ in the RSF model by the AdamW algorithm to optimize the parameter space and parameter adaptive control of the RSF model, and return to step 3-2) for the next iteration; if not, directly return to step 3-2) for the next iteration; the specific method for updating the Gaussian kernel function scale σ in the RSF model by the AdamW algorithm is:
[0126] Both the RSF model and the improved model have the advantage of regional scalability, the strength of the fitting energy is a local region centered on the current pixel, and the size of the region is controlled by the Gaussian kernel function scale σ, so the AdamW optimization model is:
[0127]
[0128] In the above formula:
[0129]
[0130] m t = β1m t-1 + (1-β1)g t
[0131]
[0132]
[0133]
[0134] In the formula, β1 and β2 are both estimated exponential decay rates, respectively represent the tth power of the exponential decay rate, w is a weight decay factor, η t is an iteration coefficient, α is a learning rate, f t (σ t-1 ) is the loss function under the parameter σ t-1 , m t and v t are momentums;
[0135] Use the updated σ tUpdating the Gaussian kernel function in the RSF model and returning to step 3-2) for the next iteration.
[0136] In the examples of the present application, the scale σ of the kernel function is an important parameter of the RSF model, and proper control of the main parameters of the RSF model is an important link to improve the convergence speed and segmentation accuracy; compared with the traditional gradient optimization algorithm, the AdamW algorithm introduces the learning rate as the iteration step, which constantly approaches the optimal value along the negative gradient direction, so it can greatly save the calculation time. The AdamW algorithm has the advantages of high efficiency, small memory occupation, etc., and can improve the algorithm performance, solve the problems of possible non-existence of optimal solution and slow convergence speed of the RSF model. Because the kernel functions of different scales have different convergence speeds and segmentation results, it is necessary to adaptively control the size σ of the Gaussian kernel function, and the objective function is the ratio S of the L2 norms of the level set matrices before and after iteration in step 2) i Because the RSF model and the improved model may increase the number of convolution operations during parameter changes, the parameter σ is updated according to the AdamW algorithm only when the parameter control conditions of the AdamW algorithm are met, and the main purpose is to reduce the number of convolution operations in the image segmentation model.
[0137] 4) When the iteration process of step 3) reaches the iteration stopping condition, the zero level set of the level set function is taken as the segmentation result.
[0138] 5) Experimental verification:
[0139] In order to verify the application effect of the present application, the superiority of the present application relative to CV and RSF algorithms is compared from three aspects of overall segmentation effect, segmentation accuracy and convergence. The verification experiment is completed in the environment of Intel(R) Core(TM) i7-10700 CPU@2.90GHz 2.90GHz processor, 16GB memory, Windows 10 Professional 64-bit, Matlab R2018b; except for special instructions, the following basic parameters are used in the experiment: μ = 1, v = 0.001 × 255 × 255, c0 = 2, λ1 = λ2 = 1, △t = 0.1.
[0140] 5-1) In order to show the robustness of the present application to noise and the overall segmentation effect of the image, as shown in Figure 2 , the verification experiment selects images containing multiple intensity-uniform circles, blood vessel images, CT images of complex castings, and blade CT images as experimental objects, uses the experimental parameters in Table 1, and obtains the segmentation results as shown in Figure 3 , wherein the solid line is the experimental segmentation result, and the dashed line is the set initial contour; from Figure 2The results show that the present invention performs well when segmenting multiple regions with different intensities or with noise and weak edges, and can completely segment the target.
[0141] Table 1. Comparison of overall segmentation effects using experimental parameters.
[0142]
[0143]
[0144] 5-2) To compare the image segmentation accuracy of the CV model, RSF model, and the NGA-RSF model of this invention, such as... Figure 4 As shown, this experiment selected eight CT slices of ruby styluses with a diameter of 6 mm and a sphericity of 0.5 μm as experimental objects. The image matrix of each layer was 1472×1472, with a pixel size of 0.05 mm and an actual spherical radius of 60 pixels. Three models were used to segment the spherical slices in the CT slice sequence of the stylus and fit the spherical radius. Finally, the results were compared with the actual spherical radius of the stylus. The parameters used in the experiment are shown in Table 2. If the actual spherical radius of the ruby stylus (pixel length 60) is taken as the true value, the relative error of the three models is evaluated. As can be seen from the spherical radius fitting results in Table 3, the fitting result of this invention has the smallest difference from the true value, with an average absolute error of less than 0.06 pixels. In summary, the NGA-RSF model of this invention can finely segment the stylus contour, and the average relative error is reduced by about 74.98% compared with the RSF model, thus improving the segmentation accuracy.
[0145] Table 2. Spherical segmentation parameters of probes for each model.
[0146]
[0147] Table 3. Fitting results of the spherical radius of the segmented probe for each model.
[0148]
[0149]
[0150] 5-3) To compare the convergence performance of CV, RSF, and NGA-RSF models in processing large-size industrial CT images, this embodiment selects a CT scan image with a size of 1944 pixels × 1944 pixels as the experimental object, such as... Figure 5 As shown, the image contains rectangular steel gauge blocks and ceramic needle gauges. Due to factors such as radiation hardening, the image of the gauge blocks has uneven grayscale and exhibits interference fringes, making accurate segmentation of this type of image extremely difficult. The iteration stopping condition is as follows:
[0151] |S i+100 -S i |<10 -5
[0152] The experimental parameters of each model are shown in Table 4, and the segmentation results are shown in FIG. 4, where the dashed line is the initial contour and the solid line is the segmentation result. Figure 6
[0153] Table 4: Convergence comparison experimental parameters
[0154]
[0155] Considering that the convolution operation of a large size image is time-consuming, and both the RSF model and the present application need to perform multiple convolution operations, therefore, in the present embodiment, the principle of inverse Fourier transform of signal frequency domain multiplication is used to preliminarily accelerate the model, and finally the iteration number and time consumption required for the convergence of each model in Table 5 are obtained.
[0156] Table 5: Iteration number of each model
[0157]
[0158] From Figure 6 and Table 5, it can be seen that the present application can better segment the gage block and the needle gauge, not only the iteration number is small, but also has good resistance to artifacts and noise; compared with the RSF model, the iteration number of NGA-RSF is reduced by about 76.79% (1353 times), and the segmentation time consumption is reduced by 43.61%, and the experiment shows that NGA-RSF has good convergence characteristics.
[0159] In summary, when the present application is used to segment the multi-material uneven strength image, the complex structure image, and the image with weak edges and artifacts, the present application shows good convergence performance and segmentation accuracy, and meets the demand of high-precision measurement.
[0160] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.
[0161] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks. Figure 1 one or more flow or blocks.
[0162] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks. Figure 1 one or more flow or blocks.
[0163] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks. Figure 1 one or more flow or blocks.
[0164] Finally, it should be noted that the above-mentioned embodiments are merely used to illustrate the technical solutions of the present application, rather than limit the technical solutions of the present application. Although the present application is described in detail with reference to the above embodiments, those skilled in the art should understand that the specific embodiments of the present application can be modified or replaced, and any modification or replacement without departing from the spirit and scope of the present application should be covered in the protection scope of the claims of the present application.
Claims
1.A CT image segmentation method based on NGA-RSF model, characterized in that, The specific steps are: 1) obtaining a CT image to be segmented, and pre-processing the CT image to be segmented; 2) constructing an RSF image segmentation model NGA-RSF combining natural gradient and AdamW algorithm, setting the objective function and initial parameters of the NGA-RSF model, wherein the initial parameters include iteration stop condition, AdamW parameter control condition, AdamW algorithm adaptive adjustment parameter and image segmentation model parameter; 3) inputting the pre-processed CT image into the NGA-RSF model, and iteratively updating the level set function; 4) when the iteration process of step 3) reaches the iteration stop condition, taking the zero level set of the level set function as the segmentation result; The objective function of the NGA-RSF model in Step 2) includes the objective function of the AdamW algorithm, which is the ratio of the L2-norm of the level set matrix before and after iteration : wherein is the level set matrix after the first iteration, is the level set matrix after the first iteration, is the level set matrix after the first iteration, is the level set matrix after the first iteration, The iteration stopping condition is: An upper limit of an absolute value of a difference between L2 norm ratio values of level set matrices before and after sub-iteration is less than a preset threshold value: wherein is the L2 norm ratio of the level set matrix after the th iteration, is the L2 norm ratio of the level set matrix after the th iteration, is a preset threshold of the iteration stop condition; The AdamW parameter control condition is that the iteration number is greater than the initial iteration number Or The upper limit of the absolute value of the difference between the L2 norm ratio of the level set matrix before and after the sub-iteration is greater than a preset threshold value: In the formula, is the AdamW parameter control threshold value, when the AdamW parameter control condition is met, the AdamW algorithm is used to adaptively control the RSF iteration step length, so as to reduce the number of convolution operations and improve the operation efficiency. the AdamW algorithm adaptively adjusts parameters including a learning rate , a current estimated exponential decay rate , a weight decay factor , an iteration coefficient , a first moment momentum , a second moment momentum , an initial time step , an iteration initial kernel parameter , a constant ; The image segmentation model parameters include a model regularization term coefficient , a model length term coefficient , an initial level set amplitude of a binary step function , a coefficient of an in-out contour energy fitting term and , a model time step , a model iteration number , a function and a parameter in a function , a RSF model Gaussian kernel function size , and an initial iteration number before parameter control ; The specific steps of iteratively updating the level set function in step 3) are: 3-1) inputting the pre-processed CT image into the regionally scalable fitting RSF model; 3-2) using natural gradient to optimize the parameter space of the RSF model, obtaining a descending flow equation meeting the iteration condition, and starting iteration; 3-3) determining whether the level set matrix after iteration meets the stop iteration condition, if yes, turning to step 4); if no, turning to step 3-4); 3-4) determining whether the level set matrix after iteration satisfies the AdamW parameter control condition, if yes, updating the scale of the Gaussian kernel function in the RSF model through the AdamW algorithm iteration , thereby optimizing the parameter space and parameter adaptive control of the RSF model, and returning to step 3-2) for the next iteration; if not, directly returning to step 3-2) for the next iteration; The specific method of using natural gradient to optimize the parameter space of the regionally scalable fitting RSF model in step 3-2) is: The natural gradient is based on the Riemann steepest descent method of Marcelo Pereyra, first using information geometry to obtain a statistical manifold related to active contour, and then solving the natural gradient on the statistical manifold: Using positive definite matrices Optimize the gradient using the inner product. directly in Find the gradient of the level set function in space, assuming the manifold space. It is by A parameterized statistical manifold, whose probability density function for: wherein is an exponential family probability density function, and are statistical parameters associated with the image foreground and background, respectively, and the points in the popular space represent the probability distribution of the random variable is given by , is composed of the foreground and the background. According to the general Riemann steepest descent method by Marcelo Pereyra, the computation of the energy minimization is the same as the computation of the maximum likelihood estimator of a given The Fisher information matrix with the Riemann metric tensor is used to measure the distance between and another point on the manifold M. The steepest descent gradient flow in the manifold space The upper energy is wherein characterizing energy natural gradient in the riemannian manifold space, denoted with respect to probability distribution change, is the time step. The regular term of the level set energy fitting function of the RSF model is brought into the steepest descent gradient flow to obtain the following level set iteration equation: Wherein: wherein, denotes the level set function of the th iteration, is the time step, is the Fisher information matrix, is the regularization function of the Dirac delta function, is the regularization function of the Heaviside function, are the coefficients of the in- and out-of-contour energy fitting terms, respectively, denotes the regularization term coefficient of the model, denotes the length term coefficient of the model, denotes the approximated fitting function of the image intensity on both sides of the contour. Through the above calculation, the descending flow equation meeting the iteration condition is obtained: The Gaussian kernel function for the RSF model is given by the expression: 。 2.The CT image segmentation method based on the NGA-RSF model of claim 1, wherein, Step 3 - Iteratively update the scale of the Gaussian kernel function in the RSF model by the AdamW algorithm in step 4 The specific method is: The AdamW optimization model is: In the above formula: wherein , are the estimated exponential decay rates, , denote the exponential decay rates to the power of , is the weight decay factor, is the iteration coefficient, is the learning rate, is the loss function under the parameter , , is the matrix momentum; The updated The Gaussian kernel function in the RSF model is updated and the next iteration is performed in step 3-2).