A colorectal cancer T staging method and system based on tumor region CT images

Through the multi-attention mechanism and data enhancement ideas based on tumor area CT images, the DenseNet three-dimensional convolution classification network model is constructed, which solves the misdiagnosis and missed diagnosis problems in the T-stage diagnosis of colorectal cancer, improves the diagnostic efficiency and accuracy, and relieves doctors. workload.

CN115100165BActive Publication Date: 2024-09-10SOUTH CHINA AGRICULTURAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210787519.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-06
Publication Date
2024-09-10
Estimated Expiration
2042-07-06

AI Technical Summary

Technical Problem

In the existing technology, the T stage diagnosis of colorectal cancer relies on manual detection, which is time-consuming and can easily lead to misdiagnosis and missed diagnosis, resulting in low diagnostic efficiency and difficulty in accurately predicting the T stage of the tumor.

Method used

Using a method based on CT images of the tumor area, the multi-attention mechanism and data enhancement ideas were introduced to build a DenseNet three-dimensional convolution classification network model. Through training and verification, the model weights were optimized to achieve accurate prediction of the T stage of colorectal cancer.

Benefits of technology

It greatly reduces the workload of doctors, improves diagnosis efficiency, enhances the accuracy and robustness of prediction, solves the problem of class imbalance, improves the situation of insufficient data sets, and improves the fitting ability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115100165B
    Figure CN115100165B
Patent Text Reader

Abstract

The present invention discloses a method and system for colorectal cancer T staging based on tumor region CT images. The method comprises the following steps: annotating CT images and constructing an original data set; extracting tumor region CT images using annotated mask images, and preprocessing the tumor region CT images; corresponding the tumor region CT images to T staging results one by one, and constructing a data set; constructing an improved DenseNet three-dimensional convolution classification network fused by a multi-attention mechanism, improving the channel screening ability of the dense layer and the information screening ability of the transition block, thereby improving the training effect of the colorectal cancer T staging model; the present invention utilizes the idea of ​​test data enhancement to perform model prediction from multiple angles, thereby improving the prediction effect of colorectal cancer T staging.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a method and system for colorectal cancer T staging based on tumor region CT images. Background Art

[0002] Currently, colorectal cancer is mainly diagnosed based on CT images, and tumor staging is analyzed based on tumor growth. However, since manual detection is very time-consuming, long-term work will increase the misdiagnosis and missed diagnosis rate of colorectal cancer staging, which is not conducive to the diagnosis of tumor staging.

[0003] Therefore, there is an urgent need for a technology that can predict the T stage of colorectal cancer based on CT images of the approximate area of ​​the tumor, so as to achieve T stage diagnosis of colorectal cancer. Summary of the invention

[0004] In order to overcome the defects and shortcomings of the prior art, the present invention provides a colorectal cancer T staging method and system based on tumor region CT images. The present invention uses tumor region CT images as input to reduce the learning difficulty and prediction difficulty of the model; introduces the idea of ​​multi-attention mechanism fusion to improve the T staging effect of colorectal cancer; introduces the idea of ​​test data enhancement to help the model predict the input image from multiple angles, so that the T staging effect of colorectal cancer is more accurate.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions:

[0006] The present invention provides a colorectal cancer T staging method based on a tumor region CT image, comprising the following steps:

[0007] Annotate CT images and construct original data sets;

[0008] Preprocessing the original data set to construct the final data set, specifically including: dividing the original data set, adjusting the image voxel spacing, adjusting the intensity range of the CT image, and extracting the CT image of the tumor area to obtain the final data set, each of which includes the CT image of the tumor area and the corresponding T staging result;

[0009] Construct a three-dimensional convolutional classification network model based on DenseNet, including an input layer, a first attention dense block, a first attention transition block, a second attention dense block, a second attention transition block, a third attention dense block and an output layer connected in sequence;

[0010] Train the 3D convolutional classification network model:

[0011] Perform data augmentation to expand the training set and obtain the optimal weights of the network model by training the network model;

[0012] Use the back-propagation algorithm to calculate the gradients of each parameter, and use the Adam optimizer to update the parameters;

[0013] Take data from the validation sample and feed it into the model to calculate the validation set accuracy. If the current validation set accuracy is greater than the previous validation set accuracy, save the current model weight as the optimal model weight.

[0014] The trained three-dimensional convolution classification network model is used for prediction to obtain prediction results. Each prediction result includes the prediction probability of each category. The prediction results of each image are added together, and the index with the largest prediction probability in the prediction results is taken as the prediction category to obtain the staging result of the input image.

[0015] As a preferred technical solution, the input layer sequentially sets three-dimensional convolution, BN normalization, ReLU activation function and maximum pooling layer.

[0016] As a preferred technical solution, the first attention dense block, the second attention dense block and the third attention dense block are provided with different numbers of dense layers, the output feature map of each dense layer has the same number of channels, and the input feature map of the latter dense layer is the stacking of the output feature map of the previous dense layer in the channel dimension.

[0017] As a preferred technical solution, the dense layer sequentially sets a three-dimensional ECA attention mechanism, a first BN normalization, a first ReLU activation function, a first three-dimensional convolution, a second BN normalization, a second ReLU activation function and a second three-dimensional convolution.

[0018] As a preferred technical solution, the three-dimensional ECA attention mechanism specifically includes:

[0019] Perform global average pooling on the input feature map in the spatial dimension to reduce the dimension of the input feature map;

[0020] Use one-dimensional convolution to learn channel weights and obtain a set of feature vectors;

[0021] Use the Sigmoid function for activation and adjust the weight of each channel to between 0 and 1 to obtain the ECA channel attention weight;

[0022] Multiply the ECA channel attention weight with the input feature map to obtain the feature map to which the ECA attention mechanism is applied.

[0023] As a preferred technical solution, the convolution kernel size of the one-dimensional convolution is related to the number of channels of the input feature map. The specific calculation formula is expressed as:

[0024]

[0025] Among them, S represents the convolution kernel size of one-dimensional convolution, and C represents the number of channels of the input feature map.

[0026] As a preferred technical solution, the first attention transition block and the second attention transition block sequentially set up a three-dimensional CBAM attention mechanism, BN normalization, ReLU activation function, three-dimensional convolution and average pooling layer. The three-dimensional CBAM attention mechanism performs channel attention mechanism and spatial attention mechanism on the input feature layer respectively to realize information screening of the input feature layer.

[0027] As a preferred technical solution, the three-dimensional CBAM attention mechanism processes the input feature layer using a channel attention mechanism and a spatial attention mechanism respectively, and the specific steps include:

[0028] Perform CBAM channel attention, use global average pooling and global maximum pooling to reduce the dimension of the input feature map, and extract channel weights through two layers of shared 3D convolution, add the outputs of the two channel weight extraction paths, and use the Sigmoid function to adjust the weight of each channel to between 0 and 1 to obtain the CBAM channel attention weight, multiply the CBAM channel attention weight with the input feature map, and obtain the feature map with the CBAM channel attention mechanism;

[0029] Perform CBAM spatial attention, use the feature map with CBAM channel attention mechanism as the input feature map, perform maximum pooling and average pooling based on the channel dimension on the input feature map, concatenate the outputs of maximum pooling and average pooling based on the channel dimension, reduce its dimension into one channel through three-dimensional convolution, use Sigmoid function to adjust the weight of each element to between 0 and 1, and obtain the CBAM spatial attention weight. Multiply the CBAM spatial attention weight with the input feature map to obtain the feature map with CBAM spatial attention mechanism.

[0030] As a preferred technical solution, the optimal weight of the network model is obtained by training the network model, and the CT image of the tumor area and the corresponding real label are obtained from the training set, wherein the real label is encoded using one-hot. The CT image of the tumor area is input into the network model to obtain the prediction result, which represents the probability distribution of each predicted category. According to the different distribution of each category of colorectal cancer T stage in the data set, the weight coefficient is used to assign the weight.

[0031] The present invention also provides a colorectal cancer T staging system based on tumor region CT images, comprising: a data set construction module, a data set preprocessing module, a network model construction module, a network model training module and a prediction module;

[0032] The data set construction module is used to annotate the CT images and construct the original data set;

[0033] The data set preprocessing module is used to preprocess the original data set to construct the final data set, specifically including: dividing the original data set, adjusting the image voxel spacing, adjusting the intensity range of the CT image and extracting the tumor area CT image to obtain the final data set, each final data set includes the tumor area CT image and the corresponding T staging result;

[0034] The network model construction module is used to construct a three-dimensional convolution classification network model based on DenseNet, including an input layer, a first attention dense block, a first attention transition block, a second attention dense block, a second attention transition block, a third attention dense block and an output layer connected in sequence;

[0035] The network model training module is used to train the three-dimensional convolution classification network model:

[0036] Perform data augmentation to expand the training set and obtain the optimal weights of the network model by training the network model;

[0037] Use the back-propagation algorithm to calculate the gradients of each parameter, and use the Adam optimizer to update the parameters;

[0038] Take data from the validation sample and feed it into the model to calculate the validation set accuracy. If the current validation set accuracy is greater than the previous validation set accuracy, save the current model weight as the optimal model weight.

[0039] The prediction module is used to use the trained three-dimensional convolution classification network model to perform predictions to obtain prediction results. Each prediction result includes the prediction probability of each category. The prediction results of each image are added together, and the index with the largest prediction probability in the prediction results is taken as the prediction category to obtain the staging result of the input image.

[0040] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0041] (1) Compared with the prior art, the present invention provides a colorectal cancer T staging method based on CT images of the tumor area. It only requires a CT image of the approximate tumor area as input, which can greatly reduce the workload of doctors and help improve the diagnosis efficiency of doctors.

[0042] (2) The present invention introduces the idea of ​​fusion of multiple attention mechanisms, which enables the network to better screen channel information and spatial information and improve the prediction effect of colorectal cancer T staging.

[0043] (3) The present invention uses three-dimensional tumor region CT images as model input, which can better utilize the spatial information of the image and improve the reliability of the diagnosis results.

[0044] (4) Based on the idea of ​​test data enhancement, the present invention automatically creates multiple input copies for the input image, so that the model can predict the input image from multiple angles, thereby improving the robustness of the diagnosis results.

[0045] (5) The present invention optimizes the loss function based on the weight assignment method, solves the problem of category imbalance in training data, improves the difficulty of model training when the data set is insufficient, and improves the model fitting ability. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 It is a flow chart of the method for colorectal cancer T staging based on tumor region CT images of the present invention;

[0047] Figure 2 This is a schematic diagram of the improved DenseNet three-dimensional convolution classification network structure of the present invention;

[0048] Figure 3 is a schematic diagram of the attention-intensive layer structure of the present invention;

[0049] Figure 4 Schematic diagram of the ECA attention mechanism used in the present invention;

[0050] Figure 5 is a schematic diagram of the attention transition block structure of the present invention;

[0051] Figure 6 Schematic diagram of the CBAM attention mechanism used in the present invention;

[0052] Figure 7 Schematic diagram of the channel attention module in the CBAM attention mechanism used in the present invention;

[0053] Figure 8 Schematic diagram of the spatial attention module in the CBAM attention mechanism used in the present invention. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0055] Example 1

[0056] like Figure 1 As shown, this embodiment provides a colorectal cancer T staging method based on a tumor region CT image, comprising the following steps:

[0057] S1: Annotate CT images and construct the original data set, as follows:

[0058] ITK-SNAP software was used to annotate CT images in sequence, obtain the corresponding mask images and staging results, and construct the original data set.

[0059] S2: Preprocess the original data set and construct the final data set, as follows:

[0060] S21: Divide the dataset into training set, validation set, and test set.

[0061] S22: Adjust the image voxel spacing. The original image voxel spacing varies, but the model is not sensitive to this information. Therefore, unifying the original image voxel spacing is conducive to restoring the real image, so as to learn the important information of the image more efficiently. First, the image voxel spacing of all original images is counted to obtain the mean of the image voxel spacing, and finally the original image voxel spacing is uniformly interpolated to the mean image voxel spacing. Among them, the mean image voxel spacing of this dataset is (0.78, 0.78, 3.36).

[0062] S23: Adjust the intensity range of the CT image. Using the CT window technology, adjust the window size of each CT image to 500 and the window level to 50, so that the CT value distribution range is between (-200, 300), thereby excluding redundant information irrelevant to colorectal tumor segmentation. The foreground part of the CT image is normalized to (0, 1), while retaining the grayscale difference with diagnostic value, reducing or even eliminating the grayscale inconsistency in the image, which is more conducive to computer automatic analysis and processing.

[0063] S24: Extract the CT image of the tumor region. Since the annotated area in the mask image corresponds to the tumor region of the original CT image, the mask image can be used to extract the CT image of the tumor region from the original CT image. Use the area with a value greater than 0 in the mask image as a reference boundary to crop to (96,96,96) to cut the original CT image, thereby obtaining the CT image of the tumor region. When it is less than (96,96,96), fill it with 0 values ​​to (96,96,96). Randomly crop 4 CT images of the tumor region from each CT image.

[0064] S25: The final dataset consists of a training set, a validation set, and a test set, with a ratio of 6:2:2. Each dataset consists of a CT image of the tumor region and the corresponding T staging result. The size of the CT image of the tumor region is unified as (96,96,96), and the staging result is Ti (i=1, 2, 3, 4). Compared with the original CT image, the CT image of the tumor region is more targeted, the information is more concentrated, the data calculation amount is smaller, and it is more conducive to model learning and prediction.

[0065] S3: The present invention applies traditional DenseNet, ECA attention mechanism, and CBAM attention mechanism to three-dimensional space, and integrates the ECA attention mechanism, CBAM attention mechanism with DenseNet.

[0066] like Figure 2 As shown in the figure, an improved DenseNet three-dimensional convolution classification network fused by multiple attention mechanisms is constructed, which mainly includes an input layer, three attention dense blocks, two attention transition blocks, and an output layer, namely, the structure of "input layer + attention dense block + attention transition block + attention dense block + attention transition block + attention dense block + output layer". Among them, the output of the previous module is used as the input of the next module.

[0067] S31: The input layer consists of three-dimensional convolution, BN normalization, ReLU activation function, and maximum pooling layer, that is, the "Conv+BN+ReLU+MaxPooling" structure. The three-dimensional convolution is used for the initial extraction of features. The number of input channels is 1, the number of output channels is 64, the convolution kernel size is 7×7×7, the step size is 2×2×2, and the padding is 3×3×3; BN normalization standardizes the data, which is conducive to speeding up the training speed. The ReLU activation function can suppress the output of some neurons, ensure the sparsity of the network, reduce the dependence of parameters, and alleviate overfitting. The maximum pooling layer is used to reduce the feature map to reduce the amount of calculation, and at the same time increase the receptive field to extract larger local features. The pooling kernel size is 3×3×3, the step size is 2×2×2, and the padding is 1×1×1.

[0068] S32: The attention dense block consists of multiple attention dense layers. The first dense block has 6 dense layers, the second dense block has 12 dense layers, and the third dense block has 24 dense layers. The output feature map M of each dense layer i The number of channels is 32; the input feature map of the i-th dense layer is the stack of the output feature maps of the previous i-1 dense layers in the channel dimension, in the form of (M0, M1, M2, ···, M i-1 ). The traditional dense layer consists of two BN normalizations, two ReLU activation functions, and two 3D convolutions, i.e., the "BN+ReLU+Conv+BN+ReLU+Conv" structure. Among them, the first 3D convolution reduces the number of channels of the feature map to 128, reduces the number of features, and improves computational efficiency. The convolution kernel size is 1×1×1, and the step size is 1×1×1. The second 3D convolution reduces the number of channels of the feature map to 32 for feature map channel screening. The convolution kernel size is 3×3×3, the step size is 1×1×1, and the padding is 1×1×1.

[0069] The traditional dense layer input feature map has too many channels, and as the number of features increases, the feature information that needs to be processed also increases exponentially. Figure 3 As shown, the attention dense layer of the present invention adds a three-dimensional ECA attention mechanism before the first BN normalization of the traditional dense layer, that is, adopts the "ECA+BN+ReLU+Conv+BN+ReLU+Conv" structure to perform channel attention on the input feature map, so that the network pays attention to the channels it needs to pay most attention to, thereby improving the learning efficiency of the model.

[0070] like Figure 4 As shown, the three-dimensional ECA attention mechanism used in the present invention is specifically as follows: first, the input feature map is globally averaged pooled in the spatial dimension to reduce the dimension of the input feature map; then one-dimensional convolution is used to learn the channel weights to obtain a set of feature vectors; then the Sigmoid function is used for activation, and the weight of each channel is adjusted to between 0 and 1 to reduce the amount of calculation, thereby obtaining the ECA channel attention weight. Finally, the ECA channel attention weight is multiplied by the previous input feature map to obtain a feature map to which the ECA attention mechanism is applied. The convolution kernel size S of the one-dimensional convolution is related to the number of channels C of the input feature map to achieve the adaptation of the convolution kernel size. When the number of channels of the input feature map increases, the convolution kernel size also increases, thereby improving the receptive field of the convolution process. The calculation formula is as follows:

[0071]

[0072] S33: The traditional transition block consists of BN normalization, ReLU activation function, 3D convolution, and average pooling layer, i.e., the "BN+ReLU+Conv+AvgPooling" structure, which mainly connects two adjacent dense blocks and reduces the size of the feature map to compress the model. Among them, the convolution kernel size of the 3D convolution is 1×1×1, and the step size is 1×1×1; the pooling kernel size of the average pooling layer is 2×2×2, and the step size is 2×2×2.

[0073] like Figure 5 As shown in FIG. 1 , the attention transition block of the present invention adopts the “CBAM+BN+ReLU+Conv+AvgPooling” structure, as shown in FIG. Figure 6 As shown in the figure, the CBAM attention mechanism is used to process the input feature layer using the channel attention mechanism and the spatial attention mechanism respectively, so as to realize information screening of the input feature layer, improve the information processing capability of the transition block, and indirectly improve the efficiency of information transmission between the two dense blocks.

[0074] The three-dimensional CBAM attention mechanism used in the present invention is as follows: first, CBAM channel attention is performed, such as Figure 7As shown in the figure, the channel attention module takes the output feature map of the previous dense block as the input feature map, uses global average pooling and global maximum pooling to reduce the dimension of the input feature map, and extracts channel weights through two layers of shared three-dimensional convolution. Finally, the outputs of the two channel weight extraction paths are added, and the Sigmoid function is used to adjust the weight of each channel to between 0 and 1 to obtain the CBAM channel attention weight. Finally, the CBAM channel attention weight is multiplied by the previous input feature map to obtain the feature map with the CBAM channel attention mechanism.

[0075] Then perform CBAM spatial attention, such as Figure 8 As shown in the figure, the spatial attention module takes the feature map with the CBAM channel attention mechanism as the input feature map, first performs maximum pooling and average pooling based on the channel dimension on the input feature map, and concatenates the outputs of the maximum pooling and average pooling based on the channel dimension based on the channel dimension; reduces its dimension into one channel through three-dimensional convolution; uses the Sigmoid function to adjust the weight of each element to between 0 and 1 to obtain the CBAM spatial attention weight; finally, multiplies the CBAM spatial attention weight with the input feature map to obtain the feature map with the CBAM spatial attention mechanism.

[0076] S34: The output layer consists of BN normalization, ReLU function, average pooling, flattening layer, and linear output unit, i.e., the "BN+ReLU+AvgPooling+Flatten+Linear" structure. Among them, average pooling is used to adjust the feature vector size to (1024, 1, 1, 1); the flattening layer is used to obtain 1024 neural units and obtain a one-dimensional vector (1, 1024); the linear output unit receives 1024 neural units and adjusts the output to a set of vectors with a vector shape of (1, 4).

[0077] S4: Train and verify the model as follows:

[0078] S41: Medical image data is relatively scarce due to the scarcity of samples and the high cost of high-quality annotation. Model performance can be improved through data augmentation. This method uses random flipping, rotation, random affine, and random elastic deformation for offline data augmentation to expand the training set.

[0079] S42: Obtain the optimal model weight by training the model. The training model traverses the data N times and the batch size is 2.

[0080] The specific process of each traversal is as follows:

[0081] S421: Obtain a tumor region CT image X and a corresponding true label Y from a training set, where the true label Y is encoded using one-hot encoding.

[0082] S422: Send X into the model to obtain the predicted result Y pred , represents the probability distribution of each predicted category, as is 1.

[0083] S423: In the medical field, the distribution of categories is very unbalanced. Colorectal cancer data is mainly in the middle and late stages, while the early stage colorectal cancer data is relatively small. This embodiment uses the weight assignment method to optimize the conventional cross entropy loss. Add a weight coefficient a to the conventional cross entropy loss, such as (a0,1,2,3), is 1. This method can solve the problems of class imbalance and classification difficulty differences in classification problems. According to the different distribution of each category of colorectal cancer T stage in the data set, the weight coefficient a used is (0.4, 0.3, 0.2, 0.1. The specific calculation formula for the optimized cross entropy loss of each predicted sample is as follows:

[0084]

[0085] S43: Use the back-propagation algorithm to calculate the gradients of each parameter and use the Adam optimizer to update the parameters.

[0086] S44: Take data from the validation sample and feed it into the model to calculate the validation set accuracy. If the current validation set accuracy is greater than the previous validation set accuracy, the weight of the current model is saved as the optimal model weight.

[0087] S5: Apply image data augmentation techniques to allow the model to predict multiple different versions of each image in the test dataset, and then take the average of the predictions for the augmented images to obtain better prediction performance. Use the saved best model weights to assign weights to the model, and then use the model for testing, as follows:

[0088] S51: Perform various image transformation techniques such as flipping, rotating, affine, and spatial deformation on the input image of the test sample to create multiple augmented copies, allowing the model to make predictions for each image. Each prediction result includes the prediction probability of each category, and then the prediction results of each image are added together.

[0089] S52: Using a soft voting method, the index with the highest probability in the prediction result is taken as the prediction category, and the classification result of the input image is obtained.

[0090] Example 2

[0091] A colorectal cancer T staging system based on tumor region CT images, comprising: a data set construction module, a data set preprocessing module, a network model construction module, a network model training module and a prediction module;

[0092] In this embodiment, the data set construction module is used to annotate the CT images and construct the original data set;

[0093] In this embodiment, the data set preprocessing module is used to preprocess the original data set to construct the final data set, specifically including: dividing the original data set, adjusting the image voxel spacing, adjusting the intensity range of the CT image and extracting the tumor area CT image to obtain the final data set, each final data set includes the tumor area CT image and the corresponding T staging result;

[0094] In this embodiment, the network model construction module is used to construct a three-dimensional convolution classification network model based on DenseNet, including an input layer, a first attention dense block, a first attention transition block, a second attention dense block, a second attention transition block, a third attention dense block and an output layer connected in sequence;

[0095] In this embodiment, the network model training module is used to train the three-dimensional convolution classification network model:

[0096] Perform data augmentation to expand the training set and obtain the optimal weights of the network model by training the network model;

[0097] Use the back-propagation algorithm to calculate the gradients of each parameter, and use the Adam optimizer to update the parameters;

[0098] Take data from the validation sample and feed it into the model to calculate the validation set accuracy. If the current validation set accuracy is greater than the previous validation set accuracy, save the current model weight as the optimal model weight.

[0099] In this embodiment, the prediction module is used to use the trained three-dimensional convolution classification network model to perform predictions to obtain prediction results. Each prediction result includes the prediction probability of each category. The prediction results of each image are added together, and the index with the largest prediction probability in the prediction results is taken as the prediction category to obtain the classification result of the input image.

[0100] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.

Claims

1. A colorectal cancer T staging method based on tumor region CT images, characterized in that: The steps include: Annotate CT images and construct original data sets; Preprocessing the original data set to construct the final data set, specifically including: dividing the original data set, adjusting the image voxel spacing, adjusting the intensity range of the CT image, and extracting the CT image of the tumor area to obtain the final data set, each of which includes the CT image of the tumor area and the corresponding T staging result; Construct a three-dimensional convolutional classification network model based on DenseNet, including an input layer, a first attention dense block, a first attention transition block, a second attention dense block, a second attention transition block, a third attention dense block and an output layer connected in sequence; The first attention transition block and the second attention transition block sequentially set up a three-dimensional CBAM attention mechanism, BN normalization, ReLU activation function, three-dimensional convolution and average pooling layer. The three-dimensional CBAM attention mechanism processes the input feature layer with a channel attention mechanism and a spatial attention mechanism respectively to realize information screening of the input feature layer. The three-dimensional CBAM attention mechanism processes the input feature layer by channel attention mechanism and spatial attention mechanism respectively, and the specific steps include: Perform CBAM channel attention, use global average pooling and global maximum pooling to reduce the dimension of the input feature map, and extract channel weights through two layers of shared 3D convolution, add the outputs of the two channel weight extraction paths, and use the Sigmoid function to adjust the weight of each channel to between 0 and 1 to obtain the CBAM channel attention weight, multiply the CBAM channel attention weight with the input feature map, and obtain the feature map with the CBAM channel attention mechanism; Perform CBAM spatial attention, use the feature map with CBAM channel attention mechanism as the input feature map, perform maximum pooling and average pooling based on the channel dimension on the input feature map, and concatenate the outputs of maximum pooling and average pooling based on the channel dimension, reduce the dimension to one channel through three-dimensional convolution, use Sigmoid function to adjust the weight of each element to between 0 and 1, and obtain the CBAM spatial attention weight, multiply the CBAM spatial attention weight by the input feature map, and obtain the feature map with CBAM spatial attention mechanism; Train the 3D convolutional classification network model: Perform data augmentation to expand the training set and obtain the optimal weights of the network model by training the network model; The optimal weight of the network model is obtained by training the network model, and the CT image of the tumor area and the corresponding real label are obtained from the training set, wherein the real label is encoded using one-hot. The CT image of the tumor area is input into the network model to obtain the prediction result, which represents the probability distribution of each prediction category. According to the different distribution of each category of colorectal cancer T stage in the data set, the weight coefficient is used to assign the weight; Use the back-propagation algorithm to calculate the gradients of each parameter, and use the Adam optimizer to update the parameters; Take data from the validation sample and feed it into the model to calculate the validation set accuracy. If the current validation set accuracy is greater than the previous validation set accuracy, save the current model weight as the optimal model weight. The trained three-dimensional convolution classification network model is used for prediction to obtain prediction results. Each prediction result includes the prediction probability of each category. The prediction results of each image are added together, and the index with the largest prediction probability in the prediction results is taken as the prediction category to obtain the staging result of the input image.

2. The method for colorectal cancer T staging based on tumor region CT images according to claim 1, characterized in that: The input layer sequentially sets three-dimensional convolution, BN normalization, ReLU activation function and maximum pooling layer.

3. The method for colorectal cancer T staging based on tumor region CT images according to claim 1, characterized in that: The first attention dense block, the second attention dense block and the third attention dense block are provided with different numbers of dense layers, the output feature map of each dense layer has the same number of channels, and the input feature map of the latter dense layer is the stacking of the output feature map of the previous dense layer in the channel dimension.

4. The method for colorectal cancer T staging based on tumor region CT images according to claim 3, characterized in that: The dense layer sequentially sets a three-dimensional ECA attention mechanism, a first BN normalization, a first ReLU activation function, a first three-dimensional convolution, a second BN normalization, a second ReLU activation function, and a second three-dimensional convolution.

5. The method for colorectal cancer T staging based on tumor region CT images according to claim 4, characterized in that: The three-dimensional ECA attention mechanism specifically includes: Perform global average pooling on the input feature map in the spatial dimension to reduce the dimension of the input feature map; Use one-dimensional convolution to learn channel weights and obtain a set of feature vectors; Use the Sigmoid function for activation and adjust the weight of each channel to between 0 and 1 to obtain the ECA channel attention weight; Multiply the ECA channel attention weight with the input feature map to obtain the feature map to which the ECA attention mechanism is applied.

6. The method for colorectal cancer T staging based on tumor region CT images according to claim 5, characterized in that: The size of the convolution kernel of a one-dimensional convolution is related to the number of channels of the input feature map. The specific calculation formula is expressed as: Among them, S represents the convolution kernel size of one-dimensional convolution, and C represents the number of channels of the input feature map.

7. A colorectal cancer T staging system based on CT images of tumor regions, characterized in that: Used to implement the colorectal cancer T staging method based on tumor region CT images as described in any one of claims 1 to 6, the system comprises: a data set construction module, a data set preprocessing module, a network model construction module, a network model training module and a prediction module; The data set construction module is used to annotate the CT images and construct the original data set; The data set preprocessing module is used to preprocess the original data set to construct the final data set, specifically including: dividing the original data set, adjusting the image voxel spacing, adjusting the intensity range of the CT image and extracting the tumor area CT image to obtain the final data set, each final data set includes the tumor area CT image and the corresponding T staging result; The network model construction module is used to construct a three-dimensional convolution classification network model based on DenseNet, including an input layer, a first attention dense block, a first attention transition block, a second attention dense block, a second attention transition block, a third attention dense block and an output layer connected in sequence; The network model training module is used to train the three-dimensional convolution classification network model: Perform data augmentation to expand the training set and obtain the optimal weights of the network model by training the network model; Use the back-propagation algorithm to calculate the gradients of each parameter, and use the Adam optimizer to update the parameters; Take data from the validation sample and feed it into the model to calculate the validation set accuracy. If the current validation set accuracy is greater than the previous validation set accuracy, save the current model weight as the optimal model weight. The prediction module is used to use the trained three-dimensional convolution classification network model to perform predictions to obtain prediction results. Each prediction result includes the prediction probability of each category. The prediction results of each image are added together, and the index with the largest prediction probability in the prediction results is taken as the prediction category to obtain the staging result of the input image.