CT image-based t-stage classification prediction processing method and apparatus
Patent Information
- Application Number
- PCT/CN2025/090403
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-26
- Filing Date
- 2025-04-22
- Publication Date
- 2025-10-30
AI Technical Summary
In existing technologies, the manual identification of gastric cancer T-staging types based on CT images is inefficient and difficult to process in batches.
A T-stage prediction model based on CT images was constructed, including a semantic segmentation model, a synthetic image processing module, a data distribution module, and Class I and Class II prediction branches. Machine learning and deep learning models were used to identify and classify gastric cancer lesions and generate T-stage marker maps.
It improves the real-time performance and efficiency of predicting T-phase classification of gastric cancer in CT images, and outputs stable prediction quality.
Smart Images

Figure CN2025090403_30102025_PF_FP_ABST
Abstract
Description
A processing method and apparatus for T-phase classification prediction based on CT images.
[0001] This application claims priority to Chinese Patent Application No. 202410515490.2, filed on April 26, 2024, entitled "A Processing Method and Apparatus for T-Phase Classification Prediction Based on CT Images". Technical Field
[0002] This invention relates to the field of data processing technology, and in particular to a processing method and apparatus for T-phase classification prediction based on CT images. Background Technology
[0003] The T-staging system is a gastric cancer staging system that classifies gastric cancer based on the depth of tumor invasion and the appearance of the gastric surface. Common T-staging types include T1, T2, T3, T4a, and T4b. Currently, medical experts can manually identify T-staging types based on computed tomography (CT) images. However, this manual identification method is clearly limited by the time constraints of experts, resulting in significant time-sensitivity issues, especially when processing large batches of CT images. Summary of the Invention
[0004] The purpose of this invention is to address the shortcomings of existing technologies by providing a processing method, apparatus, electronic device, and computer-readable storage medium for T-stage classification prediction based on CT images. This invention constructs a T-stage prediction model capable of predicting the T-stage of gastric cancer based on CT images and trains the model using a dataset. After model training, it performs T-stage classification prediction of gastric cancer on any input CT images based on the T-stage prediction model. The T-stage prediction model provided by this invention improves both real-time prediction performance and efficiency, while also outputting stable prediction quality.
[0005] To achieve the above objectives, a first aspect of the present invention provides a method for T-phase classification prediction based on CT images, the method comprising:
[0006] A T-stage prediction model is constructed to predict the T-stage classification of gastric cancer based on input CT images and model branch selection parameters, and to output the corresponding T-stage prediction results. The CT image is a three-dimensional abdominal CT image with complete three-dimensional information of the stomach. The model branch selection parameters include Class I and Class II. The T-stage prediction results include the total number of lesion areas and / or a T-stage marker map. The total number of lesion areas is an integer greater than or equal to 0. When the total number of lesion areas is 0, the T-stage prediction results do not include the T-stage marker map. When the total number of lesion areas is greater than 0, the T-stage prediction results include the T-stage marker map. The three-dimensional dimensions of the T-stage marker map are consistent with the three-dimensional dimensions of the CT image. The T-stage marker map shows the edges of the gastric cancer lesion areas corresponding to the total number of lesion areas, and the corresponding T-stage classification type is marked on each edge of the gastric cancer lesion area. The T-stage classification types include T1, T2, T3, T4a, and T4b.
[0007] The dataset used for training the prediction model for period T is denoted as the corresponding first dataset;
[0008] The prediction model for period T is trained based on the first dataset;
[0009] Based on the completed model training, the T-stage prediction model performs gastric cancer T-stage classification prediction according to the input first CT image and the first model branch selection parameters to obtain the corresponding first T-stage prediction result.
[0010] Preferably, the T-period prediction model includes a semantic segmentation model, a synthetic graph processing module, a data distribution module, a first-class prediction branch, a second-class prediction branch, and a prediction output module;
[0011] The input terminals of the T-stage prediction model include a first model input terminal and a second model input terminal, and the output terminals are denoted as the corresponding model output terminals; the first model input terminal is used to receive the CT images input by the model; the second model input terminal is used to receive the model branch selection parameters input by the model; and the model output terminal is used to output the corresponding T-stage prediction results.
[0012] The input of the semantic segmentation model is connected to the input of the first model, and the output is connected to the second input of the synthetic graph processing module.
[0013] The semantic segmentation model is implemented based on the model structure of the U-Net model;
[0014] The semantic segmentation model is used to perform semantic segmentation of gastric cancer lesions on the CT image input to the model, obtaining a corresponding first semantic segmentation map, which is then sent to the composite image processing module. The shape of the CT image is D0×H0×W0×C0, where D0, H0, and W0 are the depth, height, and width in the three-dimensional dimensions of the CT image, respectively, and C0 is the feature channel dimension of the CT image, C0 = 1. The CT image is composed of D0×H0×W0 first CT voxels, and the unique feature corresponding to each first CT voxel is a CT image pixel value. The shape of the first semantic segmentation map is... The first semantic segmentation map is defined as D1×H1×W1×C1, where D1, H1, and W1 represent the depth, height, and width of the three-dimensional dimension of the first semantic segmentation map, respectively, and C1 represents the feature dimension of the first semantic segmentation map. D1 = D0, H1 = H0, W1 = W0, and C1 = 1. The first semantic segmentation map consists of D1×H1×W1 first semantic voxels, each corresponding one-to-one with a first CT voxel. Each first semantic voxel corresponds to a unique feature representing a gastric cancer lesion semantic feature. The gastric cancer lesion semantic feature is a probability of a gastric cancer lesion with a value between 0 and 1.
[0015] The first input terminal of the composite graph processing module is connected to the first model input terminal, and the output terminal is connected to the second input terminal of the data distribution module.
[0016] The composite image processing module is used to perform mask image conversion based on the first semantic segmentation image sent by the semantic segmentation model to obtain a corresponding first mask image, and to perform feature stitching of the obtained first mask image and the CT image input by the model to obtain a corresponding first composite image; and to send the first composite image to the data distribution module; wherein, the shape of the first mask image is D2×H2×W2×C2, where D2, H2, and W2 are the depth, height, and width in the three-dimensional dimensions of the first mask image, respectively, C2 is the feature dimension of the first mask image, D2=D1=D0, H2=H1=H0, W2=W1=W0, C2=1; the first mask image is composed of D2×H2×W2 first mask voxels, and the first mask voxels, the first semantic voxels, and the first CT image are used to construct a composite image. Each voxel point is individually mapped, and the unique feature corresponding to each first mask voxel point is a binary gastric cancer lesion mask feature with a value of 0 or 1. The shape of the first composite image is D3×H3×W3×C3, where D3, H3, and W3 are the depth, height, and width in the three-dimensional dimensions of the first composite image, respectively, and C3 is the feature dimension of the first composite image. D3 = D2 = D0, H3 = H2 = H0, W3 = W2 = W0, and C3 = C2 + C0 = 2. The first composite image is composed of D3×H3×W3 first composite voxels, and each first composite voxel point corresponds one-to-one with the first mask voxel point and the first CT voxel point. The C3 features corresponding to each first composite voxel point are composed of the corresponding gastric cancer lesion mask feature and the CT image pixel value.
[0017] The first input terminal of the data distribution module is connected to the second model input terminal, the first and second output terminals are respectively connected to the input terminals of the first and second type prediction branches, and the third output terminal is connected to the third input terminal of the prediction output module.
[0018] The data distribution module is used to perform data distribution processing on the first type of prediction branch, the second type of prediction branch, or the prediction output module according to the first composite graph sent by the composite graph processing module and the model branch selection parameters input by the model; when distributing data to the first type of prediction branch or the second type of prediction branch, the data sent by the data distribution module is the first composite graph, and when distributing data to the prediction output module, the data sent is the total number of lesion areas that have completed the zero value setting.
[0019] The first type of prediction branch includes a radiomics feature extraction module, a first type of prediction model, and a first output module; the input of the radiomics feature extraction module is connected to the input of the first type of prediction branch, the first output is connected to the input of the first type of prediction model, and the second output is connected to the first input of the first output module; the output of the first type of prediction model is connected to the second input of the first output module; and the output of the first output module is connected to the first input of the prediction output module.
[0020] The radiomics feature extraction module of the first type of prediction branch is used to perform lesion area total number identification, lesion area radiomics feature extraction, and lesion area coordinate feature extraction processing on the first composite image sent by the data distribution module to obtain the corresponding total number of lesions, the complete set of first lesion area feature data, and the complete set of first lesion area coordinates; and send the obtained complete set of first lesion area feature data to the first type of prediction model; and send the obtained total number of lesions, the first composite image, and the complete set of first lesion area coordinates to the first output module;
[0021] The prediction model of the one type of prediction branch is implemented based on the model structure of a machine learning model; the types of machine learning models include at least classification prediction models implemented based on RF models, classification prediction models implemented based on SVM models, classification prediction models implemented based on GBDT models, and classification prediction models implemented based on GBDT+LR models.
[0022] The prediction model of the first type of prediction branch is used to predict each of the first radiomics feature data F in the complete set of first lesion area feature data sent by the radiomics feature extraction module. i The first prediction vector P1 is obtained by performing T-period classification prediction. i ; and from all the first prediction vectors P1 obtained i A corresponding first prediction vector set is formed and sent to the output module; wherein, the first prediction vector P1 i The vector length is L1, L1 = 5; the first prediction vector P1 i It consists of L1 first-type prediction probabilities, each first-type prediction probability corresponding to a T-period classification type; the first prediction vector P1 i The values of each of the first type prediction probabilities are between 0 and 1, and the sum of the L1 first type prediction probabilities is 1.
[0023] The output module of the first type of prediction branch is used to receive the total number of lesion areas, the first composite image, and the complete set of coordinates of the first lesion area sent by the radiomics feature extraction module, and to receive the complete set of the first prediction vectors sent by the first type of prediction model; and to perform staging marker image synthesis processing based on the complete set of the first prediction vectors, the complete set of coordinates of the first lesion area, and the first composite image to obtain the corresponding T-staging marker image; and to send the obtained total number of lesion areas and the T-staging marker image to the prediction output module;
[0024] The type II prediction branch includes a composite graph extraction module, a type II prediction model, and a two-way output module. The input of the composite graph extraction module is connected to the input of the type II prediction branch, the first output is connected to the input of the type II prediction model, and the second output is connected to the first input of the two-way output module. The output of the type II prediction model is connected to the second input of the two-way output module. The output of the two-way output module is connected to the second input of the prediction output module.
[0025] The composite image extraction module of the second-type prediction branch is used to perform lesion area total number identification, lesion area sub-image extraction, and lesion area coordinate feature extraction processing on the first composite image sent by the data distribution module to obtain the corresponding total number of lesion areas, the complete set of the first lesion area sub-images, and the complete set of the second lesion area coordinates; and sends the obtained complete set of the first lesion area sub-images to the second-type prediction model; and sends the obtained total number of lesion areas, the first composite image, and the complete set of the second lesion area coordinates to the two-way output module;
[0026] The two-class prediction model of the two-class prediction branch is implemented based on the model structure of a deep learning model. The types of deep learning models include at least classification prediction models implemented based on ResNet models and classification prediction models implemented based on Transformer models.
[0027] The second-type prediction model of the second-type prediction branch is used to predict each of the first lesion area sub-images C in the complete set of the first lesion area sub-images sent by the synthetic graph extraction module. j The second prediction vector P2 is obtained by performing T-period classification prediction. j ; and from all the second prediction vectors P2 obtained j A corresponding complete set of second prediction vectors is formed and sent to the two-way output module; the second prediction vector P2 j The vector length is L2, L2 = 5; the second prediction vector P2 j It consists of L2 second-type prediction probabilities, each second-type prediction probability corresponding to a classification type in period T; the second prediction vector P2 jThe values of each of the second type prediction probabilities are between 0 and 1, and the sum of the L2 second type prediction probabilities is 1;
[0028] The two-way output module of the second-type prediction branch is used to receive the total number of lesion areas, the first composite image, and the complete set of coordinates of the second lesion area sent by the composite image extraction module, and to receive the complete set of the second prediction vectors sent by the second-type prediction model; and to perform staging marker image synthesis processing based on the complete set of the second prediction vectors, the complete set of coordinates of the second lesion area, and the first composite image to obtain the corresponding T-stage marker image; and to send the obtained total number of lesion areas and the T-stage marker image to the prediction output module;
[0029] The output terminal of the prediction output module is connected to the output terminal of the model;
[0030] The prediction output module is used to, upon receiving the total number of lesion areas that has been set to zero from the data distribution module, compose the corresponding T-staging prediction result from the obtained total number of lesion areas and output it; it is also used to, upon receiving the total number of lesion areas and the T-staging marker map from the one-way output module or the two-way output module, compose the corresponding T-staging prediction result from the obtained total number of lesion areas and the T-staging marker map and output it.
[0031] Furthermore, the step of converting the first semantic segmentation map sent by the semantic segmentation model into a mask map to obtain a corresponding first mask map, and then performing feature stitching of the obtained first mask map and the CT image input by the model to obtain a corresponding first composite image, specifically includes:
[0032] The synthetic graph processing module traverses all the first semantic voxels of the first semantic segmentation graph; during traversal, the currently traversed first semantic voxel is taken as the corresponding current semantic voxel, and the semantic feature of the gastric cancer lesion point of the current semantic voxel is taken as the corresponding current semantic feature, and a corresponding first mask voxel is generated for the current semantic voxel and recorded as the corresponding current mask voxel; and it identifies whether the current semantic feature exceeds a preset gastric cancer lesion probability threshold. If it exceeds, the mask feature of the gastric cancer lesion area corresponding to the current mask voxel is set to 1; if it does not exceed, the mask feature of the gastric cancer lesion area corresponding to the current mask voxel is set to 0.
[0033] At the end of the traversal, a corresponding first mask image is formed by all the obtained first mask voxel points; and the obtained first mask image and the CT image input by the model are feature-stitched according to the voxel point feature channel stitching method to obtain the corresponding first composite image.
[0034] Furthermore, the step of distributing data to the first type of prediction branch, the second type of prediction branch, or the prediction output module based on the first composite graph sent by the composite graph processing module and the model branch selection parameters input by the model specifically includes:
[0035] The data distribution module counts the total number of the first synthetic voxel points on the first synthetic map to obtain a corresponding first total number; and counts the total number of the first synthetic voxel points with a mask feature of 1 in the gastric cancer lesion area to obtain a corresponding second total number; and calculates the ratio of the second total number to the first total number to obtain a corresponding first ratio.
[0036] And it identifies whether the first ratio exceeds a preset ratio threshold;
[0037] If the first ratio exceeds the ratio threshold, the model branch selection parameters input to the model are identified; if the model branch selection parameters are of type one, the first composite graph is sent to the type one prediction branch; if the model branch selection parameters are of type two, the first composite graph is sent to the type two prediction branch.
[0038] If the first ratio does not exceed the ratio threshold, the total number of corresponding lesion areas is set to 0; and the total number of lesion areas that have completed the zero value setting is sent to the prediction output module.
[0039] Furthermore, the step of performing lesion area total number identification, lesion area radiomics feature extraction, and lesion area coordinate feature extraction processing on the first composite image sent by the data distribution module to obtain the corresponding total number of lesion areas, the complete set of first lesion area feature data, and the complete set of first lesion area coordinates specifically includes:
[0040] The radiomics feature extraction module traverses all the first synthetic voxel points on the first synthetic image; and during the traversal, the currently traversed first synthetic voxel point is taken as the corresponding current synthetic voxel point, and the gastric cancer lesion mask feature and the CT image pixel value of the current synthetic voxel point are taken as the corresponding current feature and current pixel value; and when the current feature is 0, the corresponding current pixel value is reset to a preset background pixel value;
[0041] At the end of the traversal, the geometrically connected region of voxel points on the first composite image, which consists of multiple CT image pixel values that are not equal to the background pixel values, is recorded as the corresponding first lesion area A. i ; and for the first lesion area A i The total number is counted and the result is used as the total number of the corresponding lesion areas; where 1 ≤ lesion area index i ≤ total number of lesion areas; each of the first lesion areas Ai Each is composed of multiple first synthetic voxel dots;
[0042] And for each of the first lesion areas A i The first image omics feature data F is obtained by calculating the grayscale threshold feature, geometric morphology feature, and image texture feature. i Among them, the first image omics feature data F i It consists of a gray-level threshold feature vector, a geometric morphology feature vector, and an image texture feature tensor. The gray-level threshold feature vector includes the median gray level, average gray level, minimum gray level, maximum gray level, standard deviation, skewness, and peak value of the gray level distribution in the lesion area image. The geometric morphology feature vector includes the tumor surface area, tumor volume, tumor volume ratio, sphericity, compactness type, and diameter in the lesion area. The image texture feature tensor includes the gray-level co-occurrence matrix, gray-level run length matrix, gray-level size region matrix, neighborhood gray-level difference matrix, and gray-level correlation matrix in the lesion area image.
[0043] And from all the first image omics feature data F obtained i This forms a complete set of feature data for the first lesion area.
[0044] And for each of the first lesion areas A i The first voxel points within each of the first composite voxel points are identified by their three-dimensional voxel coordinates (d1, h1, w1) on the first composite image to obtain the corresponding first voxel point coordinates; wherein, 1 ≤ depth coordinate d1 ≤ depth D3 of the first composite image, 1 ≤ height coordinate h1 ≤ height H3 of the first composite image, and 1 ≤ width coordinate w1 ≤ width W3 of the first composite image.
[0045] And by each of the first lesion areas A i The coordinates of all the first voxel points together form a corresponding coordinate set S1 of the first lesion area. i ; and the obtained coordinate set S1 of all the first lesion areas i This forms a complete set of coordinates for the first lesion area.
[0046] Furthermore, the step of synthesizing the staging marker map based on the complete set of the first prediction vectors, the complete set of the first lesion area coordinates, and the first composite map to obtain the corresponding T-staging marker map specifically includes:
[0047] The output module outputs all the first prediction vectors P1 in the complete set of the first prediction vectors. iPerform a traversal; and during the traversal, the first prediction vector P1 of the current traversal is... i The current prediction vector is used as the corresponding current prediction vector; and the T-stage classification type corresponding to the first type prediction probability with the largest probability value in the current prediction vector is used as the corresponding first lesion area type;
[0048] And on the first composite image, based on the coordinate sets S1 of each of the first lesion areas of the complete set of coordinates of the first lesion area. i The edge of the corresponding lesion area is drawn by performing corresponding edge drawing processing to obtain the edge of the gastric cancer lesion area; and the corresponding first lesion area type is marked on each edge of the gastric cancer lesion area drawn in the first composite image;
[0049] The first composite image, which completes the drawing of the lesion area edge and the marking of the lesion area type, is used as the corresponding T-stage marking image.
[0050] Furthermore, the step of performing lesion area total count identification, lesion area sub-image extraction, and lesion area coordinate feature extraction processing on the first composite image sent by the data distribution module to obtain the corresponding total number of lesion areas, the complete set of the first lesion area sub-images, and the complete set of the second lesion area coordinates specifically includes:
[0051] The composite image capture module traverses all the first composite voxel points on the first composite image; and during the traversal, the currently traversed first composite voxel point is taken as the corresponding current composite voxel point, and the gastric cancer lesion mask feature and the CT image pixel value of the current composite voxel point are taken as the corresponding current feature and current pixel value; and when the current feature is 0, the corresponding current pixel value is reset to the background pixel value;
[0052] At the end of the traversal, the geometrically connected region of voxel points on the first composite image, which consists of multiple CT image pixel values that are not equal to the background pixel values, is recorded as the corresponding second lesion area B. j ; and for the second lesion area B j The total number is counted and the statistical result is used as the corresponding total number of lesion areas; where 1 ≤ lesion area index j ≤ total number of lesion areas; each of the second lesion areas B j Each is composed of multiple first synthetic voxel dots;
[0053] and each of the second lesion areas B on the first composite image j The sub-image is extracted and used as the corresponding first lesion area sub-image C. j ;
[0054] And from all the first lesion area sub-maps C obtained j Form a complete set of sub-images corresponding to the first lesion region;
[0055] And for each of the second lesion areas B j The coordinates of the corresponding second voxel point are obtained by identifying the three-dimensional coordinates (d2, h2, w2) of each of the first composite voxel points in the first composite image; wherein, 1 ≤ depth coordinate d2 ≤ depth D3 of the first composite image, 1 ≤ height coordinate h2 ≤ height H3 of the first composite image, and 1 ≤ width coordinate w2 ≤ width W3 of the first composite image.
[0056] And by each of the second lesion areas B j The coordinates of all the second voxel points together form a corresponding second lesion area coordinate set S2. j ; and the obtained coordinate set S2 of all the second lesion areas j This forms a complete set of coordinates for the second lesion area.
[0057] Furthermore, the step of synthesizing the staging marker map based on the complete set of the second prediction vectors, the complete set of the second lesion area coordinates, and the first composite map to obtain the corresponding T-staging marker map specifically includes:
[0058] The dual-output module outputs all the second prediction vectors P2 in the complete set of the second prediction vectors. j Perform a traversal; and during the traversal, the second prediction vector P2 of the current traversal is... j The current prediction vector is used as the corresponding current prediction vector; and the T-stage classification type corresponding to the second type prediction probability with the highest probability value in the current prediction vector is used as the corresponding second lesion area type;
[0059] And on the first composite image, based on the coordinate sets S2 of each of the second lesion areas of the complete set of second lesion area coordinates. j The corresponding edge of the gastric cancer lesion area is obtained by performing edge drawing processing on the corresponding lesion area; and the corresponding second lesion area type is marked on each edge of the gastric cancer lesion area drawn in the first composite image;
[0060] The first composite image, which completes the drawing of the lesion area edge and the marking of the lesion area type, is used as the corresponding T-stage marking image.
[0061] Preferably, the first dataset includes multiple first sample records;
[0062] The first sample record includes the cancer status of the first sample, the CT image of the first sample, the first label mask, the feature type set of the first sample, and the sub-image type set of the first sample;
[0063] The cancer status of the first sample includes those who do not have stomach cancer and those who have stomach cancer;
[0064] When the cancer status of the first sample is not gastric cancer, the corresponding first sample feature type set and first sample subgraph type set are both empty;
[0065] When the first sample is diagnosed with gastric cancer, the corresponding first sample feature type set consists of one or more first sample feature type records, and the corresponding first sample sub-image type set consists of one or more first sample sub-image type records, and the total number of first sample feature type records and first sample sub-image type records is the same; the first sample feature type record consists of first sample lesion area features and first sample type labels; the first sample sub-image type record consists of first sample lesion area sub-images and second sample type labels; the first and second sample type labels both include T1 type, T2 type, T3 type, T4a type, and T4b type.
[0066] Preferably, the dataset used to train the prediction model for period T is denoted as the corresponding first dataset, and specifically includes:
[0067] Step 101: A subject set is formed by recruiting multiple subjects who do not have gastric cancer, multiple subjects with gastric cancer whose tumor lesion stage includes at least T1, multiple subjects with gastric cancer whose tumor lesion stage includes at least T2, multiple subjects with gastric cancer whose tumor lesion stage includes at least T3, multiple subjects with gastric cancer whose tumor lesion stage includes at least T4a, and multiple subjects with gastric cancer whose tumor lesion stage includes at least T4b. The subject set includes multiple first subjects, each corresponding to a first cancer state. The first cancer state includes neither having gastric cancer nor having gastric cancer.
[0068] Step 102: Take the first first subject in the subject set as the corresponding current subject;
[0069] Step 103: The first cancer state corresponding to the current subject is taken as the corresponding first sample cancer state; and the most recent three-dimensional abdominal CT image of the current subject with complete three-dimensional gastric information is taken as the corresponding first sample CT image; and a first label mask image with the same shape as the first sample CT image is generated; the first label mask image includes multiple first label mask voxels, and each first label mask voxel corresponds to a mask feature of the gastric cancer lesion area;
[0070] Step 104: If the cancer status of the first sample of the current subject is not gastric cancer, then based on manual annotation or other machine annotation methods, all gastric cancer lesion mask features of the first label mask voxels of the first label mask map are labeled as 0; and the corresponding first sample feature type set and first sample sub-map type set are set to empty.
[0071] Step 105: If the cancer status of the first sample of the current subject is gastric cancer, then based on manual annotation or other machine annotation methods, all gastric cancer lesion area mask features of the first label mask voxel points on the first label mask map corresponding to the gastric cancer tumor lesion area are labeled as 1, and all gastric cancer lesion area mask features of the first label mask voxel points on the first label mask map unrelated to the gastric cancer tumor lesion area are labeled as 0; and the first label mask map and the corresponding first sample CT image are feature-stitched according to the voxel point feature channel stitching method to obtain the corresponding first sample composite image; and the radiomics of the first type of prediction branch of the T-stage prediction model are used. The feature extraction module performs lesion area total count identification, lesion area radiomics feature extraction, and lesion area coordinate feature extraction on the first sample composite image to obtain the corresponding first sample lesion area total count, first sample lesion area feature data set, and first sample lesion area coordinate set. Then, it uses each first sample lesion area feature data from the first sample lesion area feature data set as the corresponding first sample lesion area feature. Based on manual annotation or other machine annotation methods, it annotates the gastric cancer T-stage type corresponding to each first sample lesion area feature to obtain the corresponding first sample type label. Finally, each first sample lesion area feature and the corresponding first sample type label form a corresponding first sample feature class. The first sample feature type is recorded, and the first sample feature type is composed of the first sample feature type records of the total number of lesion areas of the first sample obtained; and the synthetic map extraction module of the second type prediction branch of the T-period prediction model performs lesion area total number identification, lesion area sub-map extraction and lesion area coordinate feature extraction processing on the first sample synthetic map to obtain the corresponding second lesion area total number, the complete set of first sample lesion area sub-maps and the complete set of second sample lesion area coordinates, the second lesion area total number is equal to the first lesion area total number; and each first sample lesion area sub-map of the complete set of first sample lesion area sub-maps is used as the corresponding first sample lesion area sub-map, and each is labeled according to manual annotation or other machine annotation methods. The gastric cancer T-stage type corresponding to the first sample lesion area sub-image is labeled to obtain the corresponding second sample type label. Each first sample lesion area sub-image and its corresponding second sample type label constitutes a corresponding first sample sub-image type record. The first sample sub-image type records with the total number of obtained second lesion areas constitute a corresponding first sample sub-image type set. The complete set of first sample lesion area feature data includes multiple first sample lesion area feature data, which are composed of the grayscale threshold feature vector, the geometric morphology feature vector, and the image texture feature tensor. The complete set of first sample lesion area sub-images includes multiple first sample lesion area sub-images.
[0072] Step 106: A corresponding first sample record is formed by the first sample cancer status corresponding to the current subject, the first sample CT image, the first label mask, the first sample feature type set, and the first sample sub-image type set;
[0073] Step 107: Identify whether the current subject is the last first subject in the subject set; if yes, proceed to step 108; if no, take the next first subject in the subject set as the new current subject and return to step 103.
[0074] Step 108: The first dataset is composed of all the first sample records obtained.
[0075] Preferably, the step of training the prediction model for period T based on the first dataset specifically includes:
[0076] Extract the first sample CT image and the first label mask of each first sample record in the first dataset to form a corresponding first training data record; and form a corresponding first training dataset from all the obtained first training data records.
[0077] The first sample lesion area features and first sample type labels of each first sample feature type record in the first dataset are extracted to form a corresponding second training data record; and all the obtained second training data records form a corresponding second training dataset.
[0078] The first sample lesion area sub-image and the second sample type label of each first sample sub-image type record in the first dataset are extracted to form a corresponding third training data record; and all the obtained third training data records form a corresponding third training dataset.
[0079] The semantic segmentation model of the T-period prediction model is trained based on the first training dataset.
[0080] And based on the second training dataset, the first type of prediction model of the first type of prediction branch of the prediction model for the T period is trained;
[0081] And based on the third training dataset, the second-class prediction model of the second-class prediction branch of the prediction model for period T is trained;
[0082] And after the semantic segmentation model, the first-class prediction model and the second-class prediction model have all completed training, it is confirmed that the T-period prediction model has completed model training.
[0083] A second aspect of the present invention provides an apparatus for implementing the processing method for T-phase classification prediction based on CT images as described in the first aspect above. The apparatus includes: a model building module, a training set building module, a model training module, and a model application module.
[0084] The model building module is used to construct a T-stage prediction model for predicting the T-stage classification of gastric cancer based on input CT images and model branch selection parameters, and outputting corresponding T-stage prediction results. The CT image is a three-dimensional abdominal CT image with complete three-dimensional information of the stomach. The model branch selection parameters include Class I and Class II. The T-stage prediction results include the total number of lesion areas and / or a T-stage marker map. The total number of lesion areas is an integer greater than or equal to 0. When the total number of lesion areas is 0, the T-stage prediction results do not include the T-stage marker map. When the total number of lesion areas is greater than 0, the T-stage prediction results include the T-stage marker map. The three-dimensional dimensions of the T-stage marker map are consistent with the three-dimensional dimensions of the CT image. The T-stage marker map shows the edges of the gastric cancer lesion areas corresponding to the total number of lesion areas, and marks the corresponding T-stage classification type on each edge of the gastric cancer lesion area. The T-stage classification types include T1, T2, T3, T4a, and T4b.
[0085] The training set construction module is used to construct a dataset for training the T-period prediction model, denoted as the corresponding first dataset;
[0086] The model training module is used to train the T-period prediction model based on the first dataset;
[0087] The model application module is used to perform gastric cancer T-stage classification prediction based on the T-stage prediction model that has completed model training, according to the input first CT image and the first model branch selection parameters, to obtain the corresponding first T-stage prediction result.
[0088] A third aspect of the present invention provides an electronic device, including: a memory, a processor, and a transceiver;
[0089] The processor is used to couple with the memory, read and execute instructions in the memory to implement the steps of the method described in the first aspect above;
[0090] The transceiver is coupled to the processor, and the processor controls the transceiver to send and receive messages.
[0091] A fourth aspect of the present invention provides a computer-readable storage medium storing computer instructions that, when executed by a computer, cause the computer to perform the instructions described in the first aspect.
[0092] This invention provides a processing method, apparatus, electronic device, and computer-readable storage medium for T-stage classification prediction based on CT images. As described above, this invention constructs a T-stage prediction model capable of predicting the T-stage of gastric cancer based on CT images, and trains the model using a dataset. After model training, the T-stage prediction model is used to predict the T-stage of gastric cancer based on any input CT image. The T-stage prediction model provided by this invention improves both real-time prediction performance and efficiency, while also ensuring the stability of prediction quality. Attached Figure Description
[0093] Figure 1 is a schematic diagram of a processing method for T-phase classification prediction based on CT images provided in Embodiment 1 of the present invention;
[0094] Figure 2 is a block diagram of the T-period prediction model provided in Embodiment 1 of the present invention;
[0095] Figure 3 is a module structure diagram of a processing device for T-phase classification prediction based on CT images provided in Embodiment 2 of the present invention;
[0096] Figure 4 is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. Detailed Implementation
[0097] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0098] Embodiment 1 of the present invention provides a processing method for T-phase classification prediction based on CT images. Figure 1 is a schematic diagram of a processing method for T-phase classification prediction based on CT images provided in Embodiment 1 of the present invention. The method mainly includes the following steps:
[0099] Step 1: Construct a T-stage prediction model for predicting gastric cancer T-stage classification based on input CT images and model branch selection parameters, and output the corresponding T-stage prediction results.
[0100] The CT image is a three-dimensional abdominal CT image with complete three-dimensional information of the stomach; the model branch selection parameters include Class I and Class II; the T-staging prediction results include the total number of lesion areas and / or T-staging marker maps; the total number of lesion areas is an integer greater than or equal to 0. When the total number of lesion areas is 0, the T-staging prediction results do not include T-staging marker maps, and when the total number of lesion areas is greater than 0, the T-staging prediction results include T-staging marker maps; the three-dimensional dimensions of the T-staging marker maps are consistent with the three-dimensional dimensions of the CT image; the T-staging marker maps show the edges of the gastric cancer lesion areas with the total number of lesion areas, and the corresponding T-staging classification type is marked on the edge of each gastric cancer lesion area; the T-staging classification types include T1 type, T2 type, T3 type, T4a type, and T4b type.
[0101] Here, as shown in Figure 2, which is a module structure diagram of the T-stage prediction model provided in Embodiment 1 of the present invention, the T-stage prediction model of the present invention includes a semantic segmentation model, a synthetic graph processing module, a data distribution module, a first-class prediction branch, a second-class prediction branch, and a prediction output module; the input end of the T-stage prediction model includes a first model input end and a second model input end, and the output end is denoted as the corresponding model output end; wherein, the first model input end is used to receive the CT images input by the model; the second model input end is used to receive the model branch selection parameters input by the model; and the model output end is used to output the corresponding T-stage prediction result.
[0102] The connection relationships and module functions of the T-period prediction model in this embodiment of the invention are as follows:
[0103] 1) Semantic segmentation model:
[0104] In this embodiment of the invention, the input end of the semantic segmentation model is connected to the input end of the first model, and the output end is connected to the second input end of the synthetic graph processing module.
[0105] The semantic segmentation model in this embodiment of the invention is implemented based on the model structure of the U-Net model;
[0106] The semantic segmentation model in this embodiment of the invention is used to perform semantic segmentation processing on the CT images input to the model to obtain the corresponding first semantic segmentation map, which is then sent to the composite image processing module.
[0107] The CT image has the shape D0×H0×W0×C0, where D0, H0, and W0 represent the depth, height, and width in the three-dimensional dimensions of the CT image, respectively, and C0 is the feature channel dimension of the CT image, with C0 = 1. The CT image is composed of D0×H0×W0 first CT voxels, and the unique feature corresponding to each first CT voxel is a CT image pixel value. The first semantic segmentation map has the shape D1×H1×W1×C1, where D1, H1, and W1 represent the depth, height, and width in the three-dimensional dimensions of the first semantic segmentation map, respectively, and C1 is the feature dimension of the first semantic segmentation map, with D1 = D0, H1 = H0, W1 = W0, and C1 = 1. The first semantic segmentation map is composed of D1×H1×W1 first semantic voxels, with each first semantic voxel corresponding to a first CT voxel. The unique feature corresponding to each first semantic voxel is a semantic feature of a gastric cancer lesion. The semantic feature of a gastric cancer lesion is a probability of a gastric cancer lesion with a value between 0 and 1.
[0108] 2) Composite Image Processing Module:
[0109] In this embodiment of the invention, the first input terminal of the composite graph processing module is connected to the first model input terminal, and the output terminal is connected to the second input terminal of the data distribution module.
[0110] The synthetic image processing module of this embodiment of the invention is used to perform mask image conversion on the first semantic segmentation image sent by the semantic segmentation model to obtain the corresponding first mask image, and to perform feature stitching on the obtained first mask image and the CT image input by the model to obtain the corresponding first synthetic image; and to send the first synthetic image to the data distribution module;
[0111] The first mask image has a shape of D2×H2×W2×C2, where D2, H2, and W2 represent the depth, height, and width in the three-dimensional dimensions of the first mask image, respectively, and C2 is the feature dimension of the first mask image. D2 = D1 = D0, H2 = H1 = H0, W2 = W1 = W0, and C2 = 1. The first mask image consists of D2×H2×W2 first mask voxels, each corresponding one-to-one with a first semantic voxel and a first CT voxel. The unique feature corresponding to each first mask voxel is a binary gastric cancer lesion mask feature with a value of 0 or 1. The shape of the composite image is D3×H3×W3×C3, where D3, H3, and W3 are the depth, height, and width in the three-dimensional dimensions of the first composite image, respectively, and C3 is the feature dimension of the first composite image. D3 = D2 = D0, H3 = H2 = H0, W3 = W2 = W0, and C3 = C2 + C0 = 2. The first composite image is composed of D3×H3×W3 first composite voxels. Each first composite voxel corresponds one-to-one with the first mask voxel and the first CT voxel. The C3 features corresponding to each first composite voxel are composed of the corresponding gastric cancer lesion mask features and CT image pixel values.
[0112] The first semantic segmentation image sent by the semantic segmentation model is transformed into a mask image to obtain a corresponding first mask image. The obtained first mask image and the CT image input by the model are then combined using feature stitching to obtain the corresponding first composite image. Specifically, this includes:
[0113] Step A1: The composite graph processing module traverses all first semantic voxel points of the first semantic segmentation graph; during the traversal, the currently traversed first semantic voxel point is taken as the corresponding current semantic voxel point, and the semantic feature of the gastric cancer lesion point of the current semantic voxel point is taken as the corresponding current semantic feature, and a corresponding first mask voxel point is generated for the current semantic voxel point and recorded as the corresponding current mask voxel point; and it is identified whether the current semantic feature exceeds the preset probability threshold of the gastric cancer lesion point. If it exceeds the threshold, the mask feature of the gastric cancer lesion area corresponding to the current mask voxel point is set to 1, and if it does not exceed the threshold, the mask feature of the gastric cancer lesion area corresponding to the current mask voxel point is set to 0.
[0114] Here, the probability threshold for gastric cancer lesions is a pre-set probability value parameter;
[0115] Step A2, and at the end of the traversal, a corresponding first mask image is formed by all the obtained first mask voxel points; and the obtained first mask image and the CT image input by the model are feature-stitched according to the voxel point feature channel stitching method to obtain the corresponding first composite image;
[0116] 3) Data distribution module:
[0117] In this embodiment of the invention, the first input terminal of the data distribution module is connected to the second model input terminal, the first and second output terminals are respectively connected to the input terminals of the first and second type prediction branches, and the third output terminal is connected to the third input terminal of the prediction output module.
[0118] The data distribution module of this embodiment of the invention is used to perform data distribution processing on a type I prediction branch, a type II prediction branch, or a prediction output module according to the first composite graph sent by the composite graph processing module and the model branch selection parameters input by the model.
[0119] Among them, the data distribution module sends the first composite image when distributing data to the first-class or second-class prediction branch, and sends the total number of lesion areas that have completed the zero value setting when distributing data to the prediction output module.
[0120] Based on the first composite graph sent by the composite graph processing module and the model branch selection parameters input by the model, data distribution processing is performed on the Class I prediction branch, Class II prediction branch, or prediction output module, specifically including:
[0121] Step B1: The data distribution module counts the total number of first synthetic voxel points on the first synthetic map to obtain the corresponding first total number; and counts the total number of first synthetic voxel points with a mask feature of 1 in the gastric cancer lesion area to obtain the corresponding second total number; and calculates the ratio of the second total number to the first total number to obtain the corresponding first ratio.
[0122] Step B2, and identify whether the first ratio exceeds the preset ratio threshold;
[0123] Here, the ratio threshold is a pre-set ratio value parameter;
[0124] Step B3: If the first ratio exceeds the ratio threshold, the model branch selection parameters input to the model are identified; if the model branch selection parameters are of type one, the first composite graph is sent to the type one prediction branch; if the model branch selection parameters are of type two, the first composite graph is sent to the type two prediction branch.
[0125] Step B4: If the first ratio does not exceed the ratio threshold, set the total number of corresponding lesion areas to 0; and send the total number of lesion areas that have completed the zero value setting to the prediction output module.
[0126] 4) Type I Predictive Branches:
[0127] An embodiment of the present invention includes a predictive branch comprising a radiomics feature extraction module, a predictive model, and an output module; wherein, the input end of the radiomics feature extraction module is connected to the input end of the predictive branch, the first output end is connected to the input end of the predictive model, the second output end is connected to the first input end of the output module; the output end of the predictive model is connected to the second input end of the output module; and the output end of the output module is connected to the first input end of the predictive output module.
[0128] 4a. Radiomics Feature Extraction Module:
[0129] In this embodiment of the invention, a radiomics feature extraction module for a predictive branch is used to process the first composite image sent by the data distribution module by identifying the total number of lesions, extracting radiomics features of the lesions, and extracting coordinate features of the lesions to obtain the corresponding total number of lesions, the complete set of feature data of the first lesion, and the complete set of coordinates of the first lesion; and then sending the obtained complete set of feature data of the first lesion to a predictive model; and sending the obtained total number of lesions, the first composite image, and the complete set of coordinates of the first lesion to an output module.
[0130] Specifically, the first composite image sent by the data distribution module undergoes processing including identification of the total number of lesion areas, extraction of radiomics features of lesion areas, and extraction of coordinate features of lesion areas to obtain the corresponding total number of lesion areas, the complete set of feature data of the first lesion area, and the complete set of coordinates of the first lesion area.
[0131] Step C1: The radiomics feature extraction module traverses all first synthetic voxel points on the first synthetic image; and during the traversal, the currently traversed first synthetic voxel point is taken as the corresponding current synthetic voxel point, and the gastric cancer lesion mask feature and CT image pixel value of the current synthetic voxel point are taken as the corresponding current feature and current pixel value; and when the current feature is 0, the corresponding current pixel value is reset to a preset background pixel value.
[0132] Here, the background pixel value is a pre-set pixel value parameter;
[0133] Step C2, and at the end of the traversal, the geometrically connected region of voxel points on the first composite image, which consists of multiple CT image pixel values that are not background pixel values, is recorded as the corresponding first lesion area A. i ; and for the first lesion area A i The total number is counted and the statistical results are used as the corresponding total number of lesion areas;
[0134] Where 1 ≤ lesion index i ≤ total number of lesions; each first lesion area A i Each is composed of multiple first-synthetic voxels;
[0135] Step C3, and for each first lesion area A i The first image omics feature data F is obtained by calculating the grayscale threshold feature, geometric morphology feature, and image texture feature. i ;
[0136] Among them, the first radiomics feature data F i It consists of a gray-level threshold feature vector, a geometric morphology feature vector, and an image texture feature tensor. The gray-level threshold feature vector includes the median gray level, average gray level, minimum gray level, maximum gray level, standard deviation, skewness, and peak value of the gray level distribution in the lesion area image. The geometric morphology feature vector includes the tumor surface area, tumor volume, tumor volume ratio, tumor sphericity, tumor compactness type, and tumor diameter in the lesion area image. The image texture feature tensor includes the gray-level co-occurrence matrix, gray-level run length matrix, gray-level size region matrix, neighborhood gray-level difference matrix, and gray-level correlation matrix in the lesion area image.
[0137] Here, the radiomics feature extraction module of this embodiment extracts radiomics features including first-order features, morphological features, and texture features. First-order features are actually a series of gray-level threshold features, consisting of the median, average, minimum, maximum, standard deviation, skewness, and peak value of gray levels in the CT image of a tumor region (lesion area). Morphological features are actually a series of geometric morphological features, consisting of the tumor surface area, tumor volume, tumor volume ratio, tumor sphericity, tumor compactness type, and tumor diameter in a tumor region (lesion area). Texture features are actually a series of image texture features, consisting of the gray-level co-occurrence matrix, gray-level run length matrix, gray-level size region matrix, neighborhood gray-level difference matrix, and gray-level correlation matrix in the CT image of a tumor region (lesion area). The feature extraction methods corresponding to these three types of features are publicly available technical solutions and will not be elaborated upon here.
[0138] Step C4, and based on all the first image omics feature data F obtained i This forms a complete set of characteristic data for the corresponding first lesion area;
[0139] Step C5, and for each first lesion area A i The coordinates of each first composite voxel point within the first composite image are obtained by identifying the three-dimensional coordinates (d1, h1, w1) of the voxel points.
[0140] Wherein, 1≤depth coordinate d1≤depth D3 of the first composite image, 1≤height coordinate h1≤height H3 of the first composite image, and 1≤width coordinate w1≤width W3 of the first composite image;
[0141] Step C6, and by each first lesion area A i The coordinates of all the first voxel points together form a corresponding coordinate set S1 for the first lesion area. i ; and the coordinate set S1 of all the first lesion areas obtained i This forms a complete set of coordinates for the corresponding first lesion area;
[0142] 4b. A type of prediction model:
[0143] The present invention provides a type of prediction model for a type of prediction branch based on a model structure of a machine learning model; the types of the aforementioned machine learning models include at least classification prediction models based on RF models, classification prediction models based on SVM models, classification prediction models based on GBDT models, and classification prediction models based on GBDT+LR models.
[0144] In this embodiment of the invention, a predictive model for a predictive branch is used to obtain each of the first radiomics feature data F from the complete set of first lesion area feature data sent by the radiomics feature extraction module. i The first prediction vector P1 is obtained by performing T-period classification prediction. i ; and from all the first prediction vectors P1 obtained i A corresponding first prediction vector set is formed and sent to one output module;
[0145] Among them, the first prediction vector P1 i The vector length is L1, L1 = 5; the first prediction vector is P1. i It consists of L1 first-type prediction probabilities, each first-type prediction probability corresponding to a T-period classification type; the first prediction vector P1 i The values of each of the first type prediction probabilities are between 0 and 1, and the sum of the L1 first type prediction probabilities is 1;
[0146] 4c. One-way output module:
[0147] In this embodiment of the invention, one output module of a predictive branch is used to receive the total number of lesions, the first composite map, and the complete set of coordinates of the first lesion area sent by the radiomics feature extraction module, and to receive the complete set of the first prediction vectors sent by a predictive model; and to perform staging marker map synthesis processing based on the complete set of the first prediction vectors, the complete set of coordinates of the first lesion area, and the first composite map to obtain the corresponding T-staging marker map; and to send the obtained total number of lesions and the T-staging marker map to the prediction output module;
[0148] Specifically, the T-staging marker map is obtained by synthesizing the staging marker map based on the complete set of the first prediction vectors, the complete set of coordinates of the first lesion area, and the first composite map. This includes:
[0149] Step D1: The output module performs a test on all first prediction vectors P1 in the complete set of first prediction vectors. i Perform a traversal; and during the traversal, change the first prediction vector P1 of the current traversal. i The first type of prediction probability with the highest probability value in the current prediction vector is used as the T-stage classification type, which is the corresponding first lesion area type.
[0150] Step D2, and on the first composite map, based on the coordinate sets S1 of each first lesion area (the complete set of coordinates of the first lesion area). i The edges of the corresponding lesion areas are drawn to obtain the edges of the corresponding gastric cancer lesions; and the corresponding first lesion area type is marked on the edges of each gastric cancer lesion area drawn in the first composite image.
[0151] Step D3, and use the first composite image with completed lesion area edge drawing and lesion area type marking as the corresponding T stage marking image;
[0152] 5) Type II Predicted Branches:
[0153] The two-type prediction branch in this embodiment of the invention includes a composite graph extraction module, a two-type prediction model, and a two-way output module; the input end of the composite graph extraction module is connected to the input end of the two-type prediction branch, the first output end is connected to the input end of the two-type prediction model, and the second output end is connected to the first input end of the two-way output module; the output end of the two-type prediction model is connected to the second input end of the two-way output module; and the output end of the two-way output module is connected to the second input end of the prediction output module.
[0154] 5a. Composite Image Capture Module:
[0155] In this embodiment of the invention, the composite graph extraction module of the second type of prediction branch is used to perform lesion area total number identification, lesion area sub-graph extraction, and lesion area coordinate feature extraction processing on the first composite graph sent by the data distribution module to obtain the corresponding total number of lesion areas, the complete set of the first lesion area sub-graphs, and the complete set of the second lesion area coordinates; and send the obtained complete set of the first lesion area sub-graphs to the second type of prediction model; and send the obtained total number of lesion areas, the first composite graph, and the complete set of the second lesion area coordinates to the two-way output module;
[0156] Specifically, the first composite image sent by the data distribution module undergoes processes including identification of the total number of lesion areas, extraction of lesion area sub-images, and extraction of lesion area coordinate features to obtain the corresponding total number of lesion areas, the complete set of the first lesion area sub-images, and the complete set of the second lesion area coordinates.
[0157] Step E1: The composite image capture module traverses all first composite voxel points on the first composite image; and during the traversal, the currently traversed first composite voxel point is taken as the corresponding current composite voxel point, and the gastric cancer lesion mask feature and CT image pixel value of the current composite voxel point are taken as the corresponding current feature and current pixel value; and when the current feature is 0, the corresponding current pixel value is reset to the background pixel value.
[0158] Step E2, and at the end of the traversal, the geometrically connected region of voxel points on the first composite image, which consists of multiple CT image pixel values that are not background pixel values, is recorded as the corresponding second lesion area B. j ; and for the second lesion area B j The total number is counted and the statistical results are used as the corresponding total number of lesion areas;
[0159] Where 1 ≤ lesion index j ≤ total number of lesions; each second lesion area B j Each is composed of multiple first-synthetic body particles;
[0160] Step E3, and then transfer each of the second lesion areas B on the first composite image. j The sub-image is extracted and used as the corresponding first lesion area sub-image C. j ;
[0161] Step E4, and the resulting sub-maps of all first lesion areas C j This forms a complete set of sub-images corresponding to the first lesion region;
[0162] Step E5, and for each second lesion area B j The coordinates of the corresponding second voxel point are obtained by identifying the three-dimensional coordinates (d2, h2, w2) of each first composite voxel point on the first composite image;
[0163] Wherein, 1≤depth coordinate d2≤depth D3 of the first composite image, 1≤height coordinate h2≤height H3 of the first composite image, and 1≤width coordinate w2≤width W3 of the first composite image;
[0164] Step E6, and by each second lesion area B j The coordinates of all the corresponding second voxel points form a corresponding second lesion area coordinate set S2. j ; and the coordinate set S2 of all the second lesion areas obtained j This forms a complete set of coordinates for the corresponding second lesion area;
[0165] 5b. Class II Prediction Model:
[0166] The two-class prediction model of the two-class prediction branch in this embodiment of the invention is implemented based on the model structure of a deep learning model. The types of deep learning models include at least classification prediction models implemented based on ResNet models and classification prediction models implemented based on Transformer models.
[0167] The second-class prediction model of the second-class prediction branch in this embodiment of the invention is used to predict each first lesion region sub-map C based on the complete set of first lesion region sub-maps sent by the synthetic graph extraction module. j The second prediction vector P2 is obtained by performing T-period classification prediction. j ; and from all the second prediction vectors P2 obtained j A corresponding complete set of second prediction vectors is formed and sent to the two-way output module; second prediction vector P2 j The vector length is L2, L2 = 5; the second prediction vector is P2. j It consists of L2 second-type prediction probabilities, each second-type prediction probability corresponding to a T-period classification type; the second prediction vector P2 j The values of each second-type prediction probability are between 0 and 1, and the sum of the L2 second-type prediction probabilities is 1.
[0168] 5c. Dual-output module:
[0169] In this embodiment of the invention, the two-way output module of the second type of prediction branch is used to receive the total number of lesion areas, the first composite image, and the complete set of coordinates of the second lesion area sent by the composite image extraction module, and to receive the complete set of second prediction vectors sent by the second type of prediction model; and to perform staging marker image synthesis processing based on the complete set of second prediction vectors, the complete set of coordinates of the second lesion area, and the first composite image to obtain the corresponding T-staging marker image; and to send the obtained total number of lesion areas and the T-staging marker image to the prediction output module;
[0170] Specifically, the T-staging map is obtained by synthesizing the staging map based on the complete set of the second prediction vectors, the complete set of the second lesion area coordinates, and the first composite map. This includes:
[0171] Step F1: The two-way output module performs a process on all second prediction vectors P2 in the complete set of second prediction vectors. j Perform a traversal; and during the traversal, change the second prediction vector P2 of the current traversal. j The current prediction vector is used as the corresponding current prediction vector; and the T-stage classification type corresponding to the second type prediction probability with the highest probability value in the current prediction vector is used as the corresponding second lesion area type;
[0172] Step F2, and on the first composite map, based on the coordinate sets S2 of each second lesion area of the complete set of second lesion area coordinates. j The edges of the corresponding lesion areas are drawn to obtain the edges of the corresponding gastric cancer lesions; and the corresponding second lesion area type is marked on the edges of each gastric cancer lesion area drawn in the first composite image.
[0173] Step F3, and use the first composite image with completed lesion area edge drawing and lesion area type marking as the corresponding T stage marking image;
[0174] 6) Prediction Output Module:
[0175] The output terminal of the prediction output module in this embodiment of the invention is connected to the model output terminal;
[0176] The prediction output module of this embodiment of the invention is used to form a corresponding T-staging prediction result and output it when it receives the total number of lesion areas that has been set to zero from the data distribution module; it is also used to form a corresponding T-staging prediction result and output it when it receives the total number of lesion areas and the T-staging marker map from one output module or two output modules.
[0177] Step 2: Construct a dataset for training the prediction model for period T, denoted as the first dataset.
[0178] The first dataset includes multiple first sample records; each first sample record includes the cancer status of the first sample, the CT image of the first sample, the first label mask, the feature type set of the first sample, and the sub-image type set of the first sample; the cancer status of the first sample includes not having gastric cancer and having gastric cancer; when the cancer status of the first sample is not having gastric cancer, the corresponding feature type set and the sub-image type set of the first sample are both empty; when the cancer status of the first sample is having gastric cancer, the corresponding feature type set consists of one or more first sample feature type records, and the corresponding sub-image type set consists of one or more first sample sub-image type records, and the total number of first sample feature type records and first sample sub-image type records is the same; each first sample feature type record consists of first sample lesion area features and first sample type labels; each first sample sub-image type record consists of first sample lesion area sub-images and second sample type labels; both the first and second sample type labels include T1 type, T2 type, T3 type, T4a type, and T4b type;
[0179] Specifically, this includes: Step 21, recruiting multiple subjects who do not have gastric cancer, multiple subjects who have gastric cancer and whose gastric cancer tumor lesion area has at least the T1 stage, multiple subjects who have gastric cancer and whose gastric cancer tumor lesion area has at least the T2 stage, multiple subjects who have gastric cancer and whose gastric cancer tumor lesion area has at least the T3 stage, multiple subjects who have gastric cancer and whose gastric cancer tumor lesion area has at least the T4a stage, and multiple subjects who have gastric cancer and whose gastric cancer tumor lesion area has at least the T4b stage to form a subject set;
[0180] The subject set includes multiple first subjects, each corresponding to a first cancer state; the first cancer state includes not having stomach cancer and having stomach cancer;
[0181] Step 22: The first subject in the subject set is taken as the corresponding current subject;
[0182] Step 23: Take the first cancer state corresponding to the current subject as the corresponding first sample cancer state; take the most recent three-dimensional abdominal CT image of the current subject with complete three-dimensional information of the stomach as the corresponding first sample CT image; and generate a first label mask image with the same shape as the first sample CT image.
[0183] The first label mask image includes multiple first label mask voxels, and each first label mask voxel corresponds to a gastric cancer lesion mask feature.
[0184] Step 24: If the current subject's first sample cancer status is not gastric cancer, then based on manual annotation or other machine annotation methods, label all gastric cancer lesion mask features of all first label mask voxel points of the first label mask map as 0; and set the corresponding first sample feature type set and first sample sub-map type set to empty.
[0185] Step 25: If the current subject's first sample cancer status is gastric cancer, then based on manual annotation or other machine annotation methods, all gastric cancer lesion mask features of the first label mask voxel points on the first label mask map corresponding to the gastric cancer tumor lesion area are labeled as 1, and all gastric cancer lesion mask features of the first label mask voxel points on the first label mask map unrelated to the gastric cancer tumor lesion area are labeled as 0; and the first label mask map and the corresponding first sample CT image are feature-stitched according to the voxel point feature channel stitching method to obtain the corresponding first sample composite image; Based on the radiomics feature extraction module of a prediction branch of the T-stage prediction model, the first sample composite image is processed to identify the total number of lesions, extract radiomics features of lesions, and extract coordinate features of lesions to obtain the corresponding total number of lesions in the first sample, the complete set of feature data of the first sample lesions, and the complete set of coordinates of the first sample lesions. Each feature data of the first sample lesion in the complete set of feature data is used as the corresponding feature of the first sample lesion, and the gastric cancer T-stage type corresponding to each feature of the first sample lesion is labeled based on manual annotation or other machine annotation methods. The corresponding first sample type label is obtained, and a corresponding first sample feature type record is formed by the features of each first sample lesion area and the corresponding first sample type label. The first sample feature type record, consisting of the total number of first sample lesion areas, forms the corresponding first sample feature type set. Based on the synthetic graph extraction module of the two-type prediction branch of the T-period prediction model, the first sample synthetic graph is processed to identify the total number of lesion areas, extract sub-graphs of lesion areas, and extract lesion area coordinate features to obtain the corresponding total number of second lesion areas, the complete set of first sample lesion area sub-graphs, and the complete set of second sample lesion area coordinates. The total number of the second lesion areas is equal to the total number of the first lesion areas; and each first sample lesion area sub-image in the complete set of first sample lesion area sub-images is taken as the corresponding first sample lesion area sub-image, and the gastric cancer T stage type corresponding to each first sample lesion area sub-image is labeled according to manual annotation or other machine annotation methods to obtain the corresponding second sample type label, and each first sample lesion area sub-image and the corresponding second sample type label form a corresponding first sample sub-image type record, and the first sample sub-image type records of the total number of second lesion areas form the corresponding first sample sub-image type set;
[0186] Among them, the complete set of first sample lesion area feature data includes multiple first sample lesion area feature data, which are composed of gray-level threshold feature vectors, geometric morphology feature vectors, and image texture feature tensors; the complete set of first sample lesion area sub-images includes multiple first sample lesion area sub-images.
[0187] Step 26: A corresponding first sample record is formed by the first sample cancer status, the first sample CT image, the first label mask, the first sample feature type set, and the first sample sub-image type set corresponding to the current subject;
[0188] Step 27: Identify whether the current subject is the last first subject in the subject set; if yes, proceed to step 28; if no, take the next first subject in the subject set as the new current subject and return to step 23.
[0189] Step 28: The first dataset is composed of all the first sample records obtained.
[0190] Step 3: Train the prediction model for period T based on the first dataset;
[0191] Specifically, this includes: Step 31, extracting the first sample CT image and the first label mask of each first sample record in the first dataset to form a corresponding first training data record; and forming a corresponding first training dataset from all the obtained first training data records;
[0192] Step 32: Extract the lesion area features and type labels of the first samples from each first sample feature type record of the first dataset to form a corresponding second training data record; and form the corresponding second training dataset from all the obtained second training data records.
[0193] Step 33: Extract the first sample lesion area sub-image and the second sample type label from each first sample sub-image type record of the first dataset to form a corresponding third training data record; and form the corresponding third training dataset from all the obtained third training data records.
[0194] Step 34, and train the semantic segmentation model of the prediction model for period T based on the first training dataset;
[0195] Specifically, this includes: step 3401, taking the first first training data record of the first training dataset as the corresponding current data record;
[0196] Step 3402: Use the first sample CT image and the first label mask of the current data record as the corresponding current sample CT image and current label mask;
[0197] The shape of the current sample CT image is D. s ×H s ×W s ×C s D s H s W s These represent the depth, height, and width in the three-dimensional dimensions of the current sample CT image, respectively. s C represents the feature channel dimension of the current sample CT image. s =1; The current sample CT image is generated by D s ×H s ×W s It consists of 1 second CT voxel point, and the unique feature corresponding to each second CT voxel point is a CT image pixel value;
[0198] The current label mask has a shape of D. g ×H g ×W g ×C g D g H g W g These represent the depth, height, and width of the current label mask in three dimensions, respectively. g C represents the feature channel dimension of the current label mask image. g =1; The current label mask is generated by D g ×H g ×W g It consists of a first label voxel point, and the first label voxel point corresponds one-to-one with the second CT voxel point. The unique feature corresponding to each first label voxel point is a binary gastric cancer lesion mask feature with a value of 0 or 1.
[0199] Step 3403: Input the current sample CT image into the semantic segmentation model to perform semantic segmentation processing of gastric cancer lesions to obtain the corresponding current predicted semantic segmentation map;
[0200] The shape of the current predicted semantic segmentation map is D. p ×H p ×W p ×C p D p H p W p C represents the depth, height, and width in the three-dimensional dimensions of the current predicted semantic segmentation map, respectively. p D represents the feature dimension of the current predicted semantic segmentation map. p =D s H p =H s W p =W s Cp =1; the current predicted semantic segmentation graph is generated by D p ×H p ×W p It consists of two second semantic voxels, each corresponding to a second CT voxel and a first label voxel. The unique feature corresponding to each second semantic voxel is a gastric cancer lesion semantic feature; the gastric cancer lesion semantic feature is a gastric cancer lesion probability with a value between 0 and 1.
[0201] Step 3404: Input the current predicted semantic segmentation map and the current label mask map into the preset first model loss function to calculate the corresponding first loss value;
[0202] The first model loss function is implemented based on either the L1 loss function or the L2 loss function.
[0203] Step 3405: Identify whether the first loss value meets the preset first loss value range; if the first loss value meets the first loss value range, identify whether the current data record is the last first training data record in the first training dataset; if so, proceed to step 3406; otherwise, extract the next first training data record in the first training dataset as the new current data record and return to step 3402 to continue training; if the first loss value does not meet the first loss value range, perform a round of parameter optimization on the semantic segmentation model based on the preset first model parameter optimizer in the direction of minimizing the first model loss function, and return to step 3403 to continue training when the parameter optimization ends.
[0204] The first model parameter optimizer includes at least the SDG optimizer; the first loss value range is a pre-set loss value range.
[0205] Step 3406: Solidify the model parameters of the semantic segmentation model and confirm that the model training of the semantic segmentation model is complete;
[0206] Step 35, and train a prediction model for a prediction branch of the prediction model for period T based on the second training dataset;
[0207] Specifically, this includes: Step 3501, based on M model hyperparameters SE of a class of prediction models. m The parameter setting range applies to the M model hyperparameters SE m By performing full parameter settings and combinations, multiple corresponding combinations of first hyperparameters can be obtained;
[0208] Where M is a positive integer greater than 0, 1 ≤ hyperparameter index m ≤ M; each model hyperparameter SE m The parameter setting range is N m Parameter setting options sem,n Composition, each model's hyperparameter SE m The corresponding N m All are positive integers greater than 0, 1 ≤ set option index n ≤ N m Each first hyperparameter combination consists of M first hyperparameter setting options, and each first hyperparameter setting option corresponds to a model hyperparameter SE. m One parameter setting option se m,n ;
[0209] Step 3502: Initialize the hyperparameters of a class of prediction models based on each combination of first hyperparameters to obtain the corresponding first class of prediction models;
[0210] Step 3503: Divide the second training dataset into five equal subsets according to the k-fold cross-validation method with k=5, denoted as the first, second, third, fourth, and fifth subsets. The first subset serves as an evaluation data subset, and the second, third, fourth, and fifth subsets serve as four training data subsets to form a corresponding first training evaluation set. The second subset serves as an evaluation data subset, and the first, third, fourth, and fifth subsets serve as four training data subsets to form a corresponding first training evaluation set. This process is repeated to obtain five first training evaluation sets in total.
[0211] Each of the first training and evaluation sets consists of four training data subsets and one evaluation data subset;
[0212] Step 3504: Take the first first-class prediction model as the corresponding current prediction model;
[0213] Step 3505: Use the first first training evaluation set as the corresponding current training evaluation set;
[0214] Step 3506, and the current training data subset is composed of all the second training data records of the four training data subsets of the current training evaluation set; and the current evaluation data subset is composed of all the second training data records of one evaluation data subset of the current training evaluation set;
[0215] Step 3507: Take the first second training data record of the current training data subset as the corresponding current data record;
[0216] Step 3508: Use the lesion area features of the first sample in the current data record as the corresponding first training features; and construct a first label vector with a length of L1 based on the type label of the first sample in the current data record.
[0217] The first label vector has the same structure as the prediction vector output by a prediction model, consisting of L1 first label probabilities, each of which corresponds to a T-period classification type. In the first label vector, the first label probability corresponding to the first sample type label of the current data record is 1, and the other L1-1 first label probabilities are 0.
[0218] Step 3509: Input the first training feature into the current prediction model to perform T-period classification prediction to obtain the corresponding first training prediction vector;
[0219] Step 3510: Input the first training prediction vector and the first label vector into the preset second model loss function; and perform a round of parameter optimization on the current prediction model based on the preset second model parameter optimizer in the direction of minimizing the second model loss function; and at the end of this round of parameter optimization, identify whether the current data record is the last second training data record of the current training data subset; if yes, proceed to step 3511; if no, extract the next second training data record of the current training data subset as the new current data record and return to step 3508 to continue training;
[0220] The second model loss function is based on the multi-class cross-entropy loss function; the second model parameter optimizer includes at least the SDG optimizer.
[0221] Step 3511: Initialize an L1×L1 confusion matrix, denoted as the corresponding first confusion matrix;
[0222] In this first confusion matrix, each column corresponds to a T-stage label type, each row corresponds to a T-stage prediction type, and the first confusion matrix consists of L1×L1 first matrix units, with the initial value of each first matrix unit being 0.
[0223] Step 3512: Traverse all second training data records in the current evaluation data subset; during traversal, use the currently traversed second training data record as the corresponding current data record; input the first sample lesion area feature of the current data record into the current prediction model to perform T-stage classification prediction to obtain the corresponding current training prediction vector; use the T-stage classification type corresponding to the highest prediction probability in the current training prediction vector as the corresponding current T-stage prediction type; use the first sample type label of the current data record as the corresponding current T-stage label type; use the first matrix cell in the first confusion matrix whose row index matches the current T-stage prediction type and whose column index matches the current T-stage label type as the corresponding current matrix cell; and increment the value of the current matrix cell by 1.
[0224] Step 3513: After traversing all the second training data records of the current evaluation data subset, calculate the first precision, first recall, and first F1 score based on the first confusion matrix for multi-class classification; and calculate the corresponding first comprehensive score based on the first precision, first recall, and first F1 score, where the first comprehensive score = α × first precision + β × first recall + γ × first F1 score, and α, β, and γ are three preset weighting coefficients.
[0225] Step 3514: Identify whether the current training evaluation set is the last first training evaluation set; if yes, proceed to step 3515; if no, use the next first training evaluation set as the new current training evaluation set and return to step 3506 to continue training.
[0226] Step 3515: Calculate the average of the five first comprehensive scores and use the result as the corresponding first model score;
[0227] Step 3516: Identify whether the current prediction model is the last first-class prediction model; if yes, proceed to step 3517; if no, take the next first-class prediction model as the new current prediction model and return to step 3505.
[0228] Step 3517: Select the maximum score from the multiple first model scores as the corresponding maximum model score; and take the full model parameter set of the first type prediction model corresponding to the maximum model score as the corresponding optimal model parameter set;
[0229] Step 3518: Solidify all model parameters of a class of prediction models based on the optimal model parameter set, and confirm that the model training of a class of prediction models is completed.
[0230] Step 36, and train the second-class prediction model of the second-class prediction branch of the prediction model for period T based on the third training dataset;
[0231] Specifically, it includes: Step 3601, randomly dividing the third training dataset into five equal subsets; and randomly selecting four from the five subsets to form the corresponding current training data subset, and using the remaining subset as the corresponding current evaluation data subset;
[0232] Step 3602: Take the first third training data record of the current training data subset as the corresponding current data record;
[0233] Step 3603: Use the first sample lesion area sub-image of the current data record as the corresponding first training sub-image; and construct a second label vector with a length of L2 based on the second sample type label of the current data record;
[0234] The second label vector has the same structure as the prediction vector output by the binary prediction model, consisting of L2 second label probabilities, each of which corresponds to a T-period classification type. In the second label vector, the second label probability corresponding to the second sample type label of the current data record is 1, and the remaining L2-1 second label probabilities are 0.
[0235] Step 3604: Input the first training subgraph into the binary prediction model to perform T-period classification prediction to obtain the corresponding second training prediction vector;
[0236] Step 3605: Input the second training prediction vector and the second label vector into the preset third model loss function; and perform a round of parameter optimization on the binary prediction model based on the preset third model parameter optimizer in the direction of minimizing the third model loss function; and at the end of this round of parameter optimization, identify whether the current data record is the last third training data record in the current training data subset; if yes, proceed to step 3606; if no, extract the next third training data record in the current training data subset as the new current data record and return to step 3603 to continue training;
[0237] The third model loss function is based on the multi-class cross-entropy loss function; the third model parameter optimizer includes at least the SDG optimizer.
[0238] Step 3606: Initialize an L2×L2 confusion matrix, denoted as the corresponding second confusion matrix;
[0239] In this second confusion matrix, each column corresponds to a T-stage label type, each row corresponds to a T-stage prediction type, and the second confusion matrix consists of L2×L2 second matrix units, with the initial value of each second matrix unit being 0.
[0240] Step 3607: Traverse all third training data records in the current evaluation data subset; during traversal, use the currently traversed third training data record as the corresponding current data record; input the first sample lesion area sub-image of the current data record into the binary prediction model to perform T-stage classification prediction to obtain the corresponding current training prediction vector; use the T-stage classification type corresponding to the maximum prediction probability in the current training prediction vector as the corresponding current T-stage prediction type; use the second sample type label of the current data record as the corresponding current T-stage label type; use the second matrix cell in the second confusion matrix whose row index matches the current T-stage prediction type and whose column index matches the current T-stage label type as the corresponding current matrix cell; and increment the value of the current matrix cell by 1.
[0241] Step 3608: After traversing all third training data records of the current evaluation data subset, calculate the second precision, second recall, and second F1 score based on the second confusion matrix for multi-class classification; and calculate the corresponding second comprehensive score based on the second precision, second recall, and second F1 score. Second comprehensive score = α × second precision + β × second recall + γ × second F1 score, where α, β, and γ are three preset weighting coefficients.
[0242] Step 3609: Identify whether the second comprehensive score exceeds the preset comprehensive score threshold; if it does, proceed to step 3610; if it does not, return to step 3601 to continue training.
[0243] Here, the comprehensive score threshold is a pre-set score parameter;
[0244] Step 3610: Solidify the model parameters of the two-type prediction model and confirm that the training of the two-type prediction model is completed.
[0245] Step 37, and after the semantic segmentation model, the first-class prediction model and the second-class prediction model have all been trained, confirm that the T-period prediction model has completed model training.
[0246] Step 4: Based on the completed T-stage prediction model, the gastric cancer T-stage classification prediction is performed according to the input first CT image and the first model branch selection parameters to obtain the corresponding first T-stage prediction result.
[0247] Figure 3 is a block diagram of a processing device for T-phase classification prediction based on CT images provided in Embodiment 2 of the present invention. This device can be a terminal device or server that implements the aforementioned method embodiment, or it can be a device that enables the aforementioned terminal device or server to implement the aforementioned method embodiment. For example, the device can be a device or chip system of the aforementioned terminal device or server. As shown in Figure 3, the device includes: a model building module 201, a training set building module 202, a model training module 203, and a model application module 204.
[0248] The model building module 201 is used to build a T-stage prediction model for predicting the T-stage classification of gastric cancer based on the input CT images and model branch selection parameters, and outputting the corresponding T-stage prediction results. The CT image is a three-dimensional abdominal CT image with complete three-dimensional information of the stomach. The model branch selection parameters include Class I and Class II. The T-stage prediction results include the total number of lesion areas and / or the T-stage marker map. The total number of lesion areas is an integer greater than or equal to 0. When the total number of lesion areas is 0, the T-stage prediction results do not include the T-stage marker map. When the total number of lesion areas is greater than 0, the T-stage prediction results include the T-stage marker map. The three-dimensional dimensions of the T-stage marker map are consistent with the three-dimensional dimensions of the CT image. The T-stage marker map shows the edges of the gastric cancer lesion areas with the total number of lesion areas, and marks the corresponding T-stage classification type on the edges of each gastric cancer lesion area. The T-stage classification types include T1 type, T2 type, T3 type, T4a type, and T4b type.
[0249] The training set construction module 202 is used to construct a dataset for training the prediction model for period T, denoted as the corresponding first dataset.
[0250] The model training module 203 is used to train the prediction model for period T based on the first dataset.
[0251] The model application module 204 is used to perform gastric cancer T-stage classification prediction based on the input first CT image and the first model branch selection parameters, based on the completed model training T-stage prediction model, to obtain the corresponding first T-stage prediction result.
[0252] The present invention provides a processing device for T-phase classification prediction based on CT images, which can execute the method steps in the above method embodiments. Its implementation principle and technical effect are similar, and will not be repeated here.
[0253] It should be noted that the division of the various modules in the above device is merely a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, these modules can be implemented entirely in software via processing elements; they can be fully implemented in hardware; or some modules can be implemented by processing elements calling software, while others are implemented in hardware. For example, the model building module can be a separate processing element, or it can be integrated into a chip in the above device. Alternatively, it can be stored as program code in the memory of the above device, and its functions can be called and executed by a processing element. The implementation of other modules is similar. Moreover, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed through integrated logic circuits in the hardware of the processor element or through software instructions.
[0254] For example, these modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more Digital Signal Processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs). As another example, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a System-on-a-Chip (SOC).
[0255] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the foregoing method embodiments are generated. The computer described above can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The aforementioned computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the aforementioned computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, Bluetooth, microwave, etc.) means. The aforementioned computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server or data center that integrates one or more available media. The aforementioned available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state disks (SSDs)).
[0256] Figure 4 is a schematic diagram of an electronic device provided in Embodiment 3 of the present invention. This electronic device can be a terminal device or server implementing the methods of the aforementioned embodiments, or it can be a terminal device or server connected to the aforementioned terminal device or server implementing the methods of the aforementioned embodiments. As shown in Figure 4, the electronic device may include: a processor 301 (e.g., CPU), a memory 302, and a transceiver 303; the transceiver 303 is coupled to the processor 301, and the processor 301 controls the transmission and reception operations of the transceiver 303. The memory 302 may store various instructions for completing various processing functions and implementing the processing steps described in the methods of the aforementioned embodiments. Preferably, the electronic device involved in the embodiments of the present invention further includes: a power supply 304, a system bus 305, and a communication port 306. The system bus 305 is used to realize communication connections between components. The communication port 306 is used for communication between the electronic device and other peripherals.
[0257] The system bus 305 mentioned in Figure 4 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This system bus can be divided into address bus, data bus, control bus, etc. For ease of representation, it is represented by only one thick line in the figure, but this does not indicate that there is only one bus or one type of bus. The communication interface is used to enable communication between the database access device and other devices (e.g., clients, read-write libraries, and read-only libraries). Memory may include Random Access Memory (RAM) and may also include non-volatile memory, such as at least one disk storage device.
[0258] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), graphics processing units (GPUs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0259] It should be noted that the embodiments of the present invention also provide a computer-readable storage medium storing instructions that, when run on a computer, cause the computer to perform the methods and processes provided in the above embodiments.
[0260] This invention also provides a chip for executing instructions, which is used to perform the processing steps described in the foregoing method embodiments.
[0261] This invention provides a processing method, apparatus, electronic device, and computer-readable storage medium for T-stage classification prediction based on CT images. As described above, this invention constructs a T-stage prediction model capable of predicting the T-stage of gastric cancer based on CT images, and trains the model using a dataset. After model training, the T-stage prediction model is used to predict the T-stage of gastric cancer based on any input CT image. The T-stage prediction model provided by this invention improves both real-time prediction performance and efficiency, while also ensuring the stability of prediction quality.
[0262] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0263] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0264] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A processing method for T-phase classification prediction based on CT images, characterized in that, The method includes: A T-stage prediction model is constructed to predict the T-stage classification of gastric cancer based on input CT images and model branch selection parameters, and to output the corresponding T-stage prediction results. The CT image is a three-dimensional abdominal CT image with complete three-dimensional information of the stomach. The model branch selection parameters include Class I and Class II. The T-stage prediction results include the total number of lesion areas and / or a T-stage marker map. The total number of lesion areas is an integer greater than or equal to 0. When the total number of lesion areas is 0, the T-stage prediction results do not include the T-stage marker map. When the total number of lesion areas is greater than 0, the T-stage prediction results include the T-stage marker map. The three-dimensional dimensions of the T-stage marker map are consistent with the three-dimensional dimensions of the CT image. The T-stage marker map shows the edges of the gastric cancer lesion areas corresponding to the total number of lesion areas, and the corresponding T-stage classification type is marked on each edge of the gastric cancer lesion area. The T-stage classification types include T1, T2, T3, T4a, and T4b. The dataset used for training the prediction model for period T is denoted as the corresponding first dataset; The prediction model for period T is trained based on the first dataset; Based on the completed model training, the T-stage prediction model performs gastric cancer T-stage classification prediction according to the input first CT image and the first model branch selection parameters to obtain the corresponding first T-stage prediction result.
2. The processing method for T-phase classification prediction based on CT images according to claim 1, characterized in that, The T-period prediction model includes a semantic segmentation model, a synthetic graph processing module, a data distribution module, a first-class prediction branch, a second-class prediction branch, and a prediction output module. The T-period prediction model includes a first model input terminal and a second model input terminal, and the output terminal is denoted as the corresponding model output terminal; the first model input terminal is used to receive the CT images input by the model; the second model input terminal is used to receive the model branch selection parameters input by the model. The model output is used to output the corresponding T-stage prediction result; The input of the semantic segmentation model is connected to the input of the first model, and the output is connected to the second input of the synthetic graph processing module. The semantic segmentation model is implemented based on the model structure of the U-Net model; The semantic segmentation model is used to perform semantic segmentation of gastric cancer lesions on the CT image input to the model to obtain the corresponding first semantic segmentation map, which is then sent to the synthetic image processing module. The shape of the CT image is D0×H0×W0×C0, where D0, H0, and W0 are the depth, height, and width in the three-dimensional dimensions of the CT image, respectively, and C0 is the feature channel dimension of the CT image, C0 = 1. The CT image is composed of D0×H0×W0 first CT voxels, and the unique feature corresponding to each first CT voxel is a CT image pixel value. The first semantic segmentation map has a shape of D1×H1×W1×C1, where D1, H1, and W1 are the depth, height, and width in the three-dimensional dimensions of the first semantic segmentation map, respectively, and C1 is the feature dimension of the first semantic segmentation map. D1 = D0, H1 = H0, W1 = W0, and C1 = 1. The first semantic segmentation map is composed of D1×H1×W1 first semantic voxels, and each first semantic voxel corresponds one-to-one with a first CT voxel. The unique feature corresponding to each first semantic voxel is a semantic feature of a gastric cancer lesion. The semantic feature of a gastric cancer lesion is a probability of a gastric cancer lesion with a value between 0 and 1. The first input terminal of the composite graph processing module is connected to the first model input terminal, and the output terminal is connected to the second input terminal of the data distribution module. The composite image processing module is used to perform mask image conversion based on the first semantic segmentation image sent by the semantic segmentation model to obtain a corresponding first mask image, and to perform feature stitching of the obtained first mask image and the CT image input by the model to obtain a corresponding first composite image; and to send the first composite image to the data distribution module; wherein, the shape of the first mask image is D2×H2×W2×C2, where D2, H2, and W2 are the depth, height, and width in the three-dimensional dimensions of the first mask image, respectively, C2 is the feature dimension of the first mask image, D2=D1=D0, H2=H1=H0, W2=W1=W0, C2=1; the first mask image is composed of D2×H2×W2 first mask voxels, and the first mask voxels, the first semantic voxels, and the first CT image are used to construct a composite image. Each voxel point is individually mapped, and the unique feature corresponding to each first mask voxel point is a binary gastric cancer lesion mask feature with a value of 0 or 1. The shape of the first composite image is D3×H3×W3×C3, where D3, H3, and W3 are the depth, height, and width in the three-dimensional dimensions of the first composite image, respectively, and C3 is the feature dimension of the first composite image. D3 = D2 = D0, H3 = H2 = H0, W3 = W2 = W0, and C3 = C2 + C0 = 2. The first composite image is composed of D3×H3×W3 first composite voxels, and each first composite voxel point corresponds one-to-one with the first mask voxel point and the first CT voxel point. The C3 features corresponding to each first composite voxel point are composed of the corresponding gastric cancer lesion mask feature and the CT image pixel value. The first input terminal of the data distribution module is connected to the second model input terminal, the first and second output terminals are respectively connected to the input terminals of the first and second type prediction branches, and the third output terminal is connected to the third input terminal of the prediction output module. The data distribution module is used to perform data distribution processing on the first type of prediction branch, the second type of prediction branch, or the prediction output module according to the first composite graph sent by the composite graph processing module and the model branch selection parameters input by the model; when distributing data to the first type of prediction branch or the second type of prediction branch, the data sent by the data distribution module is the first composite graph, and when distributing data to the prediction output module, the data sent is the total number of lesion areas that have completed the zero value setting. The first type of prediction branch includes a radiomics feature extraction module, a first type of prediction model, and a first output module; the input of the radiomics feature extraction module is connected to the input of the first type of prediction branch, the first output is connected to the input of the first type of prediction model, and the second output is connected to the first input of the first output module; the output of the first type of prediction model is connected to the second input of the first output module; and the output of the first output module is connected to the first input of the prediction output module. The radiomics feature extraction module of the first type of prediction branch is used to perform lesion area total number identification, lesion area radiomics feature extraction, and lesion area coordinate feature extraction processing on the first composite image sent by the data distribution module to obtain the corresponding total number of lesions, the complete set of first lesion area feature data, and the complete set of first lesion area coordinates; and send the obtained complete set of first lesion area feature data to the first type of prediction model; and send the obtained total number of lesions, the first composite image, and the complete set of first lesion area coordinates to the first output module; The prediction model of the one type of prediction branch is implemented based on the model structure of a machine learning model; the types of machine learning models include at least classification prediction models implemented based on RF models, classification prediction models implemented based on SVM models, classification prediction models implemented based on GBDT models, and classification prediction models implemented based on GBDT+LR models. The prediction model of the first type of prediction branch is used to predict each of the first radiomics feature data F in the complete set of first lesion area feature data sent by the radiomics feature extraction module. i The first prediction vector P1 is obtained by performing T-period classification prediction. i ; and from all the first prediction vectors P1 obtained i A corresponding first prediction vector set is formed and sent to the output module; wherein, the first prediction vector P1 i The vector length is L1, L1 = 5; the first prediction vector P1 i It consists of L1 first-type prediction probabilities, each first-type prediction probability corresponding to a T-period classification type; the first prediction vector P1 i The values of each of the first type prediction probabilities are between 0 and 1, and the sum of the L1 first type prediction probabilities is 1. The output module of the first type of prediction branch is used to receive the total number of lesion areas, the first composite image, and the complete set of coordinates of the first lesion area sent by the radiomics feature extraction module, and to receive the complete set of the first prediction vectors sent by the first type of prediction model; and to perform staging marker image synthesis processing based on the complete set of the first prediction vectors, the complete set of coordinates of the first lesion area, and the first composite image to obtain the corresponding T-staging marker image; and to send the obtained total number of lesion areas and the T-staging marker image to the prediction output module; The type II prediction branch includes a composite graph extraction module, a type II prediction model, and a two-way output module. The input of the composite graph extraction module is connected to the input of the type II prediction branch, the first output is connected to the input of the type II prediction model, and the second output is connected to the first input of the two-way output module. The output of the type II prediction model is connected to the second input of the two-way output module. The output of the two-way output module is connected to the second input of the prediction output module. The composite image extraction module of the second-type prediction branch is used to perform lesion area total number identification, lesion area sub-image extraction, and lesion area coordinate feature extraction processing on the first composite image sent by the data distribution module to obtain the corresponding total number of lesion areas, the complete set of the first lesion area sub-images, and the complete set of the second lesion area coordinates; and sends the obtained complete set of the first lesion area sub-images to the second-type prediction model; and sends the obtained total number of lesion areas, the first composite image, and the complete set of the second lesion area coordinates to the two-way output module; The two-class prediction model of the two-class prediction branch is implemented based on the model structure of a deep learning model. The types of deep learning models include at least classification prediction models implemented based on ResNet models and classification prediction models implemented based on Transformer models. The second-type prediction model of the second-type prediction branch is used to predict each of the first lesion area sub-images C in the complete set of the first lesion area sub-images sent by the synthetic graph extraction module. j The second prediction vector P2 is obtained by performing T-period classification prediction. j ; and from all the second prediction vectors P2 obtained j A corresponding second prediction vector set is formed and sent to the two-way output module; the second prediction vector P2 j The vector length is L2, L2 = 5; the second prediction vector P2 j It consists of L2 second-type prediction probabilities, each second-type prediction probability corresponding to a classification type in period T; the second prediction vector P2 j The values of each of the second type prediction probabilities are between 0 and 1, and the sum of the L2 second type prediction probabilities is 1; The two-way output module of the second-type prediction branch is used to receive the total number of lesion areas, the first composite image, and the complete set of coordinates of the second lesion area sent by the composite image extraction module, and to receive the complete set of the second prediction vectors sent by the second-type prediction model; and to perform staging marker image synthesis processing based on the complete set of the second prediction vectors, the complete set of coordinates of the second lesion area, and the first composite image to obtain the corresponding T-stage marker image; and to send the obtained total number of lesion areas and the T-stage marker image to the prediction output module; The output terminal of the prediction output module is connected to the output terminal of the model; The prediction output module is used to, upon receiving the total number of lesion areas that has been set to zero from the data distribution module, compose the corresponding T-staging prediction result from the obtained total number of lesion areas and output it; it is also used to, upon receiving the total number of lesion areas and the T-staging marker map from the one-way output module or the two-way output module, compose the corresponding T-staging prediction result from the obtained total number of lesion areas and the T-staging marker map and output it.
3. The processing method for T-phase classification prediction based on CT images according to claim 2, characterized in that, The step of performing mask image conversion on the first semantic segmentation map sent by the semantic segmentation model to obtain a corresponding first mask image, and then performing feature stitching on the obtained first mask image and the CT image input by the model to obtain a corresponding first composite image, specifically includes: The synthetic graph processing module traverses all the first semantic voxels of the first semantic segmentation graph; during traversal, the currently traversed first semantic voxel is taken as the corresponding current semantic voxel, and the semantic feature of the gastric cancer lesion point of the current semantic voxel is taken as the corresponding current semantic feature, and a corresponding first mask voxel is generated for the current semantic voxel and recorded as the corresponding current mask voxel; and it identifies whether the current semantic feature exceeds a preset gastric cancer lesion probability threshold. If it exceeds, the mask feature of the gastric cancer lesion area corresponding to the current mask voxel is set to 1; if it does not exceed, the mask feature of the gastric cancer lesion area corresponding to the current mask voxel is set to 0. At the end of the traversal, a corresponding first mask image is formed by all the obtained first mask voxel points; and the obtained first mask image and the CT image input by the model are feature-stitched according to the voxel point feature channel stitching method to obtain the corresponding first composite image.
4. The processing method for T-phase classification prediction based on CT images according to claim 2, characterized in that, The data distribution processing for the first type of prediction branch, the second type of prediction branch, or the prediction output module based on the first composite graph sent by the composite graph processing module and the model branch selection parameters input by the model specifically includes: The data distribution module counts the total number of the first synthetic voxel points on the first synthetic map to obtain a corresponding first total number; and counts the total number of the first synthetic voxel points with a mask feature of 1 in the gastric cancer lesion area to obtain a corresponding second total number; and calculates the ratio of the second total number to the first total number to obtain a corresponding first ratio. And it identifies whether the first ratio exceeds a preset ratio threshold; If the first ratio exceeds the ratio threshold, the model branch selection parameters input to the model are identified; if the model branch selection parameters are of type one, the first composite graph is sent to the type one prediction branch; if the model branch selection parameters are of type two, the first composite graph is sent to the type two prediction branch. If the first ratio does not exceed the ratio threshold, the total number of corresponding lesion areas is set to 0; and the total number of lesion areas that have completed the zero value setting is sent to the prediction output module.
5. The processing method for T-phase classification prediction based on CT images according to claim 2, characterized in that, The process of identifying the total number of lesion areas, extracting radiomics features of lesion areas, and extracting coordinate features of lesion areas from the first composite image sent by the data distribution module to obtain the corresponding total number of lesion areas, the complete set of feature data of the first lesion area, and the complete set of coordinates of the first lesion area specifically includes: The radiomics feature extraction module traverses all the first synthetic voxel points on the first synthetic image; and during the traversal, the currently traversed first synthetic voxel point is taken as the corresponding current synthetic voxel point, and the gastric cancer lesion mask feature and the CT image pixel value of the current synthetic voxel point are taken as the corresponding current feature and current pixel value; and when the current feature is 0, the corresponding current pixel value is reset to a preset background pixel value; At the end of the traversal, the geometrically connected region of voxel points on the first composite image, which consists of multiple CT image pixel values that are not equal to the background pixel values, is recorded as the corresponding first lesion area A. i ; and for the first lesion area A i The total number is counted and the result is used as the total number of the corresponding lesion areas; where 1 ≤ lesion area index i ≤ total number of lesion areas; each of the first lesion areas A i Each is composed of multiple first synthetic voxel dots; And for each of the first lesion areas A i The first image omics feature data F is obtained by calculating the grayscale threshold feature, geometric morphology feature, and image texture feature. i Among them, the first image omics feature data F i It consists of a gray-level threshold feature vector, a geometric morphology feature vector, and an image texture feature tensor. The gray-level threshold feature vector includes the median gray level, average gray level, minimum gray level, maximum gray level, standard deviation, skewness, and peak value of the gray level distribution in the lesion area image. The geometric morphology feature vector includes the tumor surface area, tumor volume, tumor volume ratio, sphericity, compactness type, and diameter in the lesion area. The image texture feature tensor includes the gray-level co-occurrence matrix, gray-level run length matrix, gray-level size region matrix, neighborhood gray-level difference matrix, and gray-level correlation matrix in the lesion area image. And from all the first image omics feature data F obtained i This forms a complete set of feature data for the first lesion area. And for each of the first lesion areas A i The first voxel points within each of the first composite voxel points are identified by their three-dimensional voxel coordinates (d1, h1, w1) on the first composite image to obtain the corresponding first voxel point coordinates; wherein, 1 ≤ depth coordinate d1 ≤ depth D3 of the first composite image, 1 ≤ height coordinate h1 ≤ height H3 of the first composite image, and 1 ≤ width coordinate w1 ≤ width W3 of the first composite image. And by each of the first lesion areas A i The coordinates of all the first voxel points together form a corresponding coordinate set S1 of the first lesion area. i ; and the obtained coordinate set S1 of all the first lesion areas i This forms a complete set of coordinates for the first lesion area.
6. The processing method for T-phase classification prediction based on CT images according to claim 5, characterized in that, The step of synthesizing the staging marker map based on the complete set of the first prediction vectors, the complete set of the first lesion area coordinates, and the first composite map to obtain the corresponding T-staging marker map specifically includes: The output module outputs all the first prediction vectors P1 in the complete set of the first prediction vectors. i Perform a traversal; and during the traversal, the first prediction vector P1 of the current traversal is... i The current prediction vector is used as the corresponding current prediction vector; and the T-stage classification type corresponding to the first type prediction probability with the largest probability value in the current prediction vector is used as the corresponding first lesion area type; And on the first composite image, based on the coordinate sets S1 of each of the first lesion areas of the complete set of coordinates of the first lesion area. i The edge of the corresponding lesion area is drawn by performing corresponding edge drawing processing to obtain the edge of the gastric cancer lesion area; and the corresponding first lesion area type is marked on each edge of the gastric cancer lesion area drawn in the first composite image; The first composite image, which completes the drawing of the lesion area edge and the marking of the lesion area type, is used as the corresponding T-stage marking image.
7. The processing method for T-phase classification prediction based on CT images according to claim 2, characterized in that, The process of identifying the total number of lesion areas, extracting sub-images of lesion areas, and extracting coordinate features of lesion areas from the first composite image sent by the data distribution module to obtain the corresponding total number of lesion areas, the complete set of the first lesion area sub-images, and the complete set of the second lesion area coordinates specifically includes: The composite image capture module traverses all the first composite voxel points on the first composite image; and during the traversal, the currently traversed first composite voxel point is taken as the corresponding current composite voxel point, and the gastric cancer lesion mask feature and the CT image pixel value of the current composite voxel point are taken as the corresponding current feature and current pixel value; and when the current feature is 0, the corresponding current pixel value is reset to the background pixel value; At the end of the traversal, the geometrically connected region of voxel points on the first composite image, which consists of multiple CT image pixel values that are not equal to the background pixel values, is recorded as the corresponding second lesion area B. j ; and for the second lesion area B j The total number is counted and the statistical result is used as the corresponding total number of lesion areas; where 1 ≤ lesion area index j ≤ total number of lesion areas; each of the second lesion areas B j Each is composed of multiple first synthetic voxel dots; and each of the second lesion areas B on the first composite image j The sub-image is extracted and used as the corresponding first lesion area sub-image C. j ; And from all the first lesion area sub-maps C obtained j Form a complete set of sub-images corresponding to the first lesion region; And for each of the second lesion areas B j The coordinates of the corresponding second voxel points are obtained by identifying the three-dimensional coordinates (d2, h2, w2) of each of the first composite voxel points in the first composite image; wherein, 1 ≤ depth coordinate d2 ≤ depth D3 of the first composite image, 1 ≤ height coordinate h2 ≤ height H3 of the first composite image, and 1 ≤ width coordinate w2 ≤ width W3 of the first composite image. And by each of the second lesion areas B j The coordinates of all the second voxel points together form a corresponding second lesion area coordinate set S2. j ; and the obtained coordinate set S2 of all the second lesion areas j This forms a complete set of coordinates for the second lesion area.
8. The processing method for T-phase classification prediction based on CT images according to claim 7, characterized in that, The step of synthesizing the staging marker map based on the complete set of the second prediction vectors, the complete set of the second lesion area coordinates, and the first composite map to obtain the corresponding T-staging marker map specifically includes: The dual-output module outputs all the second prediction vectors P2 in the complete set of the second prediction vectors. j Perform a traversal; and during the traversal, the second prediction vector P2 of the current traversal is... j The current prediction vector is used as the corresponding current prediction vector; and the T-stage classification type corresponding to the second type prediction probability with the highest probability value in the current prediction vector is used as the corresponding second lesion area type; And on the first composite image, based on the coordinate sets S2 of each of the second lesion areas of the complete set of second lesion area coordinates. j The corresponding edge of the gastric cancer lesion area is obtained by performing edge drawing processing on the corresponding lesion area; and the corresponding second lesion area type is marked on each edge of the gastric cancer lesion area drawn in the first composite image; The first composite image, which completes the drawing of the lesion area edge and the marking of the lesion area type, is used as the corresponding T-stage marking image.
9. The processing method for T-phase classification prediction based on CT images according to claim 2, characterized in that, The first dataset includes multiple first sample records; The first sample record includes the cancer status of the first sample, the CT image of the first sample, the first label mask, the feature type set of the first sample, and the sub-image type set of the first sample; The cancer status of the first sample includes those who do not have stomach cancer and those who have stomach cancer; When the cancer status of the first sample is not gastric cancer, the corresponding first sample feature type set and first sample subgraph type set are both empty; When the first sample is diagnosed with gastric cancer, the corresponding first sample feature type set consists of one or more first sample feature type records, and the corresponding first sample sub-image type set consists of one or more first sample sub-image type records, and the total number of first sample feature type records and first sample sub-image type records is the same; the first sample feature type record consists of first sample lesion area features and first sample type labels; the first sample sub-image type record consists of first sample lesion area sub-images and second sample type labels; the first and second sample type labels both include T1 type, T2 type, T3 type, T4a type, and T4b type.
10. The processing method for T-phase classification prediction based on CT images according to claim 9, characterized in that, The dataset used to train the prediction model for period T is denoted as the first dataset, and specifically includes: Step 101: A subject set is formed by recruiting multiple subjects who do not have gastric cancer, multiple subjects with gastric cancer whose tumor lesion stage includes at least T1, multiple subjects with gastric cancer whose tumor lesion stage includes at least T2, multiple subjects with gastric cancer whose tumor lesion stage includes at least T3, multiple subjects with gastric cancer whose tumor lesion stage includes at least T4a, and multiple subjects with gastric cancer whose tumor lesion stage includes at least T4b. The subject set includes multiple first subjects, each corresponding to a first cancer state. The first cancer state includes neither having gastric cancer nor having gastric cancer. Step 102: Take the first first subject in the subject set as the corresponding current subject; Step 103: The first cancer state corresponding to the current subject is taken as the corresponding first sample cancer state; and the most recent three-dimensional abdominal CT image of the current subject with complete three-dimensional gastric information is taken as the corresponding first sample CT image; and a first label mask image with the same shape as the first sample CT image is generated; the first label mask image includes multiple first label mask voxels, and each first label mask voxel corresponds to a mask feature of the gastric cancer lesion area; Step 104: If the cancer status of the first sample of the current subject is not gastric cancer, then based on manual annotation or other machine annotation methods, all gastric cancer lesion mask features of the first label mask voxels of the first label mask map are labeled as 0; and the corresponding first sample feature type set and first sample sub-map type set are set to empty. Step 105: If the cancer status of the first sample of the current subject is gastric cancer, then based on manual annotation or other machine annotation methods, all gastric cancer lesion area mask features of the first label mask voxel points on the first label mask map corresponding to the gastric cancer tumor lesion area are labeled as 1, and all gastric cancer lesion area mask features of the first label mask voxel points on the first label mask map unrelated to the gastric cancer tumor lesion area are labeled as 0; and the first label mask map and the corresponding first sample CT image are feature-stitched according to the voxel point feature channel stitching method to obtain the corresponding first sample composite image; and the radiomics of the first type of prediction branch of the T-stage prediction model are used. The feature extraction module performs lesion area total count identification, lesion area radiomics feature extraction, and lesion area coordinate feature extraction on the first sample composite image to obtain the corresponding first sample lesion area total count, first sample lesion area feature data set, and first sample lesion area coordinate set. Then, it uses each first sample lesion area feature data from the first sample lesion area feature data set as the corresponding first sample lesion area feature. Based on manual annotation or other machine annotation methods, it annotates the gastric cancer T-stage type corresponding to each first sample lesion area feature to obtain the corresponding first sample type label. Finally, each first sample lesion area feature and the corresponding first sample type label form a corresponding first sample feature class. The first sample feature type is recorded, and the first sample feature type is composed of the first sample feature type records of the total number of lesion areas of the first sample obtained; and the synthetic map extraction module of the second type prediction branch of the T-period prediction model performs lesion area total number identification, lesion area sub-map extraction and lesion area coordinate feature extraction processing on the first sample synthetic map to obtain the corresponding second lesion area total number, the complete set of first sample lesion area sub-maps and the complete set of second sample lesion area coordinates, the second lesion area total number is equal to the first lesion area total number; and each first sample lesion area sub-map of the complete set of first sample lesion area sub-maps is used as the corresponding first sample lesion area sub-map, and each is labeled according to manual annotation or other machine annotation methods. The gastric cancer T-stage type corresponding to the first sample lesion area sub-image is labeled to obtain the corresponding second sample type label. Each first sample lesion area sub-image and its corresponding second sample type label constitutes a corresponding first sample sub-image type record. The first sample sub-image type records with the total number of obtained second lesion areas constitute a corresponding first sample sub-image type set. The complete set of first sample lesion area feature data includes multiple first sample lesion area feature data, which are composed of the grayscale threshold feature vector, the geometric morphology feature vector, and the image texture feature tensor. The complete set of first sample lesion area sub-images includes multiple first sample lesion area sub-images. Step 106: A corresponding first sample record is formed by the first sample cancer status corresponding to the current subject, the first sample CT image, the first label mask, the first sample feature type set, and the first sample sub-image type set; Step 107: Identify whether the current subject is the last first subject in the subject set; if yes, proceed to step 108; if no, take the next first subject in the subject set as the new current subject and return to step 103. Step 108: The first dataset is composed of all the first sample records obtained.
11. The processing method for T-phase classification prediction based on CT images according to claim 9, characterized in that, The step of training the prediction model for period T based on the first dataset specifically includes: Extract the first sample CT image and the first label mask of each first sample record in the first dataset to form a corresponding first training data record; and form a corresponding first training dataset from all the obtained first training data records. The first sample lesion area features and first sample type labels of each first sample feature type record in the first dataset are extracted to form a corresponding second training data record; and all the obtained second training data records form a corresponding second training dataset. The first sample lesion area sub-image and the second sample type label of each first sample sub-image type record in the first dataset are extracted to form a corresponding third training data record; and all the obtained third training data records form a corresponding third training dataset. The semantic segmentation model of the T-period prediction model is trained based on the first training dataset. And based on the second training dataset, the first type of prediction model of the first type of prediction branch of the prediction model for the T period is trained; And based on the third training dataset, the second-class prediction model of the second-class prediction branch of the prediction model for period T is trained; And after the semantic segmentation model, the first-class prediction model and the second-class prediction model have all completed training, it is confirmed that the T-period prediction model has completed model training.
12. An apparatus for performing the processing method for T-phase classification prediction based on CT images according to any one of claims 1-11, characterized in that, The device includes: a model building module, a training set building module, a model training module, and a model application module; The model building module is used to construct a T-stage prediction model for predicting the T-stage classification of gastric cancer based on input CT images and model branch selection parameters, and outputting corresponding T-stage prediction results. The CT image is a three-dimensional abdominal CT image with complete three-dimensional information of the stomach. The model branch selection parameters include Class I and Class II. The T-stage prediction results include the total number of lesion areas and / or a T-stage marker map. The total number of lesion areas is an integer greater than or equal to 0. When the total number of lesion areas is 0, the T-stage prediction results do not include the T-stage marker map. When the total number of lesion areas is greater than 0, the T-stage prediction results include the T-stage marker map. The three-dimensional dimensions of the T-stage marker map are consistent with the three-dimensional dimensions of the CT image. The T-stage marker map shows the edges of the gastric cancer lesion areas corresponding to the total number of lesion areas, and marks the corresponding T-stage classification type on each edge of the gastric cancer lesion area. The T-stage classification types include T1, T2, T3, T4a, and T4b. The training set construction module is used to construct a dataset for training the prediction model for the T-period period, denoted as the corresponding first dataset; The model training module is used to train the T-period prediction model based on the first dataset; The model application module is used to perform gastric cancer T-stage classification prediction based on the T-stage prediction model that has completed model training, according to the input first CT image and the first model branch selection parameters, to obtain the corresponding first T-stage prediction result.
13. An electronic device, characterized in that, include: Memory, processor, and transceiver; The processor is configured to be coupled to the memory, read and execute instructions in the memory to implement the method according to any one of claims 1-11; The transceiver is coupled to the processor, and the processor controls the transceiver to send and receive messages.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a computer, cause the computer to perform the method according to any one of claims 1-11.
Citation Information
Patent Citations
Gastric cancer TNM staging prediction system based on multi-modal deep learning
CN114171187A
Colorectal cancer T staging method and system based on tumor area CT image
CN115100165A
Prediction model training method, device and equipment and image prediction method
CN115438804A
Processing method and device for carrying out T-period classification prediction based on CT (Computed Tomography) image
CN118334438A
Tumor diagnosis system and construction method thereof, terminal device and storage medium
US20240062904A1
Cited By
Gastric cancer risk prediction model construction method and system based on combined segmentation and classification network
CN121747964A