Recognition method of capsular cavity type lung cancer image and training method of lung recognition model
By using the lung recognition model of the large-nuclear deep convolution module and attention module, the cystic lung cancer images are identified, which solves the problem that cystic lung cancer is easily misdiagnosed, and improves the recognition accuracy and accuracy of early detection. .
Patent Information
- Application Number
- CN202411310219.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2025-02-18
AI Technical Summary
Cystic lung cancer is atypical in imaging and is easily misdiagnosed as a lung vesicular, resulting in delaying treatment time and affecting the treatment effect.
A lung recognition model including a large-nuclear depth convolution module and an attention module is used to denoising and enhance the image to be recognized to be used to identify whether the type of image is a cystic lung cancer image.
It improves the accuracy of identification of cystic lung cancer images, reduces the rate of misdiagnosis, and ensures accurate detection and timely treatment of early lesions.
Smart Images

Figure CN119478482A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technology, and in particular to a method for recognizing cystic lung cancer images and a method for training a lung recognition model. Background Art
[0003] Cystic lung cancer is a special type of lung cancer with thin-walled cysts as the main manifestation or cysts secondary to solid lesions of lung cancer. It is a rare type of lung cancer with atypical imaging manifestations, and misdiagnosis and missed diagnosis often occur in clinical practice. Cystic lung cancer often manifests as cystic shadows in imaging. Both cystic lung cancer and bullae involve the formation of cavities in the lungs. Early cystic lung cancer may only manifest as thin-walled cystic structures, which can easily be misdiagnosed as bullae, thus delaying the patient's treatment time and affecting the patient's treatment effect. Summary of the invention
[0004] The disclosed embodiment provides a method for recognizing cystic lung cancer images and a method for training a lung recognition model, which can solve the problem of misdiagnosis of cystic lung cancer. The technical solution is as follows:
[0005] According to a first aspect of an embodiment of the present disclosure, a method for identifying a cystic lung cancer image is provided, comprising:
[0006] Acquire an image to be identified, wherein the image to be identified includes a lung image of a target object;
[0007] The image to be identified is input into a lung recognition model to obtain a recognition result of the image to be identified, wherein the lung recognition model includes a large-kernel deep convolution module and an attention module; the recognition result of the image to be identified is used to indicate whether the type of the image to be identified is a cystic lung cancer image.
[0008] In one embodiment, the recognition result of the image to be recognized includes: the type of the image to be recognized is a cystic lung cancer image, the type of the image to be recognized is a bullous lung image, or the type of the image to be recognized is other lung images.
[0009] In one embodiment, the attention module includes: a channel attention submodule and a spatial attention submodule; the channel attention submodule is used to perform attention calculation in the channel dimension; the spatial attention submodule is used to perform attention calculation in the spatial dimension; the lung recognition model includes a large-kernel deep convolution module, a channel attention submodule and a spatial attention submodule connected in sequence.
[0010] In one embodiment, before inputting the image to be identified into the lung recognition model to obtain the recognition result of the image to be identified, the method further includes:
[0011] Performing denoising and enhancement processing on the image to be identified in sequence to obtain a processed image;
[0012] The step of inputting the image to be identified into the lung recognition model to obtain the recognition result of the image to be identified includes:
[0013] The processed image is input into a lung recognition model to obtain a recognition result of the image to be recognized.
[0014] In one embodiment, the method further comprises:
[0015] Acquire a sample image set, the sample image set comprising: sample images of cystic lung cancer and sample images of non-cystic lung cancer;
[0016] The initial lung recognition model is trained using the sample image set until the initial lung recognition model converges to obtain a lung recognition model.
[0017] According to a second aspect of an embodiment of the present disclosure, a method for training a lung recognition model is provided, comprising:
[0018] Acquire a sample image set, wherein the sample image set includes: sample images of cystic lung cancer and sample images of non-cystic lung cancer;
[0019] The initial lung recognition model is trained using the sample image set until the initial lung recognition model converges to obtain a lung recognition model; the lung recognition model includes a large-kernel deep convolution module and an attention module; the lung recognition model is used to identify whether the type of the input image to be recognized is a cystic lung cancer image.
[0020] In one embodiment, after acquiring the sample image set, the method further includes:
[0021] performing denoising and enhancement processing on the sample image set in sequence to obtain a processed sample image set;
[0022] The using the sample image set to train the initial lung recognition model until the initial lung recognition model converges to obtain the lung recognition model comprises:
[0023] The processed sample image set is used to train the initial lung recognition model until the initial lung recognition model converges to obtain a lung recognition model.
[0024] In one embodiment, the non-cystic lung cancer sample images include bulla sample images and other sample images; the lung recognition model is used to identify whether the type of the input image to be recognized is a cystic lung cancer image, a bulla image or other lung image.
[0025] In one embodiment, the attention module includes: a channel attention submodule and a spatial attention submodule; the channel attention submodule is used to perform attention calculation in the channel dimension; the spatial attention submodule is used to perform attention calculation in the spatial dimension; the lung recognition model includes a large-kernel deep convolution module, a channel attention submodule and a spatial attention submodule connected in sequence.
[0026] According to a third aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, in which at least one computer instruction is stored, and the instruction is loaded and executed by a processor to implement the steps performed in the method for identifying cystic lung cancer images described in the first aspect and any embodiment of the first aspect.
[0027] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, in which at least one computer instruction is stored, and the instruction is loaded and executed by a processor to implement the steps performed in the training method of the lung recognition model described in any embodiment of the first aspect and the second aspect.
[0028] The method for identifying cystic lung cancer images provided by the embodiment of the present disclosure inputs the image to be identified into the lung recognition model, and outputs whether the type of the image to be identified is a cystic lung cancer image. Among them, the lung recognition model includes a large kernel deep convolution module and an attention module connected in sequence. Lung cancer images usually contain a lot of details and complex structures. The attention module can help the network better capture global information, which is very important for the analysis of the overall morphology and structural characteristics of lung lesions. Early lesions of lung cancer may be very small. The attention module can have good sensitivity to small and local features in the image, can better capture these small features, and improve the accuracy of lesion detection. In medical image segmentation, the introduction of global information can help the segmentation model better distinguish between tumors and normal tissues. The global features provided by the attention module help to understand the overall structure of the image and improve the accuracy of lesion segmentation. The large kernel deep convolution module is a multi-branch structure. The addition of the attention module can better fuse local and global features, so that the features extracted by different branches can effectively interact in a global range, enhance the fusion of local and global features of the image, improve the expression ability of image features, and improve the recognition accuracy of cystic lung cancer images.
[0029] The training method of the lung recognition model provided in the embodiment of the present disclosure is to build an initial lung recognition model in advance through a large-kernel deep convolutional network and an attention network, and input a sample image set containing sample images of cystic lung cancer and sample images of non-cystic lung cancer into the initial lung recognition model for training until the initial lung recognition model converges to obtain a lung recognition model. Lung cancer images usually contain a large number of details and complex structures. The attention network can help the network better capture global information, which is very important for the analysis of the overall morphology and structural characteristics of lung lesions. Early lesions of lung cancer may be very small, and the attention network can have good sensitivity to small and local features in the input image, which can better capture these small features and improve the accuracy of lesion detection. In medical image segmentation, the introduction of global information can help the segmentation model better distinguish between tumors and normal tissues, and the global features provided by the attention network help to understand the overall structure of the image and improve the accuracy of lesion segmentation. The large-kernel deep convolutional network is a multi-branch structure. The addition of an attention network can better fuse local and global features, allowing the features extracted by different branches to effectively interact globally, enhancing the fusion of local and global features of the image, improving the expressiveness of image features, and improving the accuracy of the lung recognition model in identifying cystic lung cancer images.
[0030] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0032] Figure 1 A schematic diagram of a flow chart of a method for identifying cystic lung cancer images provided by an embodiment of the present disclosure;
[0033] Figure 2 A flowchart of a lung recognition model training method provided in an embodiment of the present disclosure;
[0034] Figure 3 A flow chart of a method for differential diagnosis of cystic lung cancer and pulmonary bullae based on CT images provided in an embodiment of the present disclosure;
[0035] Figure 4 A network structure diagram of a lung recognition model provided in an embodiment of the present disclosure;
[0036] Figure 5 A GAM structure diagram provided for an embodiment of the present disclosure;
[0037] Figure 6A GAM channel attention structure diagram provided for an embodiment of the present disclosure;
[0038] Figure 7 A GAM spatial attention structure diagram provided for an embodiment of the present disclosure. DETAILED DESCRIPTION
[0039] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0040] The present disclosure provides a method for recognizing cystic lung cancer images and a method for training a lung recognition model. An image to be recognized containing a lung image of a target object is obtained, and the image to be recognized is input into a trained lung recognition model to determine whether the type of the image to be recognized is a cystic lung cancer image. The lung recognition model includes a large-kernel deep convolution module and an attention module. Lung cancer images usually contain a large amount of details and complex structures. The attention module can help the network better capture global information, which is very important for analyzing the overall morphology and structural characteristics of lung lesions. Early lesions of lung cancer may be very small. The attention module can have good sensitivity to small and local features in the image, can better capture these small features, and improve the accuracy of lesion detection. In medical image segmentation, the introduction of global information can help the segmentation model better distinguish between tumors and normal tissues. The global features provided by the attention module help understand the overall structure of the image and improve the accuracy of lesion segmentation. The large-kernel deep convolution module is a multi-branch structure. Adding the attention module can better integrate local and global features, enable the features extracted by different branches to effectively interact globally, enhance the fusion of local and global features of the image, improve the expression ability of image features, and improve the recognition accuracy of cystic lung cancer images.
[0041] The technical solution of the present disclosure is described in detail below with reference to specific embodiments.
[0042] Figure 1 This is a flow chart of a method for identifying cystic lung cancer images provided by an embodiment of the present disclosure. The method for identifying cystic lung cancer images provided by this embodiment is executed by a computer or a server, etc. The method provided by this embodiment may include the following steps.
[0043] Step 101: Obtain an image to be recognized.
[0044] The image to be identified includes a lung image of the target object. The image to be identified may be a CT image.
[0045] Step 103: input the image to be recognized into the lung recognition model to obtain a recognition result of the image to be recognized.
[0046] The recognition result of the image to be recognized is used to indicate whether the type of the image to be recognized is a cystic lung cancer image. A cystic lung cancer image refers to an image in which the lungs have a cystic lung cancer structure.
[0047] Furthermore, the recognition result of the image to be recognized includes: the type of the image to be recognized is a cystic lung cancer image, the type of the image to be recognized is a bulla image, or the type of the image to be recognized is another lung image. Among them, a bulla image means that the lungs in the image have a bulla structure. Other lung images mean that the lungs in the image do not have a cystic lung cancer structure and a bulla structure. Since both the cystic lung cancer image and the bulla image are designed to form the cavity of the lung, early cystic lung cancer may only appear as a thin-walled cystic structure, and the cystic lung cancer image can be easily mistaken for a bulla image. Therefore, the lung recognition model can be a classification model that identifies whether it is a bulla image while recognizing the cystic lung cancer image.
[0048] The lung recognition model includes a large-core deep convolution module and an attention module. The large-core deep convolution module is a multi-branch structure network that can deeply extract lung features in the image to be recognized.
[0049] The attention module is used to enhance the useful features in the feature map obtained by the deep convolution module and suppress useless features by learning appropriate weights, thereby improving the performance of the lung recognition model and improving the recognition accuracy of the lung recognition model.
[0050] Furthermore, the attention module may include but is not limited to a channel attention submodule and a spatial attention submodule. The channel attention submodule is used to perform attention calculation in the channel dimension. The spatial attention submodule is used to perform attention calculation in the spatial dimension. The lung recognition model includes a large kernel deep convolution module, a channel attention submodule and a spatial attention submodule connected in sequence.
[0051] Optionally, the structure of the large-kernel deep convolution module can be an InceptionNeXt network.
[0052] Optionally, the structure of the attention module can be a GAM network.
[0053] In this embodiment, in teaching, training or clinical scenarios, it is necessary to determine whether there may be lesions in the lungs of the target object based on the lung image of the target object, or to learn, demonstrate, etc. in teaching. The trained lung recognition model can be obtained in advance, and the image to be recognized is input into the lung recognition model, and the type of the image to be recognized is output whether it is a cystic lung cancer image. Among them, the lung recognition model includes a large kernel deep convolution module and an attention module connected in sequence. Lung cancer images usually contain a lot of details and complex structures. The attention module can help the network better capture global information, which is very important for the analysis of the overall morphology and structural characteristics of lung lesions. Early lesions of lung cancer may be very small, and the attention module can have good sensitivity to small and local features in the image, which can better capture these small features and improve the accuracy of lesion detection. In medical image segmentation, the introduction of global information can help the segmentation model better distinguish between tumors and normal tissues, and the global features provided by the attention module help to understand the overall structure of the image and improve the accuracy of lesion segmentation. The large-kernel deep convolution module is a multi-branch structure. Adding the attention module can better integrate local and global features, enable the features extracted by different branches to effectively interact globally, enhance the fusion of local and global features of the image, improve the expression ability of image features, and improve the recognition accuracy of cystic lung cancer images.
[0054] On the basis of the above embodiment, further, after step 101, step 102 may be included, and correspondingly, step 103 may be implemented through the following step 1031.
[0055] Step 102: Perform denoising and / or enhancement processing on the image to be identified in sequence to obtain a processed image.
[0056] Optionally, denoising can be performed using a spatial domain denoising method.
[0057] Furthermore, a non-local mean filtering method can be used to perform spatial domain denoising. Denoising can be performed using the following formula (1).
[0058]
[0059] Among them, Ω refers to the image domain to be identified; i is the index of the image to be identified; Ω i is a search area with a center pixel i and a size of q×q; ω(i,j) represents the weight assigned to the noise image.
[0060] Optionally, the image can be enhanced by histogram equalization, calculating the grayscale histogram and equalizing the grayscale histogram. The histogram equalization can be performed by the following formula (2):
[0061]
[0062] Among them, r k Represents the scattered gray level, n k Represents the image with r k The number of grayscale pixels, n represents the total number of image pixels, That is the frequency; grayscale histogram equalization: use the cumulative distribution function as the grayscale transformation function, the formula is: F X (x) = P (X ≤ x).
[0063] Step 1031: input the processed image into the lung recognition model to obtain the recognition result of the image to be recognized.
[0064] In this embodiment, the image to be identified is subjected to spatial domain denoising by a non-local mean filtering method. The non-local mean filtering takes into account the non-local similarity in the image and only performs weighted averaging on pixels similar to the current pixel, thereby better retaining the image detail information. In addition, by utilizing the non-local similarity in the image, the noise level of each pixel can be estimated more accurately, achieving a better denoising effect, thereby improving the accuracy of the recognition result.
[0065] The image to be recognized after denoising is enhanced by histogram equalization. The calculation speed of histogram equalization is relatively fast, and no additional parameter adjustment or training is required. It can be directly applied to the image without involving complex models or algorithms. This makes the enhancement process simple and fast, thereby improving the accuracy of the recognition results.
[0066] Combine the following Figure 2 , introduces a lung recognition model training method provided by an embodiment of the present disclosure. It can be understood that the lung recognition model training method provided by this embodiment can be combined with the cystic lung cancer image recognition method provided by the above embodiment, or can be performed separately, and the present disclosure does not limit this.
[0067] See also Figure 2 , Figure 2 This is a flow chart of a lung recognition model training method provided by an embodiment of the present disclosure. The method provided by this embodiment is executed by a computer or a server. The method provided by the present disclosure includes:
[0068] Step 201: Obtain a sample image set.
[0069] The sample image set includes: a cystic lung cancer sample image and a non-cystic lung cancer sample image. The images included in the sample image set may be referred to as sample images. A cystic lung cancer sample image means that the lungs in the sample image have a cystic lung cancer structure. A non-cystic lung cancer sample image means that the lungs in the sample image do not have a cystic lung cancer structure. The sample images included in the sample image set may be chest CT enhanced scans of multiple objects.
[0070] Optionally, the non-cystic lung cancer sample images include bulla sample images and other sample images. Among them, the bulla sample image refers to the lungs in the sample image having bulla structures. Other sample images refer to the lungs in the sample image not having cystic lung cancer structures and bulla structures. Accordingly, the lung recognition model is used to identify whether the type of the input image to be recognized is a cystic lung cancer image, a bulla image, or another lung image.
[0071] Step 203: Use the sample image set to train the initial lung recognition model until the initial lung recognition model converges to obtain a lung recognition model.
[0072] The lung recognition model is used to identify whether the type of the input image to be recognized is a cystic lung cancer image. The lung recognition model includes a large kernel deep convolution module and an attention module.
[0073] The large-kernel deep convolution module is a multi-branch network that can deeply extract lung features in the image to be identified.
[0074] The attention module is used to enhance the useful features in the feature map obtained by the deep convolution module and suppress useless features by learning appropriate weights, thereby improving the performance of the lung recognition model and improving the recognition accuracy of the lung recognition model.
[0075] Furthermore, the attention module may include but is not limited to a channel attention submodule and a spatial attention submodule. The channel attention submodule is used to perform attention calculation in the channel dimension. The spatial attention submodule is used to perform attention calculation in the spatial dimension. The lung recognition model includes a large kernel deep convolution module, a channel attention submodule and a spatial attention submodule connected in sequence.
[0076] Optionally, the structure of the large-kernel deep convolution module can be an InceptionNeXt network.
[0077] Optionally, the structure of the attention module can be a GAM network.
[0078] In this embodiment, an initial lung recognition model is built in advance through a large-core deep convolutional network and an attention network, and a sample image set containing cystic lung cancer sample images and non-cystic lung cancer sample images is input into the initial lung recognition model for training until the initial lung recognition model converges to obtain a lung recognition model. Lung cancer images usually contain a lot of details and complex structures. The attention network can help the network better capture global information, which is very important for the analysis of the overall morphology and structural characteristics of lung lesions. Early lesions of lung cancer may be very small. The attention network can have good sensitivity to small and local features in the input image, can better capture these small features, and improve the accuracy of lesion detection. In medical image segmentation, the introduction of global information can help the segmentation model better distinguish between tumors and normal tissues. The global features provided by the attention network help understand the overall structure of the image and improve the accuracy of lesion segmentation. The large-core deep convolutional network is a multi-branch structure. The addition of the attention network can better fuse local and global features, so that the features extracted by different branches can effectively interact in a global range, enhance the fusion of local and global features of the image, improve the expression ability of image features, and improve the accuracy of the lung recognition model in identifying cystic lung cancer images.
[0079] On the basis of the above embodiment, further, step 201 may further include the following step 202. Accordingly, step 203 may be implemented by the following step 2031.
[0080] Step 202: Perform denoising and enhancement processing on the sample image set in sequence to obtain a processed sample image set.
[0081] Optionally, denoising can be performed using a spatial domain denoising method.
[0082] Furthermore, a non-local mean filtering method can be used to perform spatial domain denoising. Denoising can be performed using the following formula (3).
[0083]
[0084] Wherein, Ω refers to the sample image domain in the sample image set; i is the index of the sample image in the sample image set; Ω i is a search area with a center pixel i and a size of q×q; ω(i,j) represents the weight assigned to the noise image.
[0085] Optionally, the image can be enhanced by histogram equalization, calculating the grayscale histogram and equalizing the grayscale histogram. The histogram equalization can be performed by the following formula (4):
[0086]
[0087] Among them, r k Represents the scattered gray level, n k Represents the image with r k The number of grayscale pixels, n represents the total number of image pixels, That is the frequency; grayscale histogram equalization: use the cumulative distribution function as the grayscale transformation function, the formula is: F X (x) = P (X ≤ x).
[0088] Step 2031: Use the processed sample image set to train the initial lung recognition model until the initial lung recognition model converges to obtain a lung recognition model.
[0089] In this embodiment, the sample image set is subjected to spatial domain denoising by a non-local mean filtering method. The non-local mean filtering takes into account the non-local similarity in the sample image and only performs weighted averaging on pixels similar to the current pixel, thereby better retaining the detailed information of the sample image. In addition, by utilizing the non-local similarity in the sample image, the noise level of each pixel can be estimated more accurately, achieving a better denoising effect, thereby improving the effect of model training and the accuracy of model recognition.
[0090] The sample image after denoising is enhanced by histogram equalization. The calculation speed of histogram equalization is relatively fast, and no additional parameter adjustment or training is required. It can be directly applied to the sample image without involving complex models or algorithms. This makes the enhancement process simple and fast, thereby improving the effect of model training and the accuracy of model recognition.
[0091] The above method is described below with reference to a specific example.
[0092] See also Figure 3 , Figure 3 The flowchart of a method for differential diagnosis of cystic lung cancer and pulmonary bullae based on CT images provided in the present disclosure is shown in FIG. The method provided in this embodiment can be executed by a computer or a server. The method for differential diagnosis of cystic lung cancer and pulmonary bullae based on CT images provided in this embodiment corresponds to the above Figure 1 and Figure 2 The method provided in this embodiment includes:
[0093] S1. Collect and organize chest CT enhanced scan images of patients with cystic lung cancer and bullae, and patients without cystic lung cancer and bullae.
[0094] S1 specifically includes chest CT enhanced scan images of patients with cystic lung cancer and bullae, as well as patients without cystic lung cancer and bullae, collected using resampling processing. When collecting images, different scanners or different acquisition protocols usually produce data sets with different voxel spacings, so we need to make the voxel spacing of all images consistent.
[0095] S2. The three types of chest CT enhanced scans collected and sorted are denoised using the spatial domain denoising method.
[0096] S2 specifically includes using a non-local mean filtering method to perform spatial domain denoising, and its formula is as follows: Formula (5) is:
[0097]
[0098] Among them, Ω represents the image domain, i is the index of the image, and Ω i is a search area with a center pixel i and a size of q×q, ω(i,j) represents the weight assigned to the noise image, where ω(i,j) can be obtained by the following formula (6).
[0099]
[0100] Wherein, d(i,j) can be obtained by the following formula (7).
[0101]
[0102] Where h represents the filter coefficient that controls the smoothness of the filter, N(i) and N(j) represent the image blocks with pixel center points i and j respectively; d(i,j) represents the Euclidean weighted distance between image blocks N(i) and N(j), and α represents the standard deviation of the Gaussian kernel, α>0.
[0103] S3. Perform image enhancement processing on the three chest CT enhanced scan images after the denoising process in S2.
[0104] In S3, the image is enhanced by using histogram equalization processing, the grayscale histogram is calculated, and the grayscale histogram is equalized, wherein the value of the histogram can be obtained by the following formula (8).
[0105]
[0106] Among them, r k Represents the scattered gray level, n k Represents the image with r k The number of grayscale pixels, n represents the total number of image pixels, That is the frequency; grayscale histogram equalization: use the cumulative distribution function as the grayscale transformation function, the formula is: F X (x) = P (X≤x).
[0107] S4. Input the images processed by S3 into the Inception-GAMnet network for model training, and finally obtain the classification of patients with cystic lung cancer, patients with pulmonary bullae, and other patients.
[0108] The specific details in S4 are as follows Figure 4 As shown in Figure 1, the image processed by S3 is input into the Inception-GAMnet network. First, a convolution with a step size of 4 and a size of 4 is used to downsample its size, and then it enters the Inception Block1. The InceptionNext Block uses the Inception Depthwise Convolution group convolution method as follows: first, the image channel dimension is divided into 4 groups, and these four groups of features are respectively subjected to different operators using the following formula (9).
[0109]
[0110]
[0111] X' id =X id
[0112] Among them, X hw , X w , X h and X id Represents four different dimensional channels divided by h and w, h represents the dimension height, w represents the dimension width, X id bypass channel, g is the channel number of the convolution branch, k s represents the size of the small rectangular kernel (Kernel) which is set to 3 by default, k b represents the default large kernel size of 11. Finally, the output of each group is concatenated and normalized as shown in formula (10) and formula (11).
[0113] X'=Concat(X' hw ,X' w ,X' h ,X i ' d ) Formula (10)
[0114] Y=Norm(X') formula (11)
[0115] The normalized feature Y is input into an artificial intelligence multi-layer perceptron (MLP) module consisting of two fully connected layers, where the MLP ratio = 4 and an activation function (GELU) is sandwiched between the two layers.
[0116] At the same time, a Short-cut connection is adopted, which can be expressed by the following formula (12).
[0117]
[0118] After performing the above operations three times, enter the GAM module as follows Figure 5 As shown in Figure 2, GAM is divided into a channel attention module and a spatial attention module. Represents an element-wise multiplication operation.
[0119] In the channel attention module Figure 6 As shown in the figure, it is a sequence module containing linear layers and ReLU. The input tensor is transformed in dimension, and the channel dimension is placed in the last dimension. It performs attention calculation on the input channel dimension through two linear layers, reduces the number of input channels to 1 / rate times of the original, and then expands it back to the original number of channels. The purpose of the entire channel attention mechanism is to improve the performance of the model by learning appropriate weights to weight different channels in the input feature map to enhance useful features and suppress useless features.
[0120] like Figure 7 As shown in the figure, the spatial attention module includes convolutional layers, batch normalization layers, and ReLU. It uses the convolutional layer to perform attention calculations on the spatial dimensions of the input, reducing the number of input channels to 1 / rate times the original number, and then passes through another convolutional layer to obtain the final number of output channels. The spatial attention module weights the feature map by attention weights to highlight important spatial features. The final output tensor has the same spatial dimensions as the input.
[0121] After the first GAM, a 2×2 convolution is used for downsampling, and then enters InceptionBlock2. Inception Block2 is the same as Inception Block1. Similarly, after another GAM, a 2×2 convolution downsampling operation is performed, and enters Inception Block3. InceptionNext Block is repeated 9 times in Inception Block3, and then a 2×2 convolution downsampling operation is performed before entering Inception Block4. In Inception Block4, MLP ratio = 3 and the rest is the same as Inception Block1. Finally, after global average pooling and classification layer (SoftMax) classification, it is predicted whether the patient is a patient with pulmonary bullae, a patient with cystic lung cancer, or other patients. SoftMax is used for classification respectively. The formula is:
[0122]
[0123] Its cross entropy function is as follows: Formula (14).
[0124]
[0125] Among them, z j is the output value of the jth node, y c represents the true value, C is the number of output nodes, that is, the number of classification categories3,p c is softmax(z j ) value. The cross entropy function is used to output the loss value, which is used for subsequent back propagation to calculate the gradient and update the weight, and finally complete the classification of patients with bullous lung cancer, patients with cystic lung cancer, and other patients.
[0126] The Inception Depthwise Convolution included in the InceptionNeXt network effectively speeds up the model. The Inception-GAMnet network proposed in this paper adds the GAM module on the basis of the InceptionNeXt network. The purpose of the channel attention mechanism is to weight different channels in the input feature map by learning appropriate weights to enhance useful features and suppress useless features, and the spatial attention module weights the feature map by attention weights to highlight important spatial features, thereby improving the performance of the model.
[0127] In this embodiment, global information extraction of feature expression can be performed: lung cancer images usually contain a lot of details and complex structures. The GAM module can help the network better capture global information, which is very important for the analysis of the overall morphology and structural characteristics of lung lesions.
[0128] Enhance the fusion of local and global features of the image: The InceptionNeXt structure itself is a multi-branch structure. Adding the GAM module can better integrate local and global features. The GAM module integrates the features of all channels through global average pooling, so that the features extracted by different branches can effectively interact in the global range, improving the expressiveness of image features.
[0129] Enhanced sensitivity to tiny lesions: Early lesions of lung cancer may be very tiny, which requires the model to have good sensitivity to tiny, local features in the image. The GAM module can help the network better capture these tiny features and improve the accuracy of lesion detection.
[0130] Improve the accuracy of lesion segmentation: In medical image segmentation, the introduction of global information can help the segmentation model better distinguish between tumors and normal tissues. The global features provided by the GAM module help the segmentation model better understand the overall structure of the image.
[0131] Based on the above Figure 1 In the corresponding embodiment of the method for recognizing cystic lung cancer images, the embodiment of the present disclosure also provides a computer-readable storage medium. For example, the non-temporary computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. The storage medium stores computer instructions for executing the above Figure 1 The method for identifying cystic lung cancer images described in the corresponding embodiment will not be repeated here.
[0132] Based on the above Figure 2 In accordance with the training method of the lung recognition model described in the corresponding embodiment, the embodiment of the present disclosure also provides a computer-readable storage medium, for example, a non-temporary computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. The storage medium stores computer instructions for executing the above Figure 2 The training method of the lung recognition model described in the corresponding embodiment will not be repeated here.
[0133] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0134] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
Claims
1. A method for identifying cystic lung cancer images, characterized in that: include: Acquire an image to be identified, wherein the image to be identified includes a lung image of a target object; The image to be identified is input into a lung recognition model to obtain a recognition result of the image to be identified, wherein the lung recognition model includes a large-kernel deep convolution module and an attention module; the recognition result of the image to be identified is used to indicate whether the type of the image to be identified is a cystic lung cancer image.
2. The method according to claim 1, characterized in that The recognition result of the image to be recognized includes: the type of the image to be recognized is a cystic lung cancer image, the type of the image to be recognized is a bullous lung image, or the type of the image to be recognized is other lung images.
3. The method according to claim 1, characterized in that The attention module includes: a channel attention submodule and a spatial attention submodule; the channel attention submodule is used to perform attention calculation in the channel dimension; the spatial attention submodule is used to perform attention calculation in the spatial dimension; the lung recognition model includes a large-kernel deep convolution module, a channel attention submodule and a spatial attention submodule connected in sequence.
4. The method according to claim 1, characterized in that Before inputting the image to be identified into the lung recognition model to obtain the recognition result of the image to be identified, the method further includes: Performing denoising and enhancement processing on the image to be identified in sequence to obtain a processed image; The step of inputting the image to be identified into the lung recognition model to obtain the recognition result of the image to be identified includes: The processed image is input into a lung recognition model to obtain a recognition result of the image to be recognized.
5. The method according to claim 1, characterized in that The method further comprises: Acquire a sample image set, the sample image set comprising: sample images of cystic lung cancer and sample images of non-cystic lung cancer; The initial lung recognition model is trained using the sample image set until the initial lung recognition model converges to obtain a lung recognition model.
6. A method for training a lung recognition model, characterized in that: include: Acquire a sample image set, wherein the sample image set includes: sample images of cystic lung cancer and sample images of non-cystic lung cancer; The initial lung recognition model is trained using the sample image set until the initial lung recognition model converges to obtain a lung recognition model; the lung recognition model includes a large-kernel deep convolution module and an attention module; the lung recognition model is used to identify whether the type of the input image to be recognized is a cystic lung cancer image.
7. The method according to claim 6, characterized in that After obtaining the sample image set, the method further includes: performing denoising and enhancement processing on the sample image set in sequence to obtain a processed sample image set; The using the sample image set to train the initial lung recognition model until the initial lung recognition model converges to obtain the lung recognition model comprises: The processed sample image set is used to train the initial lung recognition model until the initial lung recognition model converges to obtain a lung recognition model.
8. The method according to claim 6, characterized in that The non-cystic lung cancer sample images include bulla sample images and other sample images; the lung recognition model is used to identify whether the type of the input image to be recognized is a cystic lung cancer image, a bulla image or other lung image.
9. The method according to claim 6, characterized in that The attention module includes: a channel attention submodule and a spatial attention submodule; the channel attention submodule is used to perform attention calculation in the channel dimension; the spatial attention submodule is used to perform attention calculation in the spatial dimension; the lung recognition model includes a large-kernel deep convolution module, a channel attention submodule and a spatial attention submodule connected in sequence.
10. A computer-readable storage medium, characterized in that: The storage medium stores at least one computer instruction, which is loaded and executed by the processor to implement the steps performed in the method for identifying cystic lung cancer images described in any one of claims 1 to 5, or the steps performed in the method for training a lung recognition model described in any one of claims 6 to 9.
Citation Information
Cited By
Lung focus identification method and system based on image deep learning
CN120388005A