CT image classification method based on image segmentation and RU classifier and application thereof
By using a combination of image segmentation network and Rockafellar-Uryasev classifier in lung cancer CT image classification, and using deep supervision and attention mechanisms, the problem of insufficient robustness and overfitting in the existing technology is solved, and the accuracy of lung cancer CT image classification is improved. Accuracy and predictive reliability.
Patent Information
- Application Number
- CN202410681875.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-05-29
AI Technical Summary
Existing survival prediction technology has problems of insufficient robustness, overfitting, and insufficient generalization ability in lung cancer CT image classification. In particular, underfitting and overfitting problems under small sample data sets are difficult to solve.
A CT image classification method based on image segmentation and Rockafellar-Uryasev (RU) classifier is adopted. By constructing a segmentation network model and RU classifier, combined with deep supervision and attention mechanism, the Rockafellar-Uryasev loss function is used to enhance the generalization ability of the model. and robustness.
It improves the accuracy of CT image classification and the reliability of prediction, enhances the generalization ability of the network, reduces under-fitting and over-fitting problems, and improves the classification performance under small sample data.
Smart Images

Figure CN118762041A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical image technology, and more specifically, to a CT image classification method based on image segmentation and RU classifier and its application. Background Art
[0002] Lung cancer is one of the most common malignant tumors in the world. Among them, non-small cell lung cancer accounts for about 80% of all lung cancers. About 75% of patients are already in the middle or advanced stage when they are discovered, and the 5-year survival rate is very low. Non-small cell lung cancer includes squamous cell carcinoma (SCC), adenocarcinoma, and large cell carcinoma. Compared with small cell carcinoma, non-small cell lung cancer cells grow and divide more slowly, and spread and metastasize relatively late, but they may not be easy to detect in the early stages. Diagnosis is usually made through imaging examinations (such as CT scans). Treatment options depend on the severity of the disease and the patient's overall health. The prognosis of non-small cell lung cancer is of great significance for treatment options and patient management.
[0003] Medical analysis of lung cancer mainly uses Radiomics to extract imaging features, and then uses machine learning methods to predict patient survival. Current feature extraction technology relies on doctors to manually annotate patients' CT images, which takes a lot of time and resources. Therefore, deep learning methods can automatically identify features in medical images and further predict survival, thereby reducing the burden of manual analysis for doctors, helping doctors to diagnose medical images more accurately and quickly, thereby improving the quality and efficiency of medical services.
[0004] The characteristics of lung tumor images are low contrast, unclear edges between tissues, different lesion sizes and shapes, and variable lesion locations. Feature extraction in medical images generally uses image segmentation methods. Currently, medical image segmentation methods are mainly divided into traditional methods and deep learning methods.
[0005] The prior art includes: 1) Threshold-based segmentation method: This method segments the image based on the relationship between the pixel grayscale value and the preset threshold. It is simple and easy to implement, such as the maximum inter-class variance method (Otsu method). However, since the pixel difference between lung tumors and tissues is not large, the threshold-based segmentation method is not suitable for segmenting lung tumors.
[0006] 2) Edge-based segmentation method: This method uses differential operators to detect edges in the image for segmentation. Common ones include Sobel operator, Canny edge detection, etc. However, these methods are sensitive to contours, and the edges of lung tumors are not clear, so the segmentation effect is not good.
[0007] 3) Region-based segmentation method: This method divides the image into different regions according to the similarity criterion. There are mainly seed region growing method, region splitting and merging method, watershed method, etc.
[0008] With the improvement of computing power and the rapid development of deep learning methods, the more complex the task scenario, the better the deep learning-based methods are than traditional segmentation methods. Deep learning methods can learn deeper image features through training with a large amount of labeled data, so as to obtain segmentation targets more accurately. Among them, UNet is a classic convolution-based neural network, which is widely used in medical image segmentation tasks. The main structure of the UNet network includes an encoder and a decoder, and a jump connection method is designed to enable the network to fuse multi-scale information at different levels. Most of the existing medical segmentation networks are improved on the basis of the UNet structure. However, due to the problem of small receptive field of the UNet convolution structure, this method may have difficulties in processing some segmentation tasks with global context information, especially for larger targets or image structures with long-range dependencies. Vision Transformer (ViT) is a Transformer-based structure that treats the image as a two-dimensional sequence and treats each pixel or image block as an element in the sequence. By serializing the image, the self-attention mechanism of the Transformer model can be used to capture the relationship and contextual information between pixels, which effectively solves the problem of convolution receptive field. However, the parameters of ViT models are huge, and their advantages over convolutional networks cannot be reflected without a large amount of data. In this case, since the data is insufficient to support large-scale training of ViT models, the model may be overfitted or lack generalization ability.
[0009] Different radiomic features have a significant impact on the survival prediction of patients. Machine learning methods such as random forest (RF) are often used to achieve classification prediction of patient survival status within a specified time. Studies have shown that combining radiomics and patient clinical characteristics can effectively improve prediction performance. Existing prediction methods are mainly white box algorithms, including logistic regression (Logistic), support vector machine (SVM), etc., which can provide good interpretability, but the performance is often insufficient. Weighted and integrated methods have certain potential for improving model performance, but still lack robustness.
[0010] Since the radiomic features obtained after lung tumor image segmentation have the characteristics of small sample and high dimension, black box algorithms can usually achieve higher prediction accuracy on such data sets. Generally speaking, neural networks (ANN) can capture complex patterns and associations in the data and automatically learn the features in the data to achieve more accurate classification predictions. However, in small sample data sets, uneven classification and data sampling bias may lead to more serious underfitting or overfitting.
[0011] In summary, how to combine the calculation method in Rockafellar-Uryasev (RU) loss to solve the problems of lack of robustness, overfitting, and insufficient generalization ability of prediction technology is a technical problem that needs to be solved urgently in this technical field. Summary of the invention
[0012] In order to solve the problems of lack of robustness, overfitting and insufficient generalization ability of existing survival prediction technologies, the present invention provides a CT image classification method based on image segmentation and RU classifier and its application, which has the characteristics of high prediction accuracy.
[0013] In order to achieve the above-mentioned purpose of the present invention, the technical scheme adopted is as follows: A CT image classification method based on image segmentation and RU classifier includes the following specific steps: Collecting CT images of several patients, preprocessing the CT images, and converting the preprocessed CT images into two-dimensional images to obtain a CT image set; Construct a segmentation network model consisting of a symmetrical encoder, decoder, and feature fusion layer; Input the CT image set into the segmentation network model for training; Obtain the predicted segmentation map of the CT image set through the trained segmentation network model; extract the radiomics features of the predicted segmentation map; Constructing an RU classifier using Rockafellar-Uryasev loss; the RU classifier includes a parallel binary classification prediction model Branching and including helper functions Branches; The radiomics features were input into the RU classifier for training; The CT images to be predicted are acquired and preprocessed, and the survival classification results are generated through the trained segmentation network model and RU classifier in turn.
[0014] Preferably, the CT image is preprocessed and the preprocessed CT image is converted into a two-dimensional image to obtain a CT image set, specifically: Merge the GTV labels of each patient in the CT image; make the size and interval of each slice in the CT image the same to obtain a CT image set; The CT image set is divided into a training set and a test set; the three-dimensional data in the training set and the test set are divided into two-dimensional images according to the cross section; the window position and window width of the two-dimensional image are set to make the cancer area stand out in the image; the picture and label of the two-dimensional image are centrally cropped; The data in the training set are randomly flipped horizontally, rotated at a small angle, and scaled to random sizes.
[0015] Furthermore, the coding layer includes n coding convolutional layers with downsampling layers and 1 intermediate layer; each coding convolutional layer is composed of the same convolutional structure, including a basic convolutional module and a ResCBAM module; The basic convolution module CBG includes a cascaded 3×3 convolution, batch normalization BN, and an activation function layer; the ResCBAM module includes a CBAM module and a residual connection module; In each encoding convolutional layer, the output of the basic convolutional module is connected to the input of the ResCBAM module; the output of the ResCBAM module is connected to the downsampling layer; The downsampling layer of the 1st to n-1th convolutional layers is connected to the input of the basic convolutional module of the next convolutional layer; the downsampling layer of the nth convolutional layer is connected to the input of the intermediate layer.
[0016] Furthermore, the decoder includes n decoding convolutional layers with upsampling layers and feature fusion layers corresponding to the n encoding convolutional layers and 1 1×1 convolution; each decoding convolutional layer is composed of the same convolutional structure, including a basic convolutional module and a ResCBAM module; The basic convolution module CBG includes a cascaded 3×3 convolution, batch normalization BN, and an activation function layer; the ResCBAM module includes two basic convolution modules, a CBAM module, and a residual connection module connected in sequence; the feature fusion layer includes a 1×1 convolution and an upsampling layer; In each decoding convolutional layer, the output of the basic convolutional module is connected to the input of the ResCBAM module; the input of the basic convolutional module is connected to the upsampling layer; the output of the ResCBAM module is connected to the input of its corresponding feature fusion layer; The upsampling layers of the 1st to n-1st convolutional layers are connected to the output of the ResCBAM module of the corresponding coding convolutional layer and the output of the ResCBAM module of the previous convolutional layer; the upsampling layers of the nth convolutional layer are connected to the output of the ResCBAM module of the nth coding convolutional layer and the output of the intermediate layer; the output of the nth feature fusion layer .., n, after concatenation, 1×1 convolution is performed to obtain the final output .
[0017] Furthermore, the CBAM module is a convolutional attention module; after the features are input into the ResCBAM module, the specific processing steps are as follows: Assume that the dimension of the data input to the ResCBAM module is (C, H, W), and process the feature input through two basic convolution modules in sequence to obtain the input features; Input the input features into the CBAM module, and perform the attention mechanism operation from the channel dimension and spatial dimension in turn: In the channel dimension, the input feature is changed from (C, H, W) dimension to (C, 1, 1) dimension; the two features output by the maximum pooling layer and the average pooling layer are spliced together to obtain a spliced feature with a dimension of (2, H, W); the spliced feature is input into the MLP layer to obtain a feature with a result dimension of (1, H, W). The MLP layer is a 1×1 convolution of the compressed channel, an activation function, and a 1×1 convolution of the expanded channel; the Sigmoid function is used to convert it into a probability at the spatial level, and multiplied with the input feature to obtain the feature after channel attention adjustment; In the spatial dimension, after two parallel maximum pooling layers and average pooling layers, the features after channel attention adjustment are changed from (C, H, W) dimensions to (C, 1, 1) dimensions; the two features output by the maximum pooling layer and the average pooling layer are respectively input into the shared MLP layer to keep the output and input dimensions consistent; the two features output by the MLP layer are added together, and the dimension is (C, 1, 1). The MLP layer is a convolution operation with an output channel of 1, a convolution kernel of 7, and a padding of 3; the Sigmoid function is used to convert it into a probability at the channel level, and multiplied with the features after channel attention adjustment to obtain the features after spatial attention adjustment; the features after spatial attention adjustment are used as the output of the CBAM module; The residual connection module adds the data input to the ResCBAM module and the output of the CBAM module to obtain the output of the ResCBAM module.
[0018] Furthermore, when the CT image set is input into the segmentation network model for training, a deep supervision method is introduced for training; During training, the total loss function used is:
[0019] in, For the corresponding .., n assigned weight; Loss function:
[0020] Among them, X is the predicted probability map , Y is the true label, H is the input image length, and W is the input image width; After training, the test set is used to test the output results of the trained segmentation network model. The test was conducted with the following evaluation indicators:
[0021] Values greater than 0.5 are set as foreground, and values less than 0.5 are set as background.
[0022] Furthermore, the radiomics features of the predicted segmentation map are extracted, specifically: the predicted segmentation maps are stacked and restored into three-dimensional nii data, and Radiomics is used to extract the radiomics features of each patient to obtain three-dimensional data.
[0023] Furthermore, the Branches and Each branch includes the first hidden layer, ReLU activation function, and the second hidden layer; Input radiomics features into RU classifier for training. The specific steps are as follows: Assume that the input layer of the RU classifier includes the radiomics features and its corresponding binary classification label , perform linear transformation on the input layer; exist In the branch, the linear change To the first hidden layer, the ReLU activation function is used for the output of the first hidden layer and learning is performed; the output of the first hidden layer is used as input, linearly transformed and output to the second hidden layer, and the ReLU activation function is used to introduce nonlinearity and learn the output of the second hidden layer; learning generates an output layer composed of a linear transformation and a Sigmoid activation function, where the linear transformation is mapped to a single neuron, that is, the output layer dimension is 1, and the Sigmoid function scales the output to the range [0,1], representing the predicted probability of the binary classification task, and the prediction for a value greater than 0.5 is "death", and the prediction for a value less than or equal to 0.5 is "survival"; exist In the branch, the linear change To the first hidden layer, the output of the first hidden layer is activated by the ReLU function and learned; the output of the first hidden layer is used as input, linearly transformed and output to the second hidden layer, and the output of the second hidden layer is activated by the ReLU function to introduce nonlinearity and learn; learning generates an output layer composed of linear transformations, where the linear transformations are mapped to a single neuron, that is, the output layer dimension is 1; Branches and The branches output prediction probabilities respectively and parameters ; Then, according to , and binary classification labels The Rockafellar-Uryasev loss is calculated based on the value of ; next, the iterative training is performed with the goal of minimizing the loss, and finally the optimal prediction value is obtained.
[0024] Furthermore, the Rockafellar-Uryasev loss is specifically:
[0025] in, For the The radiomics feature vector of samples, To indicate the corresponding The real two-category label, is a non-negative hyperparameter, For the Sample The predicted result of the branch, For the Sample The output parameters of the branch, Defined as binary cross entropy loss:
[0026] also, It is a rectified linear unit, which is used to improve the joint expression ability of the two prediction branches in the RU classifier. Specifically:
[0027] also, It is a rectified linear unit, which is used to improve the joint expression ability of the two prediction branches in the RU classifier. Specifically:
[0028] The goal of learning is ; When the expectation of all in-sample losses When it reaches the minimum, it means that the classification prediction performance is the best: .
[0029] An application of a CT image classification method based on image segmentation and RU classifier for lung cancer survival classification.
[0030] The beneficial effects of the present invention are as follows: The present invention discloses a CT image classification method based on image segmentation and RU classifier. The present invention first proposes a segmentation network model for lung cancer images for CT images of lung cancer patients, assigns different weights to each position of the feature map, enhances the network's ability to obtain global information and the ability to express features, and the residual connection and deep supervision methods make the network easier to converge, thereby enhancing the generalization ability of the network and improving the accuracy of segmentation; furthermore, the present invention proposes an RU classifier using Rockafellar-Uryasev loss, thereby increasing the degree of freedom of the model, solving to a certain extent the problem of underfitting and overfitting of the neural network caused by uneven classification and data sampling bias in small sample data sets, and improving the reliability of prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a flowchart of a CT image classification method based on image segmentation and RU classifier of the present invention. Figure 2 This is the image obtained after the two-dimensional image in Example 2 is labeled.
[0032] Figure 3 This is the image obtained after windowing the two-dimensional image in Example 2.
[0033] Figure 4 It is a schematic diagram of the segmentation network model. Figure 5 It is a schematic diagram of the channel attention dimension of the CBAM module.
[0034] Figure 6 It is a schematic diagram of the spatial attention dimension of the CBAM module.
[0035] Figure 7 This is a schematic diagram of the CBAM module in Example 2.
[0036] Figure 8 Schematic diagram of the middle layer in Example 2.
[0037] Fig. 9 This is a schematic diagram of the ResCBAM module in Example 2.
[0038] Fig.10 This is a schematic diagram of the basic convolution module in Example 2.
[0039] Fig.11 This is a schematic diagram of the RU classifier in Example 3.
[0040] Fig.12 This is the two-dimensional image of lung cancer in Example 4.
[0041] Fig.13 This is the two-dimensional image of lung cancer after preprocessing in Example 4.
[0042] Fig.14 It is the predicted segmentation map in Example 4.
[0043] Fig.15 This is a visualization result diagram of the ROC curve obtained after the RU classifier in Example 4 is applied to the test set. DETAILED DESCRIPTION
[0044] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0045] Example 1 like Figure 1 As shown, a CT image classification method based on image segmentation and RU classifier includes the following specific steps: Collect lung cancer CT images of several patients, preprocess the lung cancer CT images, and convert the preprocessed CT images into two-dimensional images to obtain a CT image set; Construct a segmentation network model consisting of a symmetrical encoder, decoder, and feature fusion layer; Input the CT image set into the segmentation network model for training; Obtain the predicted segmentation map of the CT image set through the trained segmentation network model; extract the radiomics features of the predicted segmentation map; Constructing an RU classifier using Rockafellar-Uryasev loss; the RU classifier includes a parallel binary classification prediction model Branching and including helper functions Branches; The radiomics features were input into the RU classifier for training; The lung cancer CT images to be predicted are acquired and preprocessed, and the survival classification results are generated through the trained segmentation network model and RU classifier in turn.
[0046] Example 2 More specifically, in a specific embodiment, the CT image is preprocessed, and the preprocessed CT image is converted into a two-dimensional image to obtain a CT image set, specifically: Merge the GTV labels of each patient in the CT image; make the size and interval of each slice in the CT image the same to obtain a CT image set; The CT image set is divided into a training set and a test set; the three-dimensional data in the training set and the test set are divided into two-dimensional images according to the cross section; the window position and window width of the two-dimensional image are set to make the cancer area stand out in the image; the picture and label of the two-dimensional image are centrally cropped; The data in the training set are randomly flipped horizontally, rotated at a small angle, and scaled to random sizes.
[0047] In this embodiment, Figure 2 , Figure 3 As shown, the present invention uses GTV labels in three-dimensional CT images of patients with non-minimal cell lung cancer. For each patient with multiple GTVs, they are merged together. All slice sizes of the data set are (512, 512) and spacing is (0.977, 0.977, 3.0).
[0048] The patients were divided into training set and test set in a ratio of 8:2. Then the 3D data was divided into 2D images according to the cross section. Since the CT value range of the image data was greater than 3000, in order to make the cancer area more prominent in the image and eliminate unnecessary interference, the window level was set to 0 and the window width was set to 1000. Figure 2 An example of labeling the original image. Figure 3 is the windowed image.
[0049] In this embodiment, in order to reduce redundant calculations, the image and label are center-cropped, and the size after cropping is (256, 256). The input image is the above-mentioned single-channel image. In order to increase sample diversity, the training set data is randomly horizontally flipped, rotated at a small angle, and randomly scaled. After network prediction, a single-channel probability map is output, and those greater than 0.5 are foregrounds, and those less than 0.5 are backgrounds.
[0050] In a specific embodiment, Figure 4 As shown, the coding layer includes n coding convolution layers with downsampling layers and 1 intermediate layer; each coding convolution layer is composed of the same convolution structure, including a basic convolution module and a ResCBAM module; The basic convolution module CBG includes a cascaded 3×3 convolution, batch normalization BN, and an activation function layer; the ResCBAM module includes a CBAM module and a residual connection module; In each encoding convolutional layer, the output of the basic convolutional module is connected to the input of the ResCBAM module; the output of the ResCBAM module is connected to the downsampling layer; The downsampling layer of the 1st to n-1th convolutional layers is connected to the input of the basic convolutional module of the next convolutional layer; the downsampling layer of the nth convolutional layer is connected to the input of the intermediate layer.
[0051] In this embodiment, in order to alleviate the problem of neuron death and improve the expressiveness of the model, the GELU activation function is adopted.
[0052] In a specific embodiment, the decoder includes n decoding convolutional layers with upsampling layers and feature fusion layers corresponding to the n encoding convolutional layers and 1 1×1 convolution; each decoding convolutional layer is composed of the same convolutional structure, including a basic convolutional module and a ResCBAM module; like Fig.10 As shown, the basic convolution module CBG (Conv) includes a cascaded 3×3 convolution, batch normalization BN, and activation function layer GELU; Fig. 9 As shown, the ResCBAM module includes two basic convolution modules, a CBAM module, and a residual connection module connected in sequence; the feature fusion layer includes a 1×1 convolution and an upsampling layer; In this embodiment, Figure 8 As shown, the middle layer (Mid Conv) includes two basic convolution modules connected in sequence.
[0053] In each decoding convolutional layer, the output of the basic convolutional module is connected to the input of the ResCBAM module; the input of the basic convolutional module is connected to the upsampling layer; the output of the ResCBAM module is connected to the input of its corresponding feature fusion layer; The upsampling layers of the 1st to n-1st convolutional layers are connected to the output of the ResCBAM module of the corresponding coding convolutional layer and the output of the ResCBAM module of the previous convolutional layer; the upsampling layers of the nth convolutional layer are connected to the output of the ResCBAM module of the nth coding convolutional layer and the output of the intermediate layer; the output of the nth feature fusion layer .., n, after concatenation, 1×1 convolution is performed to obtain the final output .
[0054] In a specific embodiment, in order to enable the convolution to learn the characteristic regions of cancer more attentively, the present invention introduces a CBAM module; the CBAM module is as follows Figure 7 As shown, the CBAM module is a convolutional attention module; after the features are input into the ResCBAM module, the specific processing steps are as follows: Assume that the dimension of the data input to the ResCBAM module is (C, H, W), and process the feature input through two basic convolution modules in sequence to obtain the input features; Input the input features into the CBAM module, and perform the attention mechanism operation from the channel dimension and spatial dimension in turn: like Figure 5As shown in the figure, in the channel dimension (Channel Attention), the input feature is changed from (C, H, W) dimension to (C, 1, 1) dimension; the two features output by the maximum pooling layer and the average pooling layer are spliced together to obtain a spliced feature with a dimension of (2, H, W); the spliced feature is input into the MLP layer to obtain a feature with a result dimension of (1, H, W). The MLP layer is a 1×1 convolution of the compressed channel, an activation function, and a 1×1 convolution of the expanded channel; the Sigmoid function is used to convert it into a probability at the spatial level, and multiplied with the input feature to obtain the feature after channel attention adjustment; In this embodiment, the MLP layer is a convolution operation with an output channel of 1, a convolution kernel of 7, and a padding of 3. The input result dimension is (1, H, W), which is converted into a probability at the spatial level by a Sigmoid function and multiplied by the input feature to achieve the effect of adjusting spatial attention. Due to too many convolution operations, in order to prevent network degradation, gradient disappearance and other problems, the present invention introduces the residual connection of the ResNet network, adds the input and the output of the ResCBAM module, and makes the network easier to optimize. The downsampling layers are all convolutions with a convolution kernel size of 2 and a step size of 2.
[0055] like Figure 6 As shown in the figure, in the spatial dimension (Spatial Attention), after two parallel maximum pooling layers and average pooling layers, the features after channel attention adjustment are changed from (C, H, W) dimensions to (C, 1, 1) dimensions; the two features output by the maximum pooling layer and the average pooling layer are respectively input into the shared MLP layer to keep the output and input dimensions consistent; the two features output by the MLP layer are added together, and the dimension is (C, 1, 1). The MLP layer is a convolution operation with an output channel of 1, a convolution kernel of 7, and a padding of 3; the Sigmoid function is used to convert it into a probability at the channel level, and multiply it with the features after channel attention adjustment to obtain the features after spatial attention adjustment; the features after spatial attention adjustment are used as the output of the CBAM module; In this embodiment, the MLP layer is a convolution operation with an output channel of 1, a convolution kernel of 7, and a padding of 3. The channel compression and expansion ratio is 16 times, that is, the output and input dimensions are kept consistent. The output adds the two results of the MLP layer output, the dimension is (C, 1, 1), and uses the Sigmoid function to convert it into a probability at the channel level, which is multiplied by the input feature to achieve the effect of adjusting spatial attention; The residual connection module adds the data input to the ResCBAM module and the output of the CBAM module to obtain the output of the ResCBAM module.
[0056] In this embodiment, the specific parameters of the coding layers of several layers are: 1) The first layer inputs image data x(1,256,256), which becomes (64,256,256) after a convolution module, and then enters the ResCBAM module to output the feature map h1(64,256,256); 2) The second layer inputs the feature map x(64,128,128), which becomes (128,128,128) after a convolution module, and then enters the ResCBAM module to output the feature map h2(128,128,128); 3) The third layer inputs the feature map x(128,64,64), which becomes (256,64,64) after a convolution module, and then enters the ResCBAM module to output the feature map h3(256,64,64). Downsampling layer: downsample h3 and output the feature map x(256,32,32).
[0057] 4) The fourth layer inputs the feature map x(256,32,32), which becomes (512,32,32) after a convolution module, and then enters the ResCBAM module to output the feature map h4(512,32,32).
[0058] Downsampling layer: downsample h4 and output feature map x(512,16,16).
[0059] The middle layer consists of two basic convolution blocks, of which the first convolution block realizes the expansion of the channel by a factor of 2. The detailed process of the middle layer is: input feature map x(512,16,16), input feature map x(1024,16,16).
[0060] In this embodiment, in several layers of decoding convolutional layers, the specific parameters are: 1) Input feature map x(1024,16,16), upsample x to (512,32,32), concatenate it with the fourth-layer feature map h4 to get feature map (1024,32,32), pass through a convolution module to get (512,32,32), then enter the ResCBAM module and output feature map de4(512,32,32).
[0061] 2) Input feature map de4 (512, 32, 32), upsample de4 to (256, 64, 64), and concatenate it with the third-layer feature map h3 to obtain feature map (512, 64, 64), which becomes (256, 64, 64) after a convolution module, and then enters the ResCBAM module to output feature map de3 (256, 64, 64).
[0062] 3) Input feature map x(256,64,64), upsample x to (128,128,128), concatenate it with the second-layer feature map h2 to get feature map (256,128,128), pass through a convolution module to get (128,128,128), then enter the ResCBAM module and output feature map de2(128,128,128).
[0063] 4) Input feature map x(128,128,128), upsample x to (64,256,256), concatenate it with the first-layer feature map h1 to get feature map (128,256,256), pass through a convolution module to get (64,256,256), then enter the ResCBAM module and output feature map de1(64,256,256).
[0064] Each feature fusion layer is a 1×1 convolution with an output channel of 1, followed by an upsampling with an upsampling factor of 256 divided by the feature map size. After concatenation, use 1×1 convolution to get the final output .
[0065] In this embodiment, the specific parameters of the feature fusion layer of several layers are: 1) The fourth layer feature map de4 (512, 32, 32) is obtained by 1×1 convolution to (1, 32, 32), and then by transposed convolution to obtain (1,256,256).
[0066] 2) The third layer feature map de3 (256, 64, 64) is obtained by 1×1 convolution to (1, 64, 64), and then by transposed convolution to obtain (1,256,256).
[0067] 3) The second layer feature map de2 (128, 128, 128) is obtained by 1×1 convolution to (1, 128, 128), and then by transposed convolution to obtain (1,256,256).
[0068] 4) The first layer feature map de1 (64, 256, 256) is obtained by 1×1 convolution (1, 256, 256), and then by transposed convolution to obtain (1,256,256).
[0069] 5) The concatenated feature map (4, 256, 256) is used for the final output using 1×1 convolution. (1,256,256).
[0070] In a specific embodiment, when the CT image set is input into the segmentation network model for training, a deep supervision method is introduced for training; During training, the total loss function used is:
[0071] in, For the corresponding .., n assigned weight; Loss function:
[0072] Among them, X is the predicted probability map , Y is the true label, H is the input image length, and W is the input image width; After training, the test set is used to test the output results of the trained segmentation network model. The test was conducted with the following evaluation indicators:
[0073] Values greater than 0.5 are set as foreground, and values less than 0.5 are set as background.
[0074] In a specific embodiment, the radiomics features of the predicted segmentation map are extracted, specifically: the predicted segmentation map is stacked and restored into three-dimensional nii data, and the radiomics features of each patient are extracted using Radiomics to obtain three-dimensional data.
[0075] The present invention proposes an end-to-end survival prediction method for lung cancer patients. For CT images of lung cancer patients, an original network structure targeted at lung cancer images is proposed. Spatial attention and channel attention are introduced in the convolution process, and different weights are given to each position of the feature map, which enhances the network's ability to obtain global information and its ability to express features. Residual connections and deep supervision methods make the network easier to converge, thereby enhancing the generalization ability of the network and improving the accuracy of segmentation.
[0076] Example 3 More specifically, in this embodiment, the present invention uses the t-year survival status of the patient from receiving treatment to death as the prediction target. This is a binary classification problem, that is, judging whether the patient's survival time exceeds t years, the result is "survival" (representing the "0" class) or "death" (representing the "1" class). The data set of the prediction part is still divided in a ratio of 8:2.
[0077] In a specific embodiment, the Branches and Each branch includes the first hidden layer, ReLU activation function, and the second hidden layer; like Fig.11As shown in the figure, the radiomics features are input into the RU classifier for training. The specific steps are as follows: The real distribution of the research target may deviate from the distribution of the given data set, so some new parameters need to be introduced to reduce these deviations, thereby increasing the flexibility of the model so that it can adapt to a wider or offset data set. Based on this, the present invention designs a binary classifier RU classifier with Rockafellar-Uryasev loss; the input layer of the RU classifier includes the radiomics feature and its corresponding binary classification label , perform linear transformation on the input layer; exist In the branch, the linear change To the first hidden layer, the ReLU activation function is used for the output of the first hidden layer and learning is performed; the output of the first hidden layer is used as input, linearly transformed and output to the second hidden layer, and the ReLU activation function is used to introduce nonlinearity and learn the output of the second hidden layer; learning generates an output layer composed of a linear transformation and a Sigmoid activation function, where the linear transformation is mapped to a single neuron, that is, the output layer dimension is 1, and the Sigmoid function scales the output to the range [0,1], representing the predicted probability of the binary classification task, and the prediction for a value greater than 0.5 is "death", and the prediction for a value less than or equal to 0.5 is "survival"; exist In the branch, the linear change To the first hidden layer, the output of the first hidden layer is activated by the ReLU function and learned; the output of the first hidden layer is used as input, linearly transformed and output to the second hidden layer, and the output of the second hidden layer is activated by the ReLU function to introduce nonlinearity and learn; learning generates an output layer composed of linear transformations, where the linear transformations are mapped to a single neuron, that is, the output layer dimension is 1; Branches and The branches output prediction probabilities respectively and parameters ; Then, according to , and binary classification labels The Rockafellar-Uryasev loss is calculated based on the value of ; next, the iterative training is performed with the goal of minimizing the loss, and finally the optimal prediction value is obtained.
[0078] In this embodiment, The branch is a conventional prediction model, which is used to obtain the decision result of the model; Branches are auxiliary functions of model decision making, used to provide more parameter space for biased data.
[0079] In a specific embodiment, the Rockafellar-Uryasev loss is specifically:
[0080] in, For the The radiomics feature vector of samples, To indicate the corresponding The real two-category label, is a non-negative hyperparameter, For the Sample The predicted result of the branch, For the Sample The output parameters of the branch, Defined as binary cross entropy loss:
[0081] also, It is a rectified linear unit, which is used to improve the joint expression ability of the two prediction branches in the RU classifier. Specifically:
[0082] also, It is a rectified linear unit, which is used to improve the joint expression ability of the two prediction branches in the RU classifier. Specifically:
[0083] The goal of learning is ; When the expectation of all in-sample losses When it reaches the minimum, it means that the classification prediction performance is the best: .
[0084] During model training, RU loss is used to measure the predicted output and auxiliary output Compared with the original loss function It provides more predictable parameter space, thereby enhancing the robustness of the model to biased sample data sets. It should be emphasized that the present invention does not need to explore the true distribution of the research target. The method can be flexibly adjusted according to the characteristics of different sampling distributions of the data set, and iterates through loops to find the optimal hyperparameters suitable for the current data set. , in order to obtain better experimental results or adapt to specific applications in reality.
[0085] The present invention extracts imaging features from Radiomics based on the segmentation results. Further, for the obtained quantified imaging features, the present invention proposes a patient survival classification prediction model. The calculation method in Rockafellar-Uryasev loss is introduced into the loss function, thereby increasing the degree of freedom of the model, and to a certain extent solving the problem of underfitting and overfitting of the neural network caused by uneven classification and data sampling bias in small sample data sets, thereby improving the reliability of the prediction.
[0086] In this embodiment, the present invention realizes an end-to-end process of predicting the survival of patients with non-small cell lung cancer, which includes two main steps: image segmentation and classification prediction.
[0087] The segmentation part of the present invention integrates a variety of attention structures, residual connections, deep supervision methods and output feature fusion modules to improve the robustness and generalization ability of the network. The comparison is shown in Table 1; Table 1 method Dice U-Net 60.0% U2Net 62.6% Method of the present invention 65.6% The prediction part of the present invention adopts Rockafellar-Uryasev loss, which provides more predictable parameter space than a single loss function, thereby enhancing the effectiveness and stability of the model for biased sample data sets. The comparison is shown in Table 2; Table 2
[0088] Example 4 An application of a CT image classification method based on image segmentation and RU classifier is used for lung cancer survival classification. The specific application method is: obtaining and preprocessing the lung CT images of the patient to be predicted, and generating survival classification results through the trained segmentation network model and RU classifier in turn.
[0089] In this embodiment, prediction is also performed using a CT image classification method based on image segmentation and RU classifier, and testing is also performed.
[0090] The dataset for this example comes from NSCLC-Radiomics in the public dataset of The Cancer Imaging Archive (TCIA). The input data is 3D CT images in nii format, with a total of 422 cases. First, the 3D data is divided into 2D images, such as Fig.12 As shown, the size of the pixels is unified to (256, 256) by windowing and center cropping. Fig.13 shown.
[0091] The images are input into the trained segmentation network model in sequence to predict the segmentation map, such as Fig.14As shown, red is the predicted label and blue is the true label.
[0092] After the model outputs the prediction result, the mask is pasted back to the image of size (512,512) according to the original position, and finally stacked and restored to nii data.
[0093] Use Radiomics to extract quantitative features. In this example, a total of 107 radiomics features obtained by quantification after image segmentation are used for classification testing.
[0094] Among the 422 cases of nii data, excluding cases with missing clinical data of some patients, this example uses a total of 352 cases in the classification prediction part. This case takes the 1-year survival status of patients from treatment to death as the prediction target. The result is that the ratio of "survival" to "death" is 233:119.
[0095] In this example, the Pytorch library and Adam optimization are used to implement iterative calculations of the neural network. The learning rate is 0.01, and 150 epochs are set. 10% of the training data in each epoch is used for verification.
[0096] The RU classifier achieved good results in terms of AUC indicators. Compared with the ANN model of a single neural network, the indicators of the RU classifier with the auxiliary network are better than the original solution, indicating that the method of the present invention can capture valuable information that other machine learning models have not learned.
[0097] The ROC curve visualization results of the RU classifier on the test set are as follows Fig.15 As shown; As shown in Table 3, The larger the value, the larger the sampling deviation allowed by the data set. The actual results show that data sampling deviation has a significant impact on the prediction results. The effect of the present invention is reflected in different It can highlight the importance of data sampling distribution. The RU classifier The performance of is more consistent with the instance dataset.
[0098] Table 3
[0099] Obviously, the above embodiments of the present invention are only examples for clearly explaining the present invention, and are not intended to limit the implementation methods of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention shall be included in the protection scope of the claims of the present invention.
Claims
1. A CT image classification method based on image segmentation and RU classifier, characterized by: The specific steps include: Collecting CT images of several patients, preprocessing the CT images, and converting the preprocessed CT images into two-dimensional images to obtain a CT image set; Construct a segmentation network model consisting of a symmetrical encoder, decoder, and feature fusion layer; Input the CT image set into the segmentation network model for training; Obtain the predicted segmentation map of the CT image set through the trained segmentation network model; extract the radiomics features of the predicted segmentation map; Constructing an RU classifier using Rockafellar-Uryasev loss; the RU classifier includes a parallel binary classification prediction model Branching and including helper functions Branches; The radiomics features were input into the RU classifier for training; The CT images to be predicted are acquired and preprocessed, and the survival classification results are generated through the trained segmentation network model and RU classifier in turn.
2. The CT image classification method based on image segmentation and RU classifier according to claim 1, characterized in that: The CT images are preprocessed and converted into two-dimensional images to obtain a CT image set, which is specifically: Merge the GTV labels of each patient in the CT image; make the size and interval of each slice in the CT image the same to obtain a CT image set; The CT image set is divided into a training set and a test set; the three-dimensional data in the training set and the test set are divided into two-dimensional images according to the cross section; the window position and window width of the two-dimensional image are set to make the cancer area stand out in the image; the picture and label of the two-dimensional image are centrally cropped; The data in the training set are randomly flipped horizontally, rotated at a small angle, and scaled to random sizes.
3. The CT image classification method based on image segmentation and RU classifier according to claim 1, characterized in that: The coding layer includes n coding convolution layers with downsampling layers and 1 intermediate layer; each coding convolution layer is composed of the same convolution structure, including a basic convolution module and a ResCBAM module; The basic convolution module CBG includes a cascaded 3×3 convolution, batch normalization BN, and an activation function layer; the ResCBAM module includes a CBAM module and a residual connection module; In each encoding convolutional layer, the output of the basic convolutional module is connected to the input of the ResCBAM module; the output of the ResCBAM module is connected to the downsampling layer; The downsampling layer of the 1st to n-1th convolutional layers is connected to the input of the basic convolutional module of the next convolutional layer; the downsampling layer of the nth convolutional layer is connected to the input of the intermediate layer.
4. The CT image classification method based on image segmentation and RU classifier according to claim 3, characterized in that: The decoder includes n decoding convolutional layers with upsampling layers and feature fusion layers corresponding to the n encoding convolutional layers and one 1×1 convolution; each decoding convolutional layer is composed of the same convolutional structure, including a basic convolutional module and a ResCBAM module; The basic convolution module CBG includes a cascaded 3×3 convolution, batch normalization BN, and an activation function layer; the ResCBAM module includes two basic convolution modules, a CBAM module, and a residual connection module connected in sequence; the feature fusion layer includes a 1×1 convolution and an upsampling layer; In each decoding convolutional layer, the output of the basic convolutional module is connected to the input of the ResCBAM module; the input of the basic convolutional module is connected to the upsampling layer; the output of the ResCBAM module is connected to the input of its corresponding feature fusion layer; The upsampling layers of the 1st to n-1st convolutional layers are connected to the output of the ResCBAM module of the corresponding coding convolutional layer and the output of the ResCBAM module of the previous convolutional layer; the upsampling layers of the nth convolutional layer are connected to the output of the ResCBAM module of the nth coding convolutional layer and the output of the intermediate layer; the output of the nth feature fusion layer .., n, after concatenation, 1×1 convolution is performed to obtain the final output .
5. The CT image classification method based on image segmentation and RU classifier according to claim 4, characterized in that: The CBAM module is a convolutional attention module. After the features are input into the ResCBAM module, the specific processing steps are as follows: Assume that the dimension of the data input to the ResCBAM module is (C, H, W), and process the feature input through two basic convolution modules in sequence to obtain the input features; Input the input features into the CBAM module, and perform the attention mechanism operation from the channel dimension and spatial dimension in turn: In the channel dimension, the input feature is changed from (C, H, W) dimension to (C, 1, 1) dimension; the two features output by the maximum pooling layer and the average pooling layer are spliced together to obtain a spliced feature with a dimension of (2, H, W); the spliced feature is input into the MLP layer to obtain a feature with a result dimension of (1, H, W). The MLP layer is a 1×1 convolution of the compressed channel, an activation function, and a 1×1 convolution of the expanded channel; the Sigmoid function is used to convert it into a probability at the spatial level, and multiplied with the input feature to obtain the feature after channel attention adjustment; In the spatial dimension, after two parallel maximum pooling layers and average pooling layers, the features after channel attention adjustment are changed from (C, H, W) dimensions to (C, 1, 1) dimensions; the two features output by the maximum pooling layer and the average pooling layer are respectively input into the shared MLP layer to keep the output and input dimensions consistent; the two features output by the MLP layer are added together, and the dimension is (C, 1, 1). The MLP layer is a convolution operation with an output channel of 1, a convolution kernel of 7, and a padding of 3; the Sigmoid function is used to convert it into a probability at the channel level, and multiplied with the features after channel attention adjustment to obtain the features after spatial attention adjustment; the features after spatial attention adjustment are used as the output of the CBAM module; The residual connection module adds the data input to the ResCBAM module and the output of the CBAM module to obtain the output of the ResCBAM module.
6. The CT image classification method based on image segmentation and RU classifier according to claim 5, characterized in that: When the CT image set is input into the segmentation network model for training, a deep supervision method is introduced for training; During training, the total loss function used is: in, For the corresponding .., n assigned weight; Loss function: Among them, X is the predicted probability map , Y is the true label, H is the input image length, and W is the input image width; After training, the test set is used to test the output results of the trained segmentation network model. The test was conducted with the following evaluation indicators: Values greater than 0.5 are set as foreground, and values less than 0.5 are set as background.
7. The CT image classification method based on image segmentation and RU classifier according to claim 1, characterized in that: Extract the radiomics features of the predicted segmentation map, specifically: stack the predicted segmentation map and restore it into three-dimensional nii data, use Radiomics to extract the radiomics features of each patient, and obtain three-dimensional data.
8. The CT image classification method based on image segmentation and RU classifier according to claim 1, characterized in that: The Branches and Each branch includes the first hidden layer, ReLU activation function, and the second hidden layer; Input radiomics features into RU classifier for training. The specific steps are as follows: Assume that the input layer of the RU classifier includes the radiomics features and its corresponding binary classification label , perform linear transformation on the input layer; exist In the branch, the linear change To the first hidden layer, use the ReLU activation function on the output of the first hidden layer and learn; The output of the first hidden layer is used as input, linearly transformed and output to the second hidden layer, and the ReLU activation function is used to introduce nonlinearity and learn the output of the second hidden layer; Learning produces an output layer consisting of a linear transformation and a Sigmoid activation function , where the linear transformation is mapped to a single neuron, that is, the output layer dimension is 1, and the Sigmoid function scales the output to the range [0,1], representing the predicted probability of the binary classification task, with a prediction of "death" for values greater than 0.5 and "survival" for values less than or equal to 0.5; exist In the branch, the linear change To the first hidden layer, use the ReLU activation function on the output of the first hidden layer and learn; The output of the first hidden layer is used as input, linearly transformed and output to the second hidden layer, and the ReLU activation function is used to introduce nonlinearity and learn the output of the second hidden layer; Learn to produce an output layer consisting of linear transformations , where the linear transformation is mapped to a single neuron, that is, the output layer dimension is 1; according to , and binary classification labels The Rockafellar-Uryasev loss is calculated based on the value of ; next, the iterative training is performed with the goal of minimizing the loss, and finally the optimal prediction value is obtained.
9. The CT image classification method based on image segmentation and RU classifier according to claim 8, characterized in that: The Rockafellar-Uryasev losses are specifically: in, For the The radiomics feature vector of samples, To indicate the corresponding The real two-category label, is a non-negative hyperparameter, For the Sample The predicted result of the branch, For the Sample The output parameters of the branch, Defined as binary cross entropy loss: also, It is a rectified linear unit, which is used to improve the joint expression ability of the two prediction branches in the RU classifier. Specifically: The goal of learning is ; When the expectation of all in-sample losses When it reaches the minimum, it means that the classification prediction performance is the best: 。 10. An application of the CT image classification method based on image segmentation and RU classifier according to any one of claims 1 to 9, characterized in that: Used for lung cancer survival classification.
Citation Information
Patent Citations
Medical image segmentation method and system based on decoding layer loss callback
CN116152502A
Image detection model, training method and device thereof, equipment and storage medium
CN116977776A
Cited By
Unet-ViT-based tongue diagnosis method
CN119399132A
