Pulmonary nodule image detection method and system based on neural network with attention mechanism
By fusing 3D residual convolution and attention mechanisms in neural networks, the advanced features are extracted, and the problems of low detection accuracy and high false positive rates in lung cancer screening in the prior art are solved, and more efficient lung nodules are achieved Detection and classification.
Patent Information
- Application Number
- CN202111049299.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-08
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2041-09-08
AI Technical Summary
The prior art has low detection accuracy and high false positive rate in early screening of lung cancer, making it difficult to effectively screen lung nodules in CT images through manual reading, resulting in increased doctors' fatigue and misjudgment probability.
Adopting a neural network based on attention mechanism, combining the 3D residual convolution module and attention mechanism, high-level abstract features are extracted for identification and classification, reducing false positive rates, and improving detection accuracy.
It improves the accuracy and automation of lung nodules detection, effectively distinguishes between real nodules and non-nodules, reduces the false positive rate, and is suitable for early lung cancer screening.
Smart Images

Figure CN113902676B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of medical image detection, and in particular relates to a method and system for detecting lung nodules based on a neural network with an attention mechanism. Background Art
[0002] The statements in this section merely provide background information related to the present disclosure and do not necessarily constitute prior art.
[0003] Most patients with early lung cancer have no obvious clinical symptoms and no specific biomarkers, so the main method of early screening is to use radiological imaging to check whether there are suspicious lesions in the lungs. Early lung cancer mostly manifests as lung nodules, which are small in size, low in contrast, and highly heterogeneous in shape. The workload of manual reading is huge. Each subject has at least 100 chest CT images, and fine-level scans can even have as many as 600 images, which can easily cause doctor fatigue and increase the probability of misjudgment and missed judgment. Obviously, it is extremely difficult to rely solely on doctors to manually screen lung nodules in CT images.
[0004] In recent years, the emergence of large datasets and the rise of deep convolutional neural networks have made breakthrough progress in a series of visual tasks. Researchers have further borrowed the attention thinking mode in human vision and proposed the attention mechanism. Computer vision methods based on trainable attention mechanisms can effectively and autonomously focus on the areas of interest of the task, suppress irrelevant areas, and further improve the performance of the model, which has gradually become a hot research issue.
[0005] Existing technologies have the characteristics of low detection accuracy and high false positive rate, making them difficult to be used in actual clinical testing. Summary of the invention
[0006] In order to solve the above problems, the present invention proposes a lung nodule image detection method and system based on a neural network with an attention mechanism, which integrates a trainable 3D attention mechanism module into the neural network, effectively extracts high-level abstract features of the data, and directly uses them for recognition, classification and detection. It has a high degree of automation and can effectively distinguish between real nodules and non-nodules, and has achieved good results in improving the detection rate and reducing the false positive rate.
[0007] According to some embodiments, the first solution of the present disclosure provides a method for detecting lung nodules in an image based on a neural network with an attention mechanism, which adopts the following technical solutions:
[0008] A method for detecting lung nodules in an image based on a neural network with an attention mechanism, comprising the following steps:
[0009] Acquire images of lung nodules;
[0010] According to the acquired images and the preset neural network detection model, the classification results of lung nodules are obtained;
[0011] Among them, the neural network detection model adopts attention mechanism and 3D residual neural network.
[0012] As a further technical limitation, the acquired lung nodule image is a preprocessed lung CT image, and the preprocessing includes image enhancement and image parenchyma segmentation.
[0013] Furthermore, the image enhancement includes image texture enhancement and image denoising; wherein, the image texture enhancement uses histogram equalization to make the texture of the lung CT image clearer, and the image denoising uses a median filter to remove noise in the lung CT image.
[0014] Furthermore, the neural network detection model consists of a 3D residual convolution module and an attention mechanism module; the preprocessed lung CT image passes through the 3D residual convolution module and then enters the attention module channel, and image compression is performed under the action of the average pooling layer and the maximum pooling layer to generate average pooling features and maximum pooling features, and the feature fusion based on the shared weight layer generates the final attention channel.
[0015] Furthermore, the 3D residual convolution module uses two 1*1*1 convolution kernels and one 3*3*3 convolution kernel.
[0016] As a further technical limitation, the neural network detection model uses a stochastic gradient descent algorithm to train the model.
[0017] As a further technical limitation, the loss function of the neural network detection model includes classification loss and regression loss.
[0018] According to some embodiments, the second solution of the present disclosure provides a pulmonary nodule image detection system based on a neural network with an attention mechanism, which adopts the following technical solutions:
[0019] A pulmonary nodule image detection system based on a neural network with an attention mechanism, comprising:
[0020] An acquisition module, used for acquiring lung nodule images;
[0021] A detection module, used to obtain a classification result of lung nodules based on the acquired image and a preset neural network detection model;
[0022] Among them, the neural network detection model adopts attention mechanism and 3D residual neural network.
[0023] According to some embodiments, a third solution of the present disclosure provides a computer-readable storage medium, which adopts the following technical solution:
[0024] A computer-readable storage medium stores a program thereon, which, when executed by a processor, implements the steps in the lung nodule image detection method based on a neural network with an attention mechanism as described in the first aspect of the present disclosure.
[0025] According to some embodiments, a fourth solution of the present disclosure provides an electronic device, which adopts the following technical solution:
[0026] An electronic device comprises a memory, a processor and a program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in the method for detecting lung nodules in an image based on a neural network using an attention mechanism as described in the first aspect of the present disclosure are implemented.
[0027] Compared with the prior art, the present invention has the following beneficial effects:
[0028] The present invention integrates a trainable 3D attention mechanism module into a neural network, effectively extracts high-level abstract features of the data, and directly uses them for recognition, classification, and detection. It has a high degree of automation and can effectively distinguish between real nodules and non-nodules, thereby improving detection accuracy. It can detect both large-scale and small-scale lung nodules, and has achieved good results in improving detection rate and reducing false positive rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The accompanying drawings constituting a part of the present disclosure are used to provide a further understanding of the present disclosure. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure.
[0030] Figure 1 is a flow chart of a method for detecting lung nodules in an image using a neural network based on an attention mechanism in Embodiment 1 of the present disclosure;
[0031] Figure 2 is a structural diagram of a pulmonary nodule neural network detection model in the first embodiment of the present disclosure;
[0032] Figure 3 is a structural diagram of the attention mechanism in the first embodiment of the present disclosure;
[0033] Figure 4 is a structural diagram of a 3D residual neural network in Embodiment 1 of the present disclosure;
[0034] Figure 5 It is a structural block diagram of the lung nodule image detection system based on the neural network of the attention mechanism in the second embodiment of the present disclosure. DETAILED DESCRIPTION
[0035] The present disclosure is further described below in conjunction with the accompanying drawings and embodiments.
[0036] It should be noted that the following detailed descriptions are all illustrative and are intended to provide further explanation of the present disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present disclosure belongs.
[0037] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present disclosure. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0038] In the absence of conflict, the embodiments in the present disclosure and the features in the embodiments may be combined with each other.
[0039] Embodiment 1
[0040] Embodiment 1 of the present disclosure introduces a method for detecting lung nodules in images using a neural network based on an attention mechanism.
[0041] like Figure 1 The method for detecting lung nodules in an image based on a neural network with an attention mechanism includes the following steps:
[0042] Data preprocessing: selecting candidate lung nodules from the original scan data set;
[0043] Centered on the lung nodule area, we intercepted a 128*128 image as the input data of the positive sample, divided the data set, and performed data augmentation on the positive sample data set;
[0044] Build a neural network detection model based on the attention mechanism, perform model training and parameter adjustment;
[0045] The trained neural network detection model is tested on the test set and evaluated according to the evaluation indicators to obtain the classification results of lung nodules.
[0046] Specifically, the purpose of data preprocessing is to extract the lung area and remove the noise around the lungs, including:
[0047] (a) This embodiment uses the LIDC dataset. First, threshold segmentation is performed. The CT value is set to 480 HU as the segmentation value for the CT image to obtain a binary image. The value obtained after CT acquisition is the X-ray attenuation value, which is in Hounsfield units. The HU value of water is 0, the HU value of air is -1000, and the HU value of other objects is calculated as follows:
[0048]
[0049] Among them, μ is the linear attenuation coefficient, which is related to the X-ray intensity.
[0050] Here, Hounsfield unit (HU) is a dimensionless unit commonly used in computed tomography (CT) for standard and convenient expression of CT values. Hounsfield unit is obtained by linear transformation of the measured attenuation coefficient; this conversion is based on the density of air and water, where pure water is defined as 0 Hounsfield unit and air is defined as -1000 Hounsfield unit. The denser the tissue, the stronger the x-ray absorption, the positive value, and the bright signal; the lower the density of the tissue, the less x-ray absorption, showing negative values, and dark signals.
[0051] (b) Image enhancement: Histogram equalization method is used to make the image texture clearer, and median filtering method is used to remove noise from lung CT images.
[0052] (c) Lung segmentation: Segment the lung contour of the data; the purpose is to focus only on the image of the lung tissue and eliminate the noise caused by irrelevant parts.
[0053] The rough feature mapping of lung nodules will reduce the accuracy of detection, so it is necessary to add an attention mechanism. The so-called attention mechanism is to allocate computing resources to more important tasks when computing power is limited. It is similar to the human visual attention mechanism. By scanning the global image, the target area that needs attention is obtained, and more attention resources are invested in this area to obtain more information about the target, while ignoring other irrelevant information, thereby improving the efficiency and accuracy of visual information processing. In this embodiment, a trainable 3D attention mechanism gate module is integrated into the network; the network structure adds an attention mechanism to more effectively extract high-level abstract features of the data, and the output features can be directly used for recognition, classification and detection. It not only has a high degree of automation, but also can more effectively distinguish between real nodules and non-nodules, and has achieved better results in improving the detection rate and reducing the false positive rate.
[0054] The process of the neural network detection model based on the attention mechanism specifically includes:
[0055] (1) Figure 2 The pulmonary nodule neural network detection model shown in Figure 1 incorporates the encoder-decoder concept of UNet++ into feature detection. The front-end downsampling part of the network consists of five 3D residual convolution blocks and an attention mechanism module (such as Figure 3 The preprocessed image first passes through a convolution block and then enters the channel attention module. The input feature map is compressed through the average pooling layer and the maximum pooling layer to generate the average pooled feature X avg and the maximum pooled feature Xmax , and then X avg and X max Input to a shared weight layer composed of 2 DenseLayers. The features output by the shared weight layer are fused and then activated by the sigmoid function to generate the final channel attention M c ∈R nchannels .
[0056] To summarize, the overall formula for channel attention is:
[0057] M c =σ(FC(Max_pool(X))+FC(Avg_pool(X))) (2)
[0058] Among them, σ is the sigmoid function, which is defined as follows;
[0059]
[0060] Spatial attention can be regarded as a supplement to channel attention. After obtaining channel attention, the channel attention and the input feature map are fused as the input feature of the spatial attention module. The input of the spatial attention module XC can be described by the following formula:
[0061]
[0062] in, In order to make full use of channel information, a three-dimensional feature map X is generated through global average pooling and maximum pooling operations. avg and X max ; Then they are fused and passed through a standard convolutional layer to generate a three-dimensional spatial attention, called M s The spatial attention is calculated as:
[0063] M c =σ(FC(Max_pool(X))+FC(Avg_pool(X))) (5)
[0064] The output of the entire attention module is obtained by fusing MC and MS, which can be expressed by the following formula:
[0065]
[0066] After coming out of the attention module, it enters other convolution blocks. Each convolution block operation is followed by a maximum pooling layer. The pooling layer halves the scale of the image feature map, performs pooling and cropping operations on the output of the previous layer, and connects the pooling and cropping operations on the channel as the input of the next layer; through pooling, image downsampling operations are achieved, features are extracted, and subsequent convolution operation parameters are reduced. The deconvolution lifting part of the convolutional neural network consists of 3 convolution blocks and a region proposal network output layer.
[0067] (2) The 3D residual network structure used in this embodiment is as follows Figure 4 As shown in the figure, the convolution block is composed of a 3D version of the residual network block (two 1*1*1 convolution kernels, one 3*3*3 convolution kernel, each convolution kernel is followed by an activation function and normalization), which reduces the parameter calculation amount by nearly half compared to two 3*3*3 convolution kernels.
[0068] The training and testing process of the neural network detection model based on the attention mechanism is as follows:
[0069] (a) The network model training is performed using the stochastic gradient descent algorithm. In the test phase, this embodiment uses a 10-fold cross validation method. In order to better demonstrate the effectiveness of adding the attention module, an ablation experiment was performed in this embodiment. As shown in Table 1, the first row does not add any module, the second row adds the multi-scale module, and the third row adds the attention module. It can be seen that the detection effect is better after adding the attention module.
[0070] Table 1 Ablation experiment
[0071]
[0072] (b) Loss function
[0073] The loss function is divided into two parts, classification loss and regression loss. The multi-task loss function for anchor box i is defined as:
[0074] L(p i ,t i )=λLcls(p i ,p i *)+p i Lreg(t i ,t i *) (7)
[0075] Among them, p i is the probability that the current anchor box i is predicted as a nodule, and λ is p i The weight of , and λ is taken as 0.5.
[0076] For L clsConsidering the use of sigmoid as the activation function, in this embodiment, the binary cross entropy loss function is selected. Its definition is as follows:
[0077] L cls =-[y i ·log(p i )+(1-y i )·log(1-p i )] (8)
[0078] In the formula, y i is the true value label of the anchor, followed by the regression loss function. It is defined as follows:
[0079] L reg (t i ,t i *)=H(t i -t i *) (9)
[0080] Where, t i is the relative coordinate of the corresponding nodule, t i * is the coordinate of the marked nodule, defined as:
[0081]
[0082] Among them, (x, y, z, d) are the coordinates and diameter of the nodule in the predicted original space, (x a ,y a ,z a ,d) are the coordinates and size of anchor box i.
[0083] For H, considering that the L2 loss function will square the error, the model will be more sensitive to a single sample, and the L1 norm loss function does not have a derivative at 0, which may affect convergence. In this embodiment, the smooth L1 loss function is selected. The specific formula is as follows:
[0084]
[0085] This embodiment integrates the trainable 3D attention mechanism module into the neural network, effectively extracts high-level abstract features of the data, and directly uses them for recognition, classification, and detection. It has a high degree of automation and can effectively distinguish between real nodules and non-nodules, achieving good results in improving the detection rate and reducing the false positive rate.
[0086] Embodiment 2
[0087] Embodiment 2 of the present disclosure introduces a pulmonary nodule image detection system based on a neural network with an attention mechanism, which adopts the pulmonary nodule image detection method based on a neural network with an attention mechanism introduced in Embodiment 1.
[0088] like Figure 5 A pulmonary nodule image detection system based on a neural network with an attention mechanism is shown, comprising:
[0089] An acquisition module, used for acquiring lung nodule images;
[0090] A detection module, used to obtain a classification result of lung nodules based on the acquired image and a preset neural network detection model;
[0091] Among them, the neural network detection model adopts attention mechanism and 3D residual neural network.
[0092] The detailed steps are the same as those of the lung nodule image detection method based on the neural network of the attention mechanism provided in Example 1, and will not be repeated here.
[0093] Embodiment 3
[0094] A third embodiment of the present disclosure provides a computer-readable storage medium.
[0095] A computer-readable storage medium stores a program thereon, which, when executed by a processor, implements the steps in the lung nodule image detection method based on a neural network with an attention mechanism as described in Embodiment 1 of the present disclosure.
[0096] The detailed steps are the same as those of the lung nodule image detection method based on the neural network of the attention mechanism provided in Example 1, and will not be repeated here.
[0097] Embodiment 4
[0098] A fourth embodiment of the present disclosure provides an electronic device.
[0099] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, the steps in the method for detecting lung nodules in an image using a neural network based on an attention mechanism as described in Embodiment 1 of the present disclosure are implemented.
[0100] The detailed steps are the same as those of the lung nodule image detection method based on the neural network of the attention mechanism provided in Example 1, and will not be repeated here.
[0101] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A pulmonary nodule image detection method based on a neural network with an attention mechanism, characterized in that: The following steps are involved: Acquire images of lung nodules; According to the acquired images and the preset neural network detection model, the classification results of lung nodules are obtained; Wherein, the neural network detection model adopts attention mechanism and 3D residual neural network; The neural network detection model consists of a 3D residual convolution module and an attention mechanism module; the preprocessed lung CT image passes through the 3D residual convolution module and enters the attention module channel, and the image is compressed under the action of the average pooling layer and the maximum pooling layer to generate the average pooling feature and the maximum pooling feature, and the feature fusion based on the shared weight layer generates the final attention channel; The 3D residual convolution module uses two 1*1*1 convolution kernels and one 3*3*3 convolution kernel; The front downsampling part of the neural network detection model consists of five 3D residual convolution blocks and an attention mechanism module; the deconvolution lifting part of the convolutional neural network consists of 3 convolution blocks and a region proposal network output layer.
2. The method for detecting lung nodules based on a neural network with an attention mechanism as claimed in claim 1, characterized in that: The acquired lung nodule image is a preprocessed lung CT image, wherein the preprocessing includes image enhancement and image parenchyma segmentation.
3. The method for detecting lung nodules based on a neural network with an attention mechanism as claimed in claim 2, characterized in that: The image enhancement includes image texture enhancement and image denoising; wherein, the image texture enhancement uses histogram equalization to make the texture of the lung CT image clearer, and the image denoising uses a median filter method to remove noise in the lung CT image.
4. The method for detecting lung nodules based on a neural network with an attention mechanism as claimed in claim 1, characterized in that: The neural network detection model uses a stochastic gradient descent algorithm to train the model.
5. The method for detecting lung nodules in an image based on a neural network with an attention mechanism as claimed in claim 1, characterized in that: The loss function of the neural network detection model includes classification loss and regression loss.
6. A pulmonary nodule image detection system based on a neural network with an attention mechanism, characterized in that: include: An acquisition module, used for acquiring lung nodule images; A detection module, used to obtain a classification result of lung nodules based on the acquired image and a preset neural network detection model; Wherein, the neural network detection model adopts attention mechanism and 3D residual neural network; The neural network detection model consists of a 3D residual convolution module and an attention mechanism module; the preprocessed lung CT image passes through the 3D residual convolution module and enters the attention module channel, and the image is compressed under the action of the average pooling layer and the maximum pooling layer to generate the average pooling feature and the maximum pooling feature, and the feature fusion based on the shared weight layer generates the final attention channel; The 3D residual convolution module uses two 1*1*1 convolution kernels and one 3*3*3 convolution kernel; The front downsampling part of the neural network detection model consists of five 3D residual convolution blocks and an attention mechanism module; the deconvolution lifting part of the convolutional neural network consists of 3 convolution blocks and a region proposal network output layer.
7. A computer-readable storage medium having a program stored thereon, characterized in that: When the program is executed by a processor, the steps in the lung nodule image detection method based on a neural network with an attention mechanism as described in any one of claims 1 to 5 are implemented.
8. An electronic device comprising a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps in the lung nodule image detection method based on a neural network with an attention mechanism as described in any one of claims 1-5 are implemented.
Citation Information
Patent Citations
Detection method of pulmonary nodules based on three-dimensional convolution neural network
CN109102502A
Three-dimensional convolutional neural network lung nodule image automatic detection method fused with attention mechanism
CN111415342A
Pulmonary nodule benign and malignant identification method based on attention mechanism
CN112419307A
Pulmonary nodule image classification method based on 3D residual network
CN112801992A
Pulmonary nodule detection method and device based on neural network, and image processing equipment
CN113313698A
