Pulmonary nodule detection and classification method based on multi-attention and multi-task feature fusion

Through the method of multi-attention and multi-task feature fusion, combined with the spatial and channel attention mechanism, the problem of missed diagnosis and misdiagnosis in the detection and classification of pulmonary nodules in the existing technology is solved, and high-precision detection and malignancy of pulmonary nodules are achieved. assessment, improving diagnostic accuracy.

CN114529516BActive Publication Date: 2024-09-24GUANGZHOU YIXIANG CLOUD INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210050130.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-17
Publication Date
2024-09-24
Estimated Expiration
2042-01-17

AI Technical Summary

Technical Problem

Existing pulmonary nodule detection methods have problems with missed diagnosis and misdiagnosis in early detection and classification, and it is difficult to accurately assess the degree of malignancy. The existing CAD system can only perform simple positive and non-positive classification and fails to identify the degree of malignancy, resulting in poor diagnosis. Rely on doctor's decision.

Method used

A pulmonary nodule detection and classification method based on the fusion of multi-attention and multi-task features is used to construct a detection and classification network through spatial attention, channel attention and self-attention mechanisms, and combine feature extraction and segmentation task branches to achieve high accuracy. Detection and malignancy assessment.

Benefits of technology

The sensitivity and accuracy of pulmonary nodule detection are improved, and benign and malignant and cancer risk levels can be assessed with high precision, providing more accurate diagnostic results and improving the accuracy of detection and classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114529516B
    Figure CN114529516B
Patent Text Reader

Abstract

The present invention claims protection for a lung nodule detection and classification method based on multi-attention and multi-task feature fusion, which includes the following steps: preprocessing the original CT image; introducing spatial attention and channel attention that can fuse spatial semantic features and channel features into the feature extraction network, adding SPCS with self-attention at the tail to construct a residual network with dual-path connections for extracting features at multiple scales, and fusing features with a feature pyramid network; constructing multiple branches for detection and segmentation tasks; the segmentation branch outputs a multi-scale mask and aggregates the results, and the detection branch fuses the features again with a path aggregation network and outputs the detection results; finally, unifying the results of the two task branches as the total detection output - with high accuracy and sensitivity; according to the detection results, cropping is performed based on the nodule position, and the benign and malignant lung nodules are distinguished and the cancer risk level is predicted through the benign and malignant and cancer risk level classification network, thereby assisting doctors in disease diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical fields of deep learning, computer vision, and medical image processing, and specifically relates to a lung nodule detection and classification method based on multi-attention and multi-task feature fusion. Background Art

[0002] As we all know, biological aging is one of the causes of human death, and another cause of death is cancer. With the influence of smoking, air pollution and occupational exposure, the number of lung cancer patients is increasing year by year. Lung cancer ranks first in the incidence and mortality of all types of cancer in the world, and is one of the most common and dangerous cancers in the world today. Since the disease is often diagnosed in patients in the late stage, its overall prognosis is very poor. The early form of lung cancer is lung nodules. When patients are diagnosed with lung nodules, they need to be further examined and closely observed. Therefore, early detection and diagnosis of lung nodules are crucial to improving patient survival rates. At present, researchers use computers to assist radiologists in detecting and identifying lung nodules, namely computer-aided diagnosis (CAD). How to accurately detect and classify lung nodules has been widely studied by researchers.

[0003] At present, many studies have only detected or segmented lung nodules in CT images, and there are few studies on benign or malignant prediction based on the detection or segmentation results. In addition, since the CT of a case often contains 200-400 tomographic images, the CAD system built based on traditional methods is prone to missed diagnosis and misdiagnosis for lesions such as lung nodules that are small and difficult to distinguish with the naked eye, which brings additional economic burden to patients and reduces the chance of cure. Therefore, the model built based on convolutional neural networks can detect and diagnose patients' CT, which can effectively improve the work of pathologists and achieve a good detection rate.

[0004] In recent years, deep learning-based lung nodule detection is usually a two-stage algorithm: first, candidate nodule regions are generated, and then a false positive reduction link is added to improve the detection sensitivity. This detection algorithm is relatively cumbersome to design and has poor real-time performance, which makes it difficult to meet the changing needs of medical clinical applications. At the same time, the existing lung nodule detection work only classifies nodules into "positive nodules" and "non-positive nodules". It is mistakenly believed that "positive nodules" are malignant nodules and "non-positive nodules" are benign nodules. In fact, these "positive nodules" include all nodules that radiologists believe may be malignant, and their malignancy is divided into five levels. Level 1 is a high probability of benign, level 2 is a moderate probability of benign, level 3 is an uncertain probability of benign, level 4 is a moderate probability of malignancy, and level 5 is a high probability of malignancy. From the description of each level, we know that some lung nodules with a high probability of benignity are still included in these "positive nodules". In other words, the existing CAD system is only an auxiliary tool for nodule detection, and does not identify the malignancy of lung nodules. The final diagnosis still depends on the doctor's decision. Therefore, it is necessary to design a mature and convenient intelligent diagnosis method for lung nodules.

[0005] Application Publication No. CN113902676A, a method and system for detecting lung nodules based on a neural network with an attention mechanism, comprising the following steps: obtaining a lung nodule image; obtaining a classification result of the lung nodule according to the obtained image and a preset neural network detection model; wherein the neural network detection model adopts an attention mechanism and a 3D residual neural network. The present invention integrates a variety of trainable attention mechanism modules into a neural network, effectively extracts high-level abstract features of the data, and directly uses them for identification, 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. While ensuring high accuracy, the present patent constructs multiple task branches based on finding nodules with different feature forms according to multiple task forms, and adds channels and spatial attention mechanisms to fully focus on the location information and contour information of the lung nodules, and adds an SPCS module after the backbone network to further complete the fusion of information at multiple scales and the aggregation of high-level semantic information, which is helpful for subsequent classification of nodules. Thus, high detection sensitivity at high precision is achieved.

[0006] CN112364909A A method and device for classifying ink paintings based on attention mechanism and multi-scale fusion, wherein the ink painting classification method includes: obtaining ink paintings to be classified; inputting the ink paintings into a pre-trained deep convolutional neural network model, and extracting low-level features, intermediate-level features and high-level features respectively according to preset rules; inputting low-level features and intermediate-level features into a pre-trained spatial attention processing module respectively, extracting feature information with resolution therein; inputting high-level features into a pre-trained multi-scale feature processing module for preventing overfitting; inputting processed low-level features, intermediate-level features and high-level features into a pre-trained conditional random field model for feature fusion; inputting the fused features into a pre-trained channel attention processing module to assign values ​​to each feature channel; inputting the processed features into a pre-trained classifier for classification, so as to achieve high-accuracy classification of ink paintings. The prequel of ink painting classification does not detect this part, and the classification of this patent is to classify the nodules based on the detected pulmonary nodules. Unlike ink paintings, lung nodules have different sizes on a CT image. When cropping the target image, it is not only cropped according to the size of the nodule, but the size information of the lung nodule must be retained - this can provide a certain reference for subsequent classification and crop in an adaptive manner. And in order to cope with the challenges brought by the different diameters of nodules, this patent uses convolution kernels of different sizes in the first layer of the classification network to complete the convolution operation, aggregate different nodule features, and provide important feature basis for subsequent classification. Summary of the invention

[0007] The present invention aims to solve the above problems of the prior art. A lung nodule detection and classification method based on multi-attention and multi-task feature fusion is proposed, which is used to detect lung nodules with high sensitivity under high precision, and to evaluate the benign and malignant nature of lung nodules and the risk level of cancer through a classification network. The technical solution of the present invention is as follows:

[0008] A pulmonary nodule detection and classification method based on multi-attention and multi-task feature fusion, comprising the following steps:

[0009] The original CT image retains the HU values ​​in the range of [-1000, +400], discards the others, and transforms them into a 512×512 image in the range of [0, 255] through linear transformation for intuitive viewing;

[0010] After the image is normalized, it is input into a lung nodule detection network with spatial attention, channel attention and self-attention mechanisms and two task branches to obtain the detection results;

[0011] According to the detection results, the nodules are cropped based on their locations and then input into a classification network with a self-attention mechanism and two task branches to obtain the prediction results of the benign or malignant nature of the lung nodules and the cancer risk level.

[0012] Furthermore, the pulmonary nodule detection network includes a feature extraction network, feature fusion and two task branches. When the image is passed into the feature extraction network, six feature maps of scales of 512×512, 256×256, 128×128, 64×64, 32×32 and 16×16 will be obtained;

[0013] First, the features of 16×16, 32×32, and 64×64 scales will be integrated from deep to shallow. Then it will be divided into two task branches, namely the detection task branch and the segmentation task branch;

[0014] Furthermore, the detection branch will use the three scale feature maps of 16×16, 32×32, and 64×64 after feature fusion, and then fuse these three scale feature maps from shallow to deep, and finally output the nodule detection results on the three scale feature maps of 16×16, 32×32, and 64×64;

[0015] Furthermore, the segmentation branch will continue to fuse features of 128×128, 256×256, and 512×512 scales based on the 64×64 feature fusion, and output semantic segmentation maps of three different scales through upsampling, convolution, and sigmoid activation. Finally, the results of the three are combined to output the final semantic segmentation map. The semantic segmentation map will be transformed and unified with the results output by the detection branch to output the final lung nodule detection result.

[0016] Furthermore, the feature extraction network has a total of 40 layers, 17 convolutional layers and 23 residual blocks, each residual block contains a channel attention with a convolution kernel size of 1×1 and a spatial attention with a convolution kernel size of 7×7; the first group of convolution sets contains 2 convolutional layers to quickly expand the channel, and the other groups contain 3 convolutional layers;

[0017] Furthermore, the feature extraction network uses the residual network as the backbone, and the spatial attention mechanism and channel attention mechanism are added to the residual block. An additional path with only 1×1 convolution is added to the block to form a dual path, which is conducive to the focus of positioning information and the smooth flow of information;

[0018] Furthermore, the SPCS module is added to the end of the backbone network to further extract information from the global and multi-scale perspectives and focus on important semantic information. When the normalized image is input, it will be normalized by a layer of BactchNorm, and then through the backbone network and SPCS module, the feature maps of six scales, 512×512, 256×256, 128×128, 64×64, 32×32, and 16×16, are output;

[0019] Furthermore, the SPCS module is a spatial pyramid convolution with a self-attention mechanism, which takes the deepest feature map extracted by the backbone network as input. After a layer of convolution, it is divided into four paths, one of which is connected as a shortcut, and the other three are respectively convolved and self-attentioned through 5×5, 9×9, and 13×13 convolution kernels, and the four features are fused and output through a layer of convolution;

[0020] Furthermore, the detection branch will output three prediction results on three scale feature maps of 16×16, 32×32, and 64×64 through two layers of convolution. The smallest lung nodule also occupies eight pixels in width, so it is appropriate to choose these three scales for prediction;

[0021] Furthermore, the network output has four values, namely target confidence, coordinate x, coordinate y and diameter of the nodule, where the results with target confidence greater than 0.85 will be retained, and those less than will be suppressed;

[0022] Furthermore, the segmentation branch obtains a semantic segmentation map of the image, and performs a binarization process on it through threshold filtering, and performs a morphological process according to the following formula:

[0023]

[0024] Where M represents the binary segmentation map obtained by the segmentation branch, ⊙ represents the morphological corrosion performed by the convolution kernel K, Represents the morphological expansion through the convolution kernel K. First, erosion is performed to remove the interference of scattered pixels; then it is greatly expanded, and finally eroded to connect the slightly discontinuous areas into one area - because some lung nodules have unclear boundary contours such as ground glass, and keep their size (diameter) unchanged, and exclude targets that are too small. Finally, in the processed segmentation map, find the minimum circumscribed rectangular frame of each connected area, and get the position of each rectangular frame, which is the position of the lung nodule detected in the segmentation map. The maximum side length of the rectangular frame is the diameter of the nodule. The reliability value of the result is calculated according to the following formula:

[0025] m=M(box)

[0026] p=mean(mean(m),max(m))

[0027] Where M is the original segmentation map output by the network - each pixel value on the map is the probability value of whether it belongs to a lung nodule. M(box) represents the target border obtained by conversion, and the value of the area in M ​​is obtained by segmenting the binary mask to obtain m. Finally, the confidence of the target object is obtained. In other words, the semantic segmentation map is converted into the same nodule target output represented by four values: target confidence, coordinate x, coordinate y and nodule diameter, as in the detection branch.

[0028] Furthermore, the unification of the detection branch and the segmentation branch results is to obtain the union of the two results and output them as the final detection result of the lung nodule detection network.

[0029] The pulmonary nodule classification network also has spatial attention mechanism, channel attention mechanism and self-attention mechanism. Since pulmonary nodules have different sizes in the picture, cropping will also retain their size characteristics. At the same time, due to the complex morphological characteristics of pulmonary nodules, at the beginning of the network, convolution operations will be performed by convolution kernels of sizes 7×7, 14×14, 32×32 and 64×64, and key features will be focused through spatial attention mechanism and channel attention mechanism, and then the features of four scales will be fused through convolution. High-level semantic information is extracted through a series of residual blocks and self-attention blocks. The residual block uses the same residual block as the pulmonary nodule detection network. The semantic features of different depths are fused, and the prediction results of two branches are output by the fully connected neural network, which are the benign and malignant pulmonary nodules and the risk level of cancer.

[0030] The detection results of the detection model are cropped to a size of 64×64 as input for benign or malignant prediction;

[0031] The image cropping is the detection result of the lung nodule obtained by the lung nodule detection network. The cropping method is determined according to the diameter of the lung nodule. The image with a diameter of less than 57×57 pixels will be cropped with its detection center point as the cropping center point. The cropped rectangular area is 57×57, and then resized to a size of 64×64.

[0032] Furthermore, the rectangular area with a diameter larger than 57×57 will be cropped according to its actual diameter and resized to 64×64. Then it will be input into the subsequent lung nodule classification network. The input data is used as a training set to train the convolutional neural network structure to classify benign and malignant nodules. The quality of multiple models is compared on the validation set to obtain the optimal two-dimensional deep convolutional neural network model.

[0033] Furthermore, the lung nodule classification network also has spatial attention, channel attention and self-attention mechanisms. Since lung nodules have different sizes in the image, cropping will also retain their size characteristics. At the same time, due to the complex morphological characteristics of lung nodules, at the beginning of the network, convolution operations will be performed by convolution kernels of sizes 7×7, 14×14, 32×32 and 64×64, and key features will be focused through spatial attention mechanisms and channel attention mechanisms, and then the features of the four scales will be fused through convolution;

[0034] Furthermore, high-level semantic information is extracted through a series of residual blocks and self-attention blocks, where the residual blocks are the same as those used in the lung nodule detection network.

[0035] Furthermore, by integrating semantic features of different depths, the fully connected neural network outputs the prediction results of two branches, namely, benign and malignant lung nodules and five categories of cancer risk level.

[0036] Finally, given the complex morphological characteristics of nodules, a single feature set cannot fully describe the information of lung nodules, and it is necessary to fuse edge features and texture features to classify the malignancy of lung nodules; four scale features of 7×7, 14×14, 32×32 and 64×64 are extracted from the classification network, and high-level semantic information is learned through a series of staggered blocks; the high-level feature learning stage consists of a series of residual blocks, which fuse the features of the last average pooling layer and the features of the last residual block, and finally the fully connected layer outputs the benign and malignant results.

[0037] The advantages and beneficial effects of the present invention are as follows:

[0038] The present invention detects and classifies lung nodules based on multi-attention mechanisms, multi-task forms and multi-scale feature fusion. Through multiple attentions, different positions of the network are used according to their different characteristics. Among them, channel attention and spatial attention introduce small computational amount and are used to focus on key features in the shallow layer; while self-attention is used in the SPCS module at the deepest layer because its computational amount is exponentially related to the size and has a higher global feature focusing ability. The use of this multiple attention mechanism solves the problem of difficulty in detecting small targets such as lung nodules and low detection accuracy. And two task branches are constructed, and different investigations are conducted on the characteristics of lung nodules through two task forms, and lung nodules that cannot be detected by each task form can be detected. Through joint training, the output results of the two task branches are comprehensively unified in the reasoning stage, and the detection rate of lung nodules is further improved, and it is achieved on the premise of high accuracy. At the same time, the benign and malignant classification task of lung nodules is related to the five-classification task of cancer risk level, which can promote the improvement of common tasks, so the classification prediction results of the model also have high accuracy. In addition, the detection results of lung nodules provide more valuable references for our subsequent classification. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 The present invention provides a preferred embodiment of the intelligent diagnosis flow chart of pulmonary nodules;

[0040] Figure 2 The structural diagram of the lung nodule detection network of the present invention;

[0041] Figure 3 The structural diagram of the lung nodule classification network of the present invention; DETAILED DESCRIPTION

[0042] The following will describe the technical solutions in the embodiments of the present invention in detail in conjunction with the accompanying drawings in the embodiments of the present invention. The described embodiments are only part of the embodiments of the present invention.

[0043] The technical solution of the present invention to solve the above technical problems is:

[0044] This patent proposes a fully automatic intelligent detection and classification method for lung nodules. The invention provides a multi-cascade parallel network, which completes nodule detection and classification based on multi-attention mechanism, multi-scale feature fusion and multi-task form. It can make good use of the advantages of deep learning to autonomously learn lung nodule features, and at the same time, it integrates nodule features of different scales based on lung nodules of different diameters, achieving higher detection sensitivity and classification accuracy. Figure 1 As shown in the figure, it mainly consists of two parts: nodule detection and benign and malignant prediction.

[0045] like Figure 2As shown in the figure, a lung nodule detection network based on multi-attention mechanism, multi-task form, and multi-scale feature fusion is used. After normalization, the original CT image is input into the detection network. First, the parameters of the BN layer are scientifically standardized, and then processed by six blocks, namely Block0, Block1, Block2, Block3, Block4, and Block5. Block0 contains two layers of 3×3 convolution. The main purpose of this block is to quickly expand the channel and enrich the feature representation. Block1, Block2, Block3, Block4, and Block5 contain a 3×3 convolution with a stride of 2 for downsampling, which is divided into two paths, one is a stack of several residual blocks, and the other is a 1×1 convolution process. The results of the two paths are then spliced ​​and fused through a 3×3 convolution as the output of the block. The residual block consists of two 3×3 convolutions, plus the spatial attention mechanism and channel attention mechanism in the middle. See the detailed structure of the residual block. Figure 1 As shown in the residual block of the legend part of the figure. After these six blocks are processed, there will be six feature maps of 512×512, 256×256, 128×128, 64×64, 32×32 and 16×16 scales. The 16×16 scale feature map will also be processed by the SPCS module before being output. The BN layer plus these six block modules and the SPCS module constitute the backbone network. See Table 1 for detailed parameters.

[0046]

[0047]

[0048]

[0049] Table 1 Structure and parameters of feature extraction network

[0050] The structure of the SPCS module is as follows Figure 2 As shown in the SPCS module area, the structure is divided into four paths after passing through a layer of 3×3. One path is connected as a shortcut, and the other three paths are convolved and self-attentioned through 5×5, 9×9, and 13×13 convolution kernels respectively. Finally, the four features are fused and output through a layer of convolution.

[0051] Here, the backbone network is composed of a BN layer plus six block modules and an SPCS module. Among them, the spatial attention and channel attention in the network are used in each residual block, which helps the network to aggregate relevant information and suppress irrelevant information, thereby improving the detection accuracy and sensitivity of small lung nodules; while the self-attention system is only used in the SPCS module, which is mainly in the deep network. Through self-attention, more comprehensive global useful features are aggregated to enhance semantic understanding, which is helpful for classification, that is, to improve the accuracy of detection. The image will be processed by the backbone network and output features at six different scales: 512×512, 256×256, 128×128, 64×64, 32×32 and 16×16. Feature fusion will start with a scale of 16×16 and be fused from 16×16, 32×32 to 64×64 in the form of FPN from deep to shallow. After obtaining the 64×64 scale features after feature fusion, it will branch into two task branches, namely the segmentation task branch and the detection task branch.

[0052] The detection task branch will use the three feature maps of 64×64, 32×32 and 16×16 after feature fusion, and then use PAN to fuse the features from shallow to deep, from 64×64, 32×32 to 16×16 scales, and output the prediction results of lung nodules. The smallest lung nodule also occupies 8 pixels in width, so this is appropriate. This process is as follows Figure 2 As shown in . The representations of lung nodule targets are target confidence, x-axis coordinate, y-axis coordinate, and lung nodule diameter. Results with target confidence greater than 0.85 will be retained, while those less than will be suppressed.

[0053] The segmentation branch will continue to perform feature fusion from deep to shallow and decode it into a semantic segmentation map of the image. Figure 2 As shown in the figure, after obtaining the 64×64 scale features after the fusion features, they are upsampled and concatenated with the 128×128 scale features and fused through convolution. This process continues until the 512×512 position. At the same time, the 128×128, 256×256, and 512×512 features after feature fusion will be convolved and upsampled to the same size as the input image to obtain semantic segmentation maps under different scale features, forming a segmentation map from coarse to fine, and through the convolution operation, the results of the three are fused and output as the final segmentation map. Then, the segmentation result will be unified with the output result of the detection branch through result conversion.

[0054] The segmentation branch obtains the semantic segmentation map of the image and filters it through the threshold, such as Figure 2 The white highlighted area in the middle indicates the area that may be a lung nodule. Then it is binarized and morphologically processed according to the following formula

[0055]

[0056] Where M represents the binary segmentation map obtained by the segmentation branch, ⊙ represents the morphological corrosion performed by the convolution kernel K, Represents the morphological expansion through the convolution kernel K. First, erosion is performed to remove the interference of scattered pixels; then it is greatly expanded, and finally eroded to connect the slightly discontinuous areas into one area - because some lung nodules have unclear boundary contours such as ground glass, and keep their size (diameter) unchanged, and exclude targets that are too small. Finally, in the processed segmentation map, find the minimum circumscribed rectangular frame of each connected area, and get the position of each rectangular frame, which is the position of the lung nodule detected in the segmentation map. The maximum side length of the rectangular frame is the diameter of the nodule. The reliability value of the result is calculated according to the following formula:

[0057] m=M(box)

[0058] p=mean(mean(m),max(m))

[0059] Where M is the original segmentation map output by the network - each pixel value on the map is the probability value of whether it belongs to a lung nodule. M(box) represents the target border obtained by conversion, and the value of the area in M ​​is obtained by segmenting the binary mask to obtain m. Finally, the confidence of the target object is obtained. In other words, the semantic segmentation map is converted into the same nodule target output represented by four values: target confidence, coordinate x, coordinate y and nodule diameter, as in the detection branch.

[0060] Finally, the results of the detection branch and the segmentation branch are unified. This is to find the union of the two results and output them as the final detection result of the lung nodule detection network. The results of the two branches complement each other and improve the detection sensitivity while maintaining high accuracy. Figure 2 As shown in the figure, there are three nodules in the current input. The detection branch found two nodules, and the segmentation branch also found two nodules, but they did not find the same nodule. Instead, they found one nodule repeatedly and each found another different nodule. Finally, the results of both aspects are combined to output the final detection result - a total of three nodules were found. Since the two task forms can complement each other's nodules that cannot be detected by the other, the network focuses on improving the accuracy of network lung nodule detection, and improves the detection sensitivity while ensuring the accuracy by examining the characteristics of lung nodules in different tasks.

[0061] Early detection of benign or malignant lung nodules is of great significance for clinical diagnosis. For malignant nodules, malignant tumor risk assessment is usually used to guide doctors to determine the cancer stage and formulate subsequent prognosis plans. However, due to the differences in size, shape and location of nodules, classifying nodules in computer-aided diagnosis systems has always been a great challenge. Based on the above-mentioned lung nodule detection results, this patent completes the two-classification of benign and malignant nodules and the five-classification of cancer risk levels. The structure of the lung nodule classification model proposed in this patent is as follows: Figure 3 As shown in the figure, it mainly consists of three parts: multi-scale feature extraction stage, high-level feature learning stage, and feature fusion stage.

[0062] First, the nodule detection result is obtained based on the lung nodule detection network. Based on this result, the lung nodule image at the corresponding position in the original image is cropped and sent to the next level of lung nodule classification network.

[0063] The cropping method is to determine the cropping method according to the diameter of the lung nodule. The diameter of the nodule with a pixel width less than 57×57 will be cropped at the center point of its detection, and the cropped rectangular area is 57×57, which is scaled to 64×64. The diameter of the nodule larger than 57×57 will be cropped according to the same rectangular area as its actual diameter, which is scaled to 64×64. Then it is input into the subsequent lung nodule classification network.

[0064] The lung nodule classification network based on the fusion of multi-attention and multi-task features will also include spatial attention, channel attention and self-attention, and has two task branches, one for predicting the benign and malignant nature of lung nodules, and the other for predicting the cancer risk level of lung nodules. The two task branches are related, but also different. There are five levels of cancer risk, namely level one, level two, level three, level four, and level five. The probability of cancer is from low to high, as believed by radiologists. At the same time, level one and level two are benign, level four and level five are malignant, and level three is uncertain whether there is cancer or not. In this way, the common accuracy can be improved from two perspectives. The detailed parameters of its network structure are shown in Table 2:

[0065]

[0066] Table 2 Structure and parameters of feature extraction network

[0067] Since lung nodules have different sizes in the picture, cropping will also retain their size characteristics. At the same time, due to the complex morphological characteristics of lung nodules, at the beginning of the network, convolution operations will be performed by convolution kernels of sizes 7×7, 14×14, 32×32 and 64×64, and key features will be focused through spatial attention mechanism and channel attention mechanism, and then the features of four scales will be fused through convolution. High-level semantic information is extracted through a series of residual blocks and self-attention blocks. The residual block uses the same residual block as the lung nodule detection network. And the semantic features of different depths are fused, and the prediction results of two branches are output by the fully connected neural network, which are the benign and malignant lung nodules and the risk level of cancer. It can provide more reference information for the detected lung nodules. At the same time, an intelligent diagnosis system for lung nodules can be built.

[0068] The preferred embodiment of the present invention provides a flowchart of intelligent diagnosis of pulmonary nodules. Figure 1 As shown. The CT image retains the HU values ​​in the range of [-1000, +400], discards the others, and transforms them into a 512×512 image in the range of [0, 255] through linear transformation. On the one hand, it can be viewed intuitively by doctors, and on the other hand, it is convenient to input the pulmonary nodule detection network after image normalization. After the CT image is preprocessed, the pulmonary nodule detection network based on multi-attention mechanism and multi-task form completes the detection of pulmonary nodules to obtain the detection results; then the image of the corresponding pulmonary nodule area is cropped, and the image of each detected pulmonary nodule is obtained through a certain suitable cropping strategy; the prediction network of pulmonary nodule benign and malignant and cancer risk level obtains the prediction results of the benign and malignant nature of each pulmonary nodule and the cancer risk level, and displays and saves the corresponding results for other use.

[0069] The training process of the pulmonary nodule detection network of the present invention is as follows:

[0070] The CT image is converted into a png image, and the corresponding lung nodule position and mask are annotated by the physician. The present invention uses the LUNA16 dataset, which has been annotated by professional physicians for the lung nodule position, and the mask can be additionally annotated;

[0071] After data enhancement, the CT images are input into the pulmonary nodule detection network for prediction. The segmentation branch is trained using binary cross entropy, while the target confidence of the detection branch is trained using binary cross entropy, and the prediction of the two coordinates and the diameter of the pulmonary nodule is trained using the mean square error loss function.

[0072] The entire network uses dropout with a probability of 0.1 for regularization. The Adma optimization algorithm is used with an initial learning rate of 0.001, parameters β1=0.9, β2=0.999, a batch size of 8, and a total of 1000 epochs.

[0073] The training process of the pulmonary nodule classification network of the present invention is as follows:

[0074] The same cropping strategy as in the inference stage is used to create a dataset for classification network training from CT videos;

[0075] After data enhancement, the image is sent to the classification network for prediction. The cross entropy loss function is used for optimization, and the same optimization algorithm as the detection network is used, with an initial learning rate of 0.0001, parameters β1 = 0.9, β2 = 0.999, a batch size of 64, and a total of 500 epochs.

[0076] Among them, the detection network achieved a detection sensitivity of 0.94 when the average error per CT scan image was 0.125, and a CPM score of 0.949. For classification, including benign and malignant classification, the AUC was 0.95, and the macro-average ROC score for cancer risk level prediction was 0.95.

[0077] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0078] The above embodiments should be understood to be only used to illustrate the present invention and not to limit the protection scope of the present invention. After reading the contents of the present invention, technicians can make various changes or modifications to the present invention, and these equivalent changes and modifications also fall within the scope defined by the claims of the present invention.

Claims

1. A lung nodule detection and classification method based on multi-attention and multi-task feature fusion, characterized in that: The following steps are involved: The lung CT scan images are preprocessed to obtain CT image data for training and divided into a training set and a validation set, which are then input into the lung nodule detection network to complete nodule detection; The lung nodule detection network will output feature maps of six different scales: 512×512, 256×256, 128×128, 64×64, 32×32, and 16×16 through a backbone network consisting of six block modules and one SPCS module; Then the detection branch fuses the three feature maps of 64×64, 32×32 and 16×16 to output the prediction results, which are target confidence, x-axis coordinate, y-axis coordinate and lung nodule diameter respectively; The segmentation task branch fuses six feature maps and outputs semantic segmentation maps at three scales: 512×512, 256×256, and 128×128 through convolution. The maps are upsampled to a size of 512×512 and finally fused through convolution to produce the final result. Then the results of the segmentation branch are converted and unified with the results of the detection branch as the overall lung nodule detection output; According to the detection results of lung nodules, the regional data of the corresponding lung nodules are cut, and the lung nodule benign or malignant and cancer risk level prediction network completes the benign or malignant judgment and cancer risk level judgment, and finally outputs; The backbone network includes three attention mechanisms, namely channel attention mechanism, spatial attention mechanism and self-attention mechanism; The SPCS module is a spatial pyramid convolution with a self-attention mechanism. It takes the deepest feature map extracted by the backbone network as input. After one layer of convolution, it is divided into four paths. One path is used as a shortcut connection, and the other three paths are convolved and self-attentioned with 5×5, 9×9, and 13×13 convolution kernels respectively. The four features are fused and output through one layer of convolution to enhance the recognition ability of lung nodule representation. The network for predicting the benign and malignant nature of lung nodules and the risk level of cancer also uses a channel attention mechanism, a spatial attention mechanism, and a self-attention mechanism, and has two task branches, one for predicting the benign and malignant nature of lung nodules, and the other for predicting the risk level of cancer.

2. The method for lung nodule detection and classification based on multi-attention and multi-task feature fusion according to claim 1, characterized in that: The multi-tasks are detection tasks and segmentation tasks.