A deep learning medical image denoising method based on Gabor filtering
By using a deep learning method based on Gabor filtering, combined with the local enhancement window Transformer and Bayes Gabor architecture, the problem of high computational complexity in low-dose CT image denoising is solved, and efficient image restoration effects are achieved.
Patent Information
- Application Number
- CN202210580322.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-26
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2042-05-26
AI Technical Summary
Existing image denoising algorithms have high computational complexity when processing low-dose CT images, making it difficult to effectively restore local details and global structures. Traditional CNNs and Transformers also have shortcomings in performance and computational cost.
A deep learning method based on Gabor filtering is adopted, combined with the local enhancement window Transformer and Bayes Gabor architecture, and the network model is trained through a hybrid loss function to reduce the amount of calculation and improve the denoising ability.
It effectively restores the high- and low-frequency information of low-dose CT images, improves image clarity and local detail recovery capabilities, reduces computational costs, and avoids overfitting.
Smart Images

Figure CN115546044B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image denoising and is a deep learning medical image denoising method based on Gabor filtering. Background Art
[0002] In order to ensure the integrity of information, the effect of image preprocessing is very important, which directly affects the effect of subsequent high-level image processing, such as image classification, segmentation and target recognition. Traditional image denoising can be divided into two categories: one is to calculate features in the spatial domain of the image, and the other is to calculate features indirectly in the transform domain. Among them, the algorithms used in the past few decades or still in use include the median filter method that takes the grayscale value of the target pixel and all adjacent pixel values into a window and takes the median value; the Gaussian filter method that performs weighted averaging on the entire image; the mean filter method that replaces all pixels in the window with the mean value; the Wiener filter method that minimizes the mean square error; the Fourier filter-based algorithm that processes image signals in the frequency domain; the BM3D algorithm (Dabov K, Foi A, Katkovnik V, et al. Image denoising by sparse 3-D transform-domain collaborative filtering [J]. IEEE Transactions on image processing, 2007, 16 (8): 2080-2095.) that combines the spatial domain and transform domain. To date, the most effective traditional algorithms are those that combine two domains, such as BM3D. Compared to single-domain algorithms, these algorithms restore images with greater detail and less noise. However, they are difficult to implement in industrial practice due to their high complexity. Current computer computing power is insufficient to achieve the desired results within a few seconds, often requiring several minutes or even longer to process a single image.
[0003] Due to data limitations and the resulting low accuracy of traditional methods, data-efficient deep learning methods also hold great potential in this field. Studies have shown that simple convolutional neural networks can be used to suppress noise in LDCT images. Models proposed in existing papers have demonstrated the effectiveness of encoder-decoder networks for medical image denoising. U-Net utilizes an encoder-decoder architecture. Its advantages lie in the encoder's ability to extract high-level semantic representations through a cascade of convolutional layers, while the decoder utilizes skip-layer connections to reuse the encoder's high-resolution feature maps. This design allows the network to recover lost spatial information from the high-level representations. However, when processing morphologically complex medical images, such networks often struggle to handle local sensory ambiguity and the varying morphologies of various organs due to the inherent complexity and low structural similarity of the medical images themselves. This leads to the limitations of fully convolutional networks: their inability to simulate long-term contextual interactions and environmental dependencies. Other convolutional neural network-based algorithms that will also appear in the comparative experiments include REDCNN (Chen H, Zhang Y, Kalra M K, et al. Low-dose CT with a residual encoder-decoder convolutional neural network [J]. IEEE transactions on medical imaging, 2017, 36 (12): 2524-2535.) WGAN (Adler J, Lunz S. Banach wasserstein gan [J]. Advances in Neural Information Processing Systems, 2018, 31.), TEDNet (Wang D, Wu Z, Yu H. TED-net: Convolution-free T2T Vision Transformer-based Encoder-decoder Dilation network for Low-dose CT Denoising [C] / / International Workshop on Machine Learning in Medical Imaging. Springer, Cham, 2021: 416-425.), and RIDNet (Zhuo S, Jin Z, Zou W, et al.Ridnet:Recursive information distillation network for color image denoising[C] / / Proceedings of the IEEE / CVF International Conference on Computer VisionWorkshops.2019:0-0.),NBNet(Cheng S,Wang Y,Huang H,et al.Nbnet:Noise basislearning for image denoising with subspace projection[C] / / Proceedings of the IEEE / CVF International Conference on Computer Vision and Pattern Recognition.2021:4896-4906.), EDCNN (Liang T, Jin Y, Li Y, et al. Edcnn: Edge enhancement-based densely connected network with compound loss for low-dose ct denoising[C] / / 2020 15th IEEE International Conference on Signal Processing (ICSP). IEEE, 2020, 1: 193-198.), etc. The Transformer has achieved remarkable results in the past few years, starting with natural language processing and text embedding (NLP) tasks, demonstrating its remarkable ability to capture long-range relationships. In light of this, many researchers have attempted to apply Transformer-based architectures to the visual field, achieving encouraging results in tasks such as image classification, object detection, and semantic segmentation. However, Transformers still lag behind existing convolutional neural networks in terms of performance and computational cost. While many studies have successfully applied Transformers to visual tasks, such as the Uformer (Wang Z, Cun X, Bao J, et al. Uformer: A general u-shaped transformer for image restoration [J]. arXiv preprint arXiv:2106.03106, 2021.), their performance is less than ideal compared to traditional CNNs, which remain the dominant architecture for visual applications.
[0004] The Transformer still lags behind existing convolutional neural networks in terms of performance and computational cost. This is mainly due to the large amount of data and computing power required, and the lack of ability to grasp local information.
[0005] Low-dose CT image restoration is a difficult problem. For low-dose CT images, traditional CNNs have limitations in capturing long-term dependencies. Summary of the Invention
[0006] To address the above-mentioned issues, the present invention provides a deep learning medical image denoising method based on Gabor filtering. The technical solution of the present invention primarily includes the following three aspects: First, the Gabor filter is inferred using the variational method. It has excellent properties for extracting the local spatial and frequency information of the target, making it more suitable for denoising low-dose CT images. However, its disadvantage is also very obvious, namely, the high computational complexity. The model inferred using the variational method proposed in the present invention has fewer learnable weights, making it less prone to overfitting and requiring fewer computational operations. Second, because the traditional Transformer calculates global self-attention between all fragments, its computational complexity is quadratic to the input image scale, which is very computationally expensive for high-resolution images. The present invention reduces the computational complexity by calculating self-attention in a local window using the Lewin Transformer, and introduces Bayes Gabor to form a Transformer+CNN+Bayes Gabor architecture model: BGformer. The network has better learnable weights, is less prone to overfitting, requires fewer computational operations, and demonstrates strong deblurring capabilities in denoising tasks, as well as processing of local details and good potential in quantitative indicators; thirdly, since the high-level information (content and global structure) of medical images is as important as the underlying detail information, the hybrid TVloss is introduced to comprehensively consider aspects such as mean square error, multi-scale perception, and changes in adjacent pixels, and can restore high-dose CT images at the pixel level.
[0007] In order to achieve the above object, the present invention is specifically implemented by adopting the following technical solutions:
[0008] The present invention is a deep learning medical image denoising method based on Gabor filtering, comprising the following steps:
[0009] Step 1: Use the Pydicom library to extract image pixel data from the Dicom file to a NumPy array and normalize the image;
[0010] Step 2: Build a basic module including local enhancement window transformer and Bayes Gabor;
[0011] Step 3: Process the basic modules as encoders and decoders, and through residual learning, perform skip-layer links on each component to complete the construction of the BGFormer network model;
[0012] Step 4: Take the CT low-dose image as input, the corresponding high-dose image as the label, and train with the mixed total variation loss as the loss function to obtain the trained network model;
[0013] Step 5: Take the low-dose image with similar structure that needs to be reconstructed as input, and obtain the reconstructed clear image through the network output.
[0014] A further improvement of the present invention is that the normalization processing of the image in step 1 includes scaling the pixel data in the NumPy array from 0 to 1 and cropping the image to 128×128 pixels.
[0015] A further improvement of the present invention is that the local enhanced window transformer in step 2 includes a non-overlapping window-based multi-head self-attention and a local enhanced feedforward network, and the corresponding equation is as follows:
[0016] X l =WMSA(LN(X l-1 ))+X l-1
[0017] X l =LeFF(LN(X l '))+X l '
[0018] where X l ' and X l They are the outputs of the multi-head self-attention W-MSA module and the local enhanced feedforward network LeFF module, and LN represents layer normalization;
[0019] The self-attention of the k-th head is expressed as:
[0020] X={X 1 ,X 2 ,…,X N}, N = NW / M 2 ,
[0021]
[0022]
[0023] in Represents the query of the k-th head, the projection matrix of the key value, X kis the output of the kth head. The outputs of all heads are concatenated into the set {1, 2, ..., k}, and linearly projected to obtain the final result. The relative position encoding is applied to the attention module. The attention calculation is expressed as:
[0024]
[0025] Where B represents the relative position deviation.
[0026] A further improvement of the present invention is that in step 3, the Bayesian model is introduced into the Gabor filter when constructing the basic module, and the marginal likelihood is used to predict the output y of the new pixel x. The marginal likelihood is the distribution of the observation data D marginalized on the Gabor parameter θ:
[0027] p(y|x,D)=∫p(y|x,θ)p(θ|D)dθ
[0028] p(θ|D) is the true posterior distribution;
[0029] The loss function L(ω,D) is expressed as:
[0030]
[0031] q(θ|ω) is the variational distribution, N is the number of mini-batches, represents the i-th mini-batch D i The weight of the trade-off between the KL loss and the negative log-likelihood loss, p(θ) is the prior distribution, expressed as:
[0032]
[0033] where θ j is the jth Gabor parameter of the network, μ(θ j |0,σ k 2 ) is θ j The evaluation of the kth Gaussian component at . The standard deviation σ1 of the first component is larger than 1, and the tail is heavier than the normal distribution. The standard deviation σ2 of the second component is less than 1, which makes the prior tightly concentrated around zero;
[0034] The posterior sample of Gabor parameters can be calculated as:
[0035]
[0036] in Represents the dot product.
[0037] A further improvement of the present invention is that: the overall structure of the BGFormer network model in step 3 is a U-shaped hierarchical network with a jump connection between the encoder and the decoder. In each encoder and decoder stage, the convolutional feature map is passed through a local enhancement window Transfomer block. The encoder is two stages, specifically including two spliced LB2D components, each LB2D component includes a LeWin Transformer, a Bayes Gabor filter and a traditional convolutional layer. The decoder includes two stages, and each stage is spliced with the low-level features connected to the LB2D jump layer after the upsampling operation and then incorporated into the Bayes Gabor filter to extract high-level features and enter the LeWin Transformer for image restoration.
[0038] A further improvement of the present invention is that the loss function in step 4 is:
[0039] L final =λ mse L mse +λ msq L msq +λ TV L TV
[0040] in,
[0041]
[0042]
[0043]
[0044] Wherein, each term λ is a predefined parameter.
[0045] The beneficial effects of the present invention are:
[0046] (1) The U-shaped network architecture constructed by the present invention is very effective for the task of denoising low-dose CT images. It obtains the high- and low-frequency information of the image and integrates it through skip-layer connections.
[0047] (2) The present invention uses the variational method to infer Gabor filter parameters, which greatly improves the computing power of the model, so that the characteristics of Gabor can be more perfectly utilized in medical image denoising, and can restore CT images with clearer contours and richer local information.
[0048] (3) The present invention uses the feature extraction and recovery module of Transformer+CNN+Bayes Gabor, which enables the network to have better learnable weights, is less prone to overfitting, requires fewer computational operations, and has better ability to grasp details.
[0049] (4) The present invention uses a hybrid total variation loss, so that both high-level global information and low-level detail information can be learned by the network, overcoming the problem that the ordinary L1 loss function and the like in the field of image reconstruction will cause the image to not be correlated at the pixel level, resulting in blurred images. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is the overall framework diagram of the model of the present invention.
[0051] Figure 2 Schematic diagram of LeWin Transformer.
[0052] Figure 3 This is the effect diagram of replacing CNN with Gabor filtering on U-Net.
[0053] Figure 4 Detail comparison chart of various models after denoising.
[0054] Figure 5 This is an overall comparison chart of various models after denoising.
[0055] Figure 6 Schematic diagram of the encoding and decoding framework.
[0056] Figure 7 It is a schematic diagram of the CT image processing process. DETAILED DESCRIPTION
[0057] The present invention will be further described below with reference to the accompanying drawings.
[0058] like Figure 1 As shown, the present invention proposes a deep learning medical image denoising method based on Gabor filtering, which specifically includes the following steps:
[0059] Step 1: Normalize the CT image;
[0060] CT scans are all given in the DICOM (Digital Imaging and Communications in Medicine) file format. It is a standard format, and DICOM files consist of a header and image pixel intensity data. The header contains information about patient demographics, study parameters, etc., stored in separate "tags", and the image pixel intensity data contains the pixel data of the CT scan, which in the case contains the pixel data of an image of size 512×512. In the model, for training, the Pydicom library is used to extract the image pixel data from the Dicom file into a NumPy array. The pixel data in the NumPy array is then scaled from 0 to 1, and the image is cropped to 128×128 pixels to avoid heterogeneous generation of pixel data from different CT scans.
[0061] Step 2: Build a basic module including local enhancement window transformer and Bayes Gabor;
[0062] The traditional Transformer calculates global self-attention between all layers, resulting in a computational complexity that is quadratic of the input image scale, which is computationally expensive for high-resolution images. At the same time, although the Transformer can capture long-distance dependencies, it is relatively weak in capturing local contextual information. In order to solve the above two problems, the LeWin Transformer reduces the amount of computation by calculating self-attention in local windows, and captures local contextual information by introducing convolution. The local enhancement window contains two core designs. First, non-overlapping window-based multi-head self-attention, which is suitable for low-resolution feature maps and sufficient to learn long-term dependencies. Second, the local enhancement feedforward network, which integrates a convolution. The structure of the LeWin Transformer is shown in the attached figure. Figure 2 The corresponding equation is as follows:
[0063]
[0064] where X l ' and X l These are the outputs of the W-MSA module and the LeFF module, respectively. LN represents layer normalization. Below, we explain W-MSA and LeFF in detail.
[0065] Window-based Multi-head Self-Attention W-MSA:
[0066] Unlike the common Transformer, this invention uses global self-attention, but performs self-attention in non-overlapping local windows, which greatly reduces the computational cost. Considering the two-dimensional feature map X∈R C×H×W , where H and W represent height and width, the present invention divides X into non-overlapping windows of size M×M. Then a flattened and inverted feature map is obtained from each window Next, a self-attention mechanism is performed on each flattened and extended feature.
[0067] Assume the number of heads is k and the size of the head is d k = C / k. Then the self-attention of the k-th head in the non-overlapping window can be expressed as:
[0068]
[0069] in They represent the query and key projection matrices of the k-th head respectively. k is the output of the kth head, and then the outputs of all heads are concatenated into the set {1,2,…,k}, and they are linearly projected to get the final result. Relative position encoding is also applied to the attention module, so the attention calculation can be expressed as:
[0070]
[0071] Where B represents the relative position deviation, which can be found in B∈R (2M-1)(2M-1) Compared with global self-attention, window-based self-attention can significantly reduce the amount of computation. Since BGFormer has a layered architecture, the window-based self-attention of the present invention can work on a larger receptive field under low-resolution feature maps, which is sufficient to learn long-term dependencies.
[0072] Local Enhanced Feedforward Network LeFF:
[0073] The feedforward network (FFN) in traditional Transformers has limited ability to utilize local context. In fact, neighboring pixels are important reference points for image restoration. To overcome this problem, the present invention adds a deep convolution block to the FFN in the Transformer-based structure. First, a linear projection layer is applied to each tag to increase its feature dimension. Next, it is reshaped into a 2D feature map and a 3×3 depthwise convolution is used to capture local information. The features are then restored and the channels are reduced by another linear layer to match the size of the input channels.
[0074] Visual Transformers (Vit) have been successfully applied to image recognition tasks due to their ability to capture long-term dependencies in images. However, Transformers still lag behind existing convolutional neural networks in terms of performance and computational cost. Although many achievements have successfully applied Transformers to visual tasks, their results are not ideal compared to traditional CNNs, and CNNs are still the main architecture for visual applications. Studies have shown that the Transformer+CNN architecture is better than single convolution or single Transformer, and that Gabor filtering performs better than traditional CNNs in denoising tasks. Compared with standard CNNs, the Gabor method has better learnable weights, so it is less prone to overfitting and requires fewer computational operations. This paper proposes a new variational inference model based on Gabor filtering, thereby constructing a Bayes Gabor+Transformer module.
[0075] In Gabor filtering, let d x , d y The standard deviation of the elliptical Gaussian envelope is used to control the spatial scale of the Gabor filter. The phase shift determines how much the sinusoidal component needs to be translated from the origin. The complex Gabor filter plane where the real and imaginary components represent orthogonal directions is defined as:
[0076]
[0077] where d = d y , r=d x / d y is the spatial aspect ratio, reflecting the ellipticity of the envelope, x = xcosα + ysinα, y = -xsinα + ycosα represents the transformed coordinates, where α represents the normal direction of the parallel stripes. represents the center frequency, u and v are the spatial frequencies of the sine factor. In practical applications, the receiving domain is not directly specified by the value of d, but is determined by the half-response spatial frequency bandwidth b:
[0078]
[0079] l represents the wavelength related to the spatial frequency of the sinusoidal component. The spatial frequency bandwidth determines the cutoff value of the filter frequency response when the frequency is far away from the center frequency u0 (i.e. 1 / l).
[0080] By introducing the Bayesian model into the Gabor filter, the Gabor neural network can be regarded as a probabilistic model that uses the Gabor parameters θ as parameters. According to the Bayesian inference method of pixel-level classification, the marginal likelihood can be used to predict the output y of the new pixel x. The marginal likelihood is the distribution of the observed data D marginalized on the Gabor parameters θ:
[0081] p(y|x,D)=∫p(y|x,θ)p(θ|D)dθ (1.6)
[0082] But the predictive distribution (1.6) is intractable for Gabor networks of any practical size, because the computation is equivalent to a high-dimensional integral over the set of possible Gabor parameters. Furthermore, the true posterior distribution p(θ|D) cannot be computed analytically. To overcome this problem, the present invention approximates the posterior distribution with a computationally tractable function, called the variational distribution q(θ|ω), where ω represents the mean and standard deviation of the Gaussian distribution. In other words, the present invention parameterizes the neural network with the probability distribution of the Gabor parameters, rather than with the point estimates of the Gabor parameters θ. This can be achieved by minimizing the loss function L(ω,D). L is the Kullback-Leibler (KL) divergence between p(θ|D) and q(θ|ω):
[0083]
[0084] The loss function L(ω, D) described in equation (1.7) is also called the variational free energy. It consists of three parts. The first two parts represent the KL loss between q(θ|ω) and p(θ), and the last data-dependent term represents the negative log-likelihood loss. Since the loss function contains the expectation of q(θ|ω) for the variational distribution, it can be evaluated using Monte Carlo sampling. Therefore, the loss function can be processed as follows:
[0085]
[0086] Where n is the number of samples, θ i is q(θ i |ω) is the i-th sample. Since the present invention uses mini-batch optimization, the loss can be summed by random partitioning of the mini-batch. For each mini-batch, sample once from the variational distribution and then redefine the KL loss. The exact loss form is expressed as follows:
[0087]
[0088] Where N is the number of mini-batches, represents the i-th mini-batch D iThe weight of the trade-off between KL loss and negative log-likelihood loss. In this way, KL loss will significantly affect the first few mini-batches, and negative log-likelihood loss will significantly affect the last few mini-batches.
[0089] The prior distribution p(θ) in formula (1.9) can be calculated by mixing two zero-mean Gaussian densities in proportion. The prior calculation of Gabor parameters is:
[0090]
[0091] where θ j is the jth Gabor parameter of the network, μ(θ j |0,σ k 2 ) is θ j Evaluation of the kth Gaussian component at . The standard deviation σ1 of the first component is larger than 1, and the tail is heavier than the normal distribution. The standard deviation σ2 of the second component is less than 1, which makes the prior tightly concentrated around zero. The present invention uses a weight of 0.5 to balance the two Gaussian components. BGFormer can be regarded as a non-deterministic mapping function. Its training is to directly learn the parameters q(θ|ω) of the variational distribution instead of the Gabor parameters. During the forward pass, Gabor parameters are sampled from the variational distribution to evaluate the loss function. Please note that the data-independent KL loss in formula (1.9) is evaluated hierarchically, while the data-dependent log-likelihood loss is calculated at the end of the forward pass. During the backward pass, the gradient relative to the variational parameters ω (i.e., μ and σ) is calculated by the backpropagation algorithm and then updated by the optimizer. In order to reduce the variance of the gradient caused by the random sampling steps in the forward channel, the present invention utilizes the local reparameterization technique. Instead of sampling directly from the variational distribution, the present invention samples s from a parameter-free distribution μ(0,I), and then shifts the mean μ and the scale standard deviation σ. In practice, a learnable parameter p is directly used to represent σ instead of σ to represent the network, and then p is transformed using a soft-add function to obtain σ = log(1 + exp(p)). This ensures that the standard deviation of the variational distribution is always non-negative during training. In general, the posterior sample of the Gabor parameters can be calculated as:
[0092]
[0093] in Represents the dot product.
[0094] Step 3: Process the basic modules as encoders and decoders, and through residual learning, perform skip-layer links on each component to complete the construction of the BGFormer network model;
[0095] The overall architecture of the BGFomer is a U-shaped hierarchical network with skip connections between the encoder and decoder. In each encoder (LB2D) and decoder (LB2U) stage, the convolutional feature map is passed through a locally enhanced window (LeWin) Transformer block, which is integrated with a non-overlapping window-based multi-head self-attention and a locally enhanced feedforward network. The encoder is composed of a splicing of LB2D components, each of which consists of a LeWin Transformer, a Bayesian Gabor filter, and a traditional convolutional layer. Inspired by the UFormer, the locally enhanced window has strong applicability to the medical image research studied in this paper. Unlike the global self-attention mechanism, the locally enhanced window divides the window parts and then applies non-overlapping self-attention to each window, thereby expanding the receptive field when extracting low-level features. Compared to the global self-attention mechanism, it significantly reduces the computational effort and improves the computational efficiency for high-resolution images. In order to improve the influence of adjacent pixels on the target pixel, the feedforward network (FFN) of LeWin Transformer is introduced. First, each token is linearly projected to increase its dimension, and then enters a 3×3 deep convolution block to capture local information, and then linear projection is used to restore its dimension. The Bayes Gabor filter enhances its ability to maintain texture structure. The feature map that has passed the filter is connected to the LB2U module corresponding to the multi-scale feature fusion layer using a skip layer, so that the low-level information in the decoding stage can be better used when reconstructing features. Another feature map continues to enter downsampling. In order to minimize the loss of details, the present invention chooses a larger-scale convolution instead of an ordinary pooling operation. To be precise, the present invention uses a 3×3 convolution with a step size of 2 and a padding of 1. The decoding stage can be regarded as an operation completely opposite to the encoding stage. Like the encoder, it also includes two stages. Each stage has an upsampling operation. Afterwards, the low-level features connected to the LB2D jump layer are spliced and incorporated into the BayesGabor filter to extract high-level features, and then enter the LeWin Transformer again for image restoration. It is worth mentioning that the upsampling operation also does not select the pooling layer, but uses a 3×3 transposed convolution with a step size of 2. Each time such an operation is performed, the number of channels is reduced by half and the feature map is doubled. After these two stages, the flattened token will be reconstructed into a 2D feature map. At the output, the present invention uses a 3×3 depth convolution to extract the residual image, and the final clear image is obtained through restoration.
[0096] Step 4: Take the CT low-dose image as input, the corresponding high-dose image as the label, and train with the mixed total variation loss as the loss function to obtain the trained network model;
[0097] The present invention uses multiple loss functions to achieve the best experimental results. First, the mean square error is used to calculate the pixel distance between the output and the ground truth image, which is defined as follows:
[0098]
[0099] However, it often produces unwanted effects such as over-smoothing and image blur. To overcome this problem, the present invention adopts two methods, Multi-Scale Perception (MSP) based on ResNet. MSP can be described by the following formula:
[0100]
[0101] In order to reduce the variation of adjacent pixels in the denoised image due to noise, the present invention also introduces TotalVariation Loss. In the continuous domain, for a one-dimensional function, TVloss calculates the integral of the difference between adjacent values, thereby obtaining a smoother output. Formally, it is defined in the interval The variation of a differentiable function f on is defined as If f' is Riemann integrable. For a one-dimensional discrete signal y=[Y1,…,y N ] can be defined as
[0102] Since the present invention processes 2D images, TV loss can be summarized as:
[0103]
[0104] In addition to processing the overall structural information, this also processes the pixel-by-pixel similarity. The final target loss function is:
[0105] L final =λ mse L mse +λ msq L msq +λ TV L TV (1.15)
[0106] Among them, λ mse ,λ msq ,λ TV are predefined parameters, set to 0.5, 0.4, and 0.1 respectively. Step 5: Take the low-dose image with similar structure to be reconstructed as input, and get the reconstructed clear image through the network output:
[0107] This example uses the Pytorch library in a Python environment on a GeForce GTX 2080 Ti processor. Following the common Transformer training strategy, the framework was trained using the Adam optimizer, with a momentum term of (0.9, 0.999) and a weight decay of 0.02. Randomly added training samples were horizontally flipped and rotated 90°, 180°, or 270°. The learning rate was reduced to 1e-6 using a cosine decay strategy, with an initial learning rate of 2e-4. In the experiments, the depth of the LeWin block and the number of codec levels were both set to 2.
[0108] In order to verify the effectiveness of the present invention, different mainstream denoising methods are used for testing on the same dataset. The comparative experimental models are: NLM, BM3D, RIDNet, VDN (Yue Z, Yong H, Zhao Q, et al. Variational denoising network: Toward blind noise modeling and removal [J]. Advances in neural information processing systems, 2019, 32.), NBNet, EDCnn, REDCnn, TEDNet, WGAN, Ufromer are compared in terms of peak signal-to-noise ratio, root mean square error, and structural similarity indicators. The experimental results are as follows: Figure 3-5 , as shown in Table 1-2, where
[0109] Table 1 Comparison of Gabor filter replacement CNN indicators
[0110]
[0111] Table 2 is a comparison of the indicators of the present invention and various existing models
[0112]
[0113] Table 1 shows that the method of the present invention has a short runtime and higher structural similarity and peak signal-to-noise ratio than other denoising methods. Table 2 shows that the root mean square error (RMSE) of the method of the present invention is relatively small. This demonstrates that the method of the present invention is highly effective in denoising CT images.
[0114] The above is a detailed description of the embodiments of the present invention in conjunction with the accompanying drawings, but the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by ordinary technicians in this field, any conceivable changes or replacements should be included in the scope of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A deep learning medical image denoising method based on Gabor filtering, characterized by: The steps include: Step 1: Use the Pydicom library to extract CT image pixel data from the Dicom file into a NumPy array and normalize the image; Step 2: Build a basic module including local enhancement window transformer and Bayes Gabor; Step 3: Process the basic module as an encoder and decoder, and through residual learning, perform skip-layer links on each encoder and decoder to complete the construction of the BGFormer network model. The overall structure of the BGFormer network model is a U-shaped hierarchical network with skip connections between the encoder and decoder. In each encoder and decoder stage, the convolutional feature map is passed through a local enhancement window Transfomer block. The encoder is a two-stage network, specifically including two spliced LB2D components. Each LB2D component includes a LeWin Transformer, a Bayes Gabor filter, and a traditional convolutional layer. The decoder contains two stages. After the upsampling operation, the low-level features connected to the LB2D skip layer are spliced and incorporated into the Bayes Gabor filter to extract high-level features and enter the LeWin Transformer for image restoration. Step 4: Take the CT low-dose image as input, the corresponding high-dose image as the label, and the mixed total variation loss as the loss function to train the BGFormer network model to obtain the trained network model; Step 5: Take the low-dose image with similar structure that needs to be reconstructed as input, and obtain the reconstructed clear image through the network output.
2. The deep learning medical image denoising method based on Gabor filtering according to claim 1, characterized in that: Normalizing the image in step 1 involves scaling the pixel data in the NumPy array from 0 to 1 and cropping the image to 128×128 pixels.
3. The deep learning medical image denoising method based on Gabor filtering according to claim 1, characterized in that: The local enhanced window transformer in step 2 includes non-overlapping window-based multi-head self-attention and local enhanced feedforward networks, and the corresponding equations are as follows: X l '=WMSA(LN(X l-1 ))+X l-1 X l =LeFF(LN(X l '))+X l ' where X l ' and X l They are the outputs of the multi-head self-attention W-MSA module and the local enhanced feedforward network LeFF module, and LN represents layer normalization; The self-attention of the k-th head is expressed as: X={X 1 ,X 2 ,…,X N },N=NW / M 2 , in Denotes the projection matrix of query, key, and value of the k-th head, X k is the output of the kth head. The outputs of all heads are concatenated into the set {1, 2, ..., k}, and linearly projected to obtain the final result. The relative position encoding is applied to the attention module. The attention calculation is expressed as: Where B represents the relative position deviation.
4. The deep learning medical image denoising method based on Gabor filtering according to claim 1, characterized in that: In step 3, the Bayesian model is introduced into the Gabor filter when building the basic module, and the marginal likelihood is used to predict the output y of the new pixel x. The marginal likelihood is the distribution of the observation data D marginalized on the Gabor parameter θ: p(y|x,D)=∫p(y|x,θ)p(θ|D)dθ p(θ|D) is the true posterior distribution; The loss function L(ω,D) is expressed as: q(θ|ω) is the variational distribution, N is the number of mini-batches, represents the i-th mini-batch D i The weight of the trade-off between the KL loss and the negative log-likelihood loss, p(θ) is the prior distribution, expressed as: where θ j is the jth Gabor parameter of the network, μ(θ j |0,σ k 2 ) is θ j The evaluation of the kth Gaussian component at ; the standard deviation σ1 of the first component is larger than 1, and the tail is heavier than the normal distribution; while the standard deviation σ2 of the second component is less than 1, which makes the prior tightly concentrated around zero; The posterior sample of Gabor parameters is calculated as: in Represents the dot product.
5. The deep learning medical image denoising method based on Gabor filtering according to claim 4, characterized in that: The loss function in step 4 is: L final =λ mse L mse +λ msq L msq +λ TV L TV in, Wherein, each term λ is a predefined parameter.
Citation Information
Patent Citations
Generative adversarial low-dose CT denoising method based on double-domain U-net discriminator
CN113538257A
CNN medical CT image denoising method based on double attention and multi-scale features
CN114219719A