A processing method and device for T stage classification prediction based on CT images
By constructing a T-stage prediction model for CT images, the problem of low efficiency in manual identification of gastric cancer T-stage in existing technologies is solved, efficient gastric cancer T-stage classification prediction is achieved, and the real-time and stability of the prediction are improved.
Patent Information
- Application Number
- CN202410515490.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-26
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2044-04-26
AI Technical Summary
In the existing technology, the manual identification method of gastric cancer T staging based on CT images is inefficient and it is difficult to achieve efficient processing of batch CT images.
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, first-class and second-class prediction branches, and a prediction output module. Through model training and dataset construction, the T-stage classification prediction of gastric cancer in CT images was achieved.
The real-time prediction and efficiency of gastric cancer T stage classification in CT images are improved, and stable prediction quality is output.
Smart Images

Figure CN118334438B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a processing method and device for performing T-stage classification prediction based on CT images. Background Art
[0002] The T staging rule is a gastric cancer staging rule that classifies gastric cancer based on the depth of gastric tumor invasion and the state of the gastric surface. Common T staging types within this rule 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 time-consuming due to the time constraints of experts, and is particularly inefficient for batch CT image recognition. Summary of the Invention
[0003] The purpose of the present invention is to address the shortcomings of the existing technology and provide a processing method, device, electronic device, and computer-readable storage medium for T-stage classification prediction based on CT images. The present invention constructs a T-stage prediction model capable of classifying and predicting gastric cancer T-stage based on CT images, constructs a dataset for model training, and then, after model training, uses the T-stage prediction model to predict the T-stage of gastric cancer for any input CT image. The T-stage prediction model provided by the present invention not only improves the real-time prediction performance and prediction efficiency, but also outputs stable prediction quality.
[0004] To achieve the above-mentioned object, a first aspect of an embodiment of the present invention provides a processing method for T stage classification prediction based on CT images, the method comprising:
[0005] A T-stage prediction model is constructed for classifying and predicting gastric cancer T-stage according to an input CT image and model branch selection parameters and outputting a corresponding T-stage prediction result; the CT image is a three-dimensional abdominal CT image with complete three-dimensional information of the stomach; the model branch selection parameters include one category and two categories; the T-stage prediction result includes the total number of lesion areas and / or a T-stage marking map; the total number of lesion areas is an integer greater than or equal to 0, and when the total number of lesion areas is 0, the T-stage prediction result does not carry the T-stage marking map, and when the total number of lesion areas is greater than 0, the T-stage prediction result carries the T-stage marking map; the three-dimensional size of the T-stage marking map is consistent with the three-dimensional size of the CT image; the edges of the gastric cancer lesion areas of the total number of lesion areas are drawn on the T-stage marking map, and the corresponding T-stage classification type is marked on the edge of each gastric cancer lesion area; the T-stage classification types include T1 type, T2 type, T3 type, T4a type and T4b type;
[0006] A data set constructed for training the T-period prediction model is recorded as a corresponding first data set;
[0007] Performing model training on the T-stage prediction model based on the first data set;
[0008] The T stage prediction model based on the completed model training 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.
[0009] 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;
[0010] 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 recorded as a corresponding model output end; the first model input end is used to receive the CT image input by the model; the second model input end is used to receive the model branch selection parameter input by the model; the model output end is used to output the corresponding T stage prediction result;
[0011] 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 image processing module;
[0012] The semantic segmentation model is implemented based on the model structure of the U-Net model;
[0013] The semantic segmentation model is used to perform semantic segmentation processing on the gastric cancer lesion points of the CT image input by the model to obtain a corresponding first semantic segmentation map and send it to the synthetic map processing module; the shape of the CT image is D0×H0×W0×C0, 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 voxel points, and the unique feature corresponding to each first CT voxel point is a CT image pixel value; the shape of the first semantic segmentation map is 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 voxel points, each of which corresponds one-to-one to the first CT voxel points, and the unique feature corresponding to each first semantic voxel point 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;
[0014] The first input terminal of the synthetic 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;
[0015] The synthetic 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 perform feature splicing on the obtained first mask image and the CT image input by the model to obtain a corresponding first synthetic image; and send the first synthetic image to the data distribution module; wherein the shape of the first mask image is D2×H2×W2×C2, D2, H2, and W2 are respectively the depth, height, and width in the three-dimensional dimensions of the first mask image, 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 is composed of D2×H2×W2 first mask voxel points, and the first mask voxel points are aligned with the first semantic voxel points and the first CT image. The voxel points correspond one-to-one, and the unique feature corresponding to each of the first mask voxel points is a binary gastric cancer lesion area mask feature with a value of 0 or 1; the shape of the first synthetic 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 synthetic image, respectively, and C3 is the feature dimension of the first synthetic image, D3=D2=D0, H3=H2=H0, W3=W2=W0, and C3=C2+C0=2; the first synthetic image is composed of D3×H3×W3 first synthetic voxel points, and the first synthetic voxel points correspond one-to-one to the first mask voxel points and the first CT voxel points, respectively. The C3 features corresponding to each of the first synthetic voxel points are composed of the corresponding gastric cancer lesion area mask feature and the CT image pixel value;
[0016] The first input terminal of the data distribution module is connected to the second model input terminal, the first and second output terminals are connected to the input terminals of the first and second type prediction branches respectively, and the third output terminal is connected to the third input terminal of the prediction output module;
[0017] The data distribution module is configured to perform data distribution processing on the first-class prediction branch, the second-class prediction branch, or the prediction output module according to the first synthetic image sent by the synthetic image processing module and the model branch selection parameters input by the model; when distributing data to the first-class prediction branch or the second-class prediction branch, the data sent by the data distribution module is the first synthetic image, and when distributing data to the prediction output module, the data sent is the total number of lesion areas that have completed zero value setting;
[0018] The first type of prediction branch includes an imaging feature extraction module, a first type of prediction model, and an output module; the input end of the imaging feature extraction module is connected to the input end of the first type of prediction branch, the first output end is connected to the input end of the first type of prediction model, and the second output end is connected to the first input end of the output module; the output end of the first type of prediction 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 prediction output module;
[0019] The imaging omics feature extraction module of the first type of prediction branch is used to perform lesion area total number identification, lesion area imaging omics feature extraction and lesion area coordinate feature extraction processing on the first synthetic image sent by the data distribution module to obtain the corresponding lesion area total number, the first lesion area feature data set and the first lesion area coordinate set; and send the obtained first lesion area feature data set to the first type of prediction model; and send the obtained total number of lesion areas, the first synthetic image and the first lesion area coordinate set to the output module of one path;
[0020] The type of prediction model of the type of prediction branch is implemented based on a model structure of a machine learning model; the types of the machine learning model include at least a classification prediction model implemented based on an RF model, a classification prediction model implemented based on an SVM model, a classification prediction model implemented based on a GBDT model, and a classification prediction model implemented based on a GBDT+LR model;
[0021] The first type of prediction model of the first type of prediction branch is used to perform T-stage classification prediction based on each first radiomics feature data Fi of the first lesion area feature data set sent by the radiomics feature extraction module to obtain a corresponding first prediction vector P1i; and all the obtained first prediction vectors P1i are used to form a corresponding first prediction vector set and send it to the output module one path; wherein the vector length of the first prediction vector P1i is L1, L1=5; the first prediction vector P1i is composed of L1 first type prediction probabilities, each first type prediction probability corresponds to one T stage classification type; the value of each first type prediction probability of the first prediction vector P1i is between 0 and 1, and the sum of the L1 first type prediction probabilities is 1;
[0022] The output module of the first type of prediction branch is used to receive the total number of lesion areas, the first synthetic map and the first lesion area coordinate set sent by the imaging omics feature extraction module, and receive the first prediction vector set sent by the first type of prediction model; and perform staging marking map synthesis processing based on the first prediction vector set, the first lesion area coordinate set and the first synthetic map to obtain the corresponding T staging marking map; and output the obtained total number of lesion areas and the T staging marking map to the prediction output module;
[0023] The second-class prediction branch includes a synthetic image interception module, a second-class prediction model, and a two-way output module; the input end of the synthetic image interception module is connected to the input end of the second-class prediction branch, the first output end is connected to the input end of the second-class 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 second-class prediction model is connected to the second input end of the two-way output module; the output end of the two-way output module is connected to the second input end of the prediction output module;
[0024] The synthetic image interception module of the second-class prediction branch is used to perform lesion area total number identification, lesion area sub-image interception and lesion area coordinate feature extraction processing on the first synthetic image sent by the data distribution module to obtain the corresponding lesion area total number, the first lesion area sub-image full set and the second lesion area coordinate full set; and send the obtained first lesion area sub-image full set to the second-class prediction model; and send the obtained total number of lesion areas, the first synthetic image and the second lesion area coordinate full set to the two-way output module;
[0025] The second-class prediction model of the second-class prediction branch is implemented based on a model structure of a deep learning model, and the types of the deep learning model include at least a classification prediction model implemented based on a ResNet model and a classification prediction model implemented based on a Transformer model;
[0026] The second-class prediction model of the second-class prediction branch is used to perform T-stage classification prediction on each first lesion area sub-image Cj of the full set of the first lesion area sub-images sent by the synthetic image interception module to obtain a corresponding second prediction vector P2j; and all the obtained second prediction vectors P2j are used to form a corresponding second prediction vector full set and send it to the two-way output module; the vector length of the second prediction vector P2j is L2, L2=5; the second prediction vector P2j is composed of L2 second-type prediction probabilities, each second-type prediction probability corresponds to one of the T-stage classification types; the value of each second-type prediction probability of the second prediction vector P2j is between 0 and 1, and the sum of the L2 second-type prediction probabilities is 1;
[0027] The two-way output module of the second-category prediction branch is used to receive the total number of lesion areas, the first synthetic image, and the full set of coordinates of the second lesion area sent by the synthetic image interception module, and receive the full set of the second prediction vectors sent by the second-category prediction model; and perform a stage marking map synthesis process based on the second full set of prediction vectors, the second full set of coordinates of the lesion area, and the first synthetic image to obtain the corresponding T stage marking map; and output the obtained total number of lesion areas and the T stage marking map to the prediction output module;
[0028] The output end of the prediction output module is connected to the model output end;
[0029] The prediction output module is used to, upon receiving the total number of lesion areas set to zero sent by the data distribution module, compose the corresponding T staging prediction result from the obtained total number of lesion areas and output it; and is also used to, upon receiving the total number of lesion areas and the T staging marking map sent by 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 marking map and output it.
[0030] Furthermore, the step of performing mask conversion on the first semantic segmentation map sent by the semantic segmentation model to obtain a corresponding first mask map and performing feature stitching on the obtained first mask map and the CT image input by the model to obtain a corresponding first synthetic map specifically includes:
[0031] The synthetic image processing module traverses all the first semantic voxel points of the first semantic segmentation map; and during the traversal, takes the currently traversed first semantic voxel point as the corresponding current semantic voxel point, and takes the semantic feature of the gastric cancer lesion point of the current semantic voxel point as the corresponding current semantic feature, and generates a corresponding first mask voxel point for the current semantic voxel point and records it as the corresponding current mask voxel point; and identifies whether the current semantic feature exceeds a preset gastric cancer lesion point probability threshold, and if so, sets the gastric cancer lesion area mask feature corresponding to the current mask voxel point to 1; if not, sets the gastric cancer lesion area mask feature corresponding to the current mask voxel point to 0;
[0032] At the end of the traversal, all the first mask voxel points obtained are used to form a corresponding first mask image; and the first mask image obtained and the CT image input by the model are feature-spliced according to the voxel point feature channel splicing method to obtain the corresponding first synthetic image.
[0033] Furthermore, the performing data distribution processing on the first type prediction branch, the second type prediction branch or the prediction output module according to the first synthetic graph sent by the synthetic graph processing module and the model branch selection parameters of the model input specifically includes:
[0034] The data distribution module counts the total number of the first synthetic voxel points on the first synthetic image to obtain a corresponding first total number; counts the total number of the first synthetic voxel points whose mask feature of the gastric cancer lesion area is 1 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;
[0035] and identifying whether the first ratio exceeds a preset ratio threshold;
[0036] If the first ratio exceeds the ratio threshold, the model branch selection parameter of the model input is identified; if the model branch selection parameter is a first category, the first synthetic graph is sent to the first category prediction branch; if the model branch selection parameter is a second category, the first synthetic graph is sent to the second category prediction branch;
[0037] If the first ratio does not exceed the ratio threshold, the corresponding total number of lesion areas is set to 0; and the total number of lesion areas with the zero value set is sent to the prediction output module.
[0038] Furthermore, the first synthetic image sent by the data distribution module is processed to identify the total number of lesions, extract imaging features of lesions, and extract features of lesion coordinates to obtain the corresponding total number of lesions, the complete set of first lesion feature data, and the complete set of first lesion coordinates, specifically including:
[0039] The imaging feature extraction module traverses all the first synthetic voxel points on the first synthetic image; and during the traversal, uses the currently traversed first synthetic voxel point as the corresponding current synthetic voxel point, and uses the gastric cancer lesion area mask feature and the CT image pixel value of the current synthetic voxel point as the corresponding current feature and current pixel value; and resets the corresponding current pixel value to a preset background pixel value when the current feature is 0;
[0040] At the end of the traversal, a geometrically connected region of voxels on the first synthetic graph consisting of a plurality of the first synthetic voxel points whose pixel values of the CT image are not the background pixel values is recorded as a corresponding first lesion area Ai; the total number of the first lesion areas Ai is counted and the statistical result is used as the total number of the corresponding lesion areas; wherein 1≤lesion area index i≤total number of lesion areas; each first lesion area Ai is composed of a plurality of the first synthetic voxel points;
[0041] And the grayscale threshold features, geometric features and image texture features of each first lesion area Ai are feature calculated to obtain the corresponding first imaging omics feature data Fi; wherein, the first imaging omics feature data Fi is composed of a grayscale threshold feature vector, a geometric feature vector and an image texture feature tensor; the grayscale threshold feature vector includes the grayscale median of the lesion area image, the grayscale average of the lesion area image, the grayscale minimum of the lesion area image, the grayscale maximum of the lesion area image, the grayscale standard deviation of the lesion area image, the grayscale skewness of the lesion area image and the grayscale distribution peak of the lesion area image; the geometric feature vector includes the lesion area tumor surface area, the lesion area tumor volume, the lesion area tumor volume ratio, the lesion area tumor sphericity, the lesion area tumor compactness type and the lesion area tumor diameter; the image texture feature tensor includes the lesion area image grayscale co-occurrence matrix, the lesion area image grayscale run length matrix, the lesion area image grayscale size area matrix, the lesion area image neighborhood grayscale difference matrix and the lesion area image grayscale correlation matrix;
[0042] All the obtained first imaging feature data Fi form a corresponding complete set of the first lesion area feature data;
[0043] and identifying the voxel point three-dimensional coordinates (d1, h1, w1) of each first synthesized voxel point within each first lesion area Ai on the first synthesized image to obtain the corresponding first voxel point coordinates; wherein 1≤depth coordinate d1≤depth D3 of the first synthesized image, 1≤height coordinate h1≤height H3 of the first synthesized image, and 1≤width coordinate w1≤width W3 of the first synthesized image;
[0044] All the first voxel point coordinates corresponding to each first lesion area Ai form a corresponding first lesion area coordinate set S1i; and all the obtained first lesion area coordinate sets S1i form a corresponding first lesion area coordinate complete set.
[0045] Furthermore, performing a stage marking map synthesis process based on the first complete set of prediction vectors, the first complete set of lesion area coordinates, and the first synthetic map to obtain the corresponding T stage marking map specifically includes:
[0046] The output module traverses all the first prediction vectors P1i of the entire set of the first prediction vectors; and during the traversal, uses the currently traversed first prediction vector P1i as the corresponding current prediction vector; and uses the T stage classification type corresponding to the first type prediction probability with the largest probability value in the current prediction vector as the corresponding first lesion area type;
[0047] and performing corresponding lesion area edge drawing processing on the first synthetic image based on each first lesion area coordinate set S1i of the first lesion area coordinate set to obtain the corresponding gastric cancer lesion area edge; and marking the corresponding first lesion area type on each gastric cancer lesion area edge drawn in the first synthetic image;
[0048] The first synthetic image after the lesion area edge drawing and lesion area type marking is completed is used as the corresponding T stage marking image.
[0049] Furthermore, the first synthetic image sent by the data distribution module is processed to identify the total number of lesion areas, intercept the lesion area sub-image, and extract the lesion area coordinate features to obtain the corresponding total number of lesion areas, the complete set of first lesion area sub-images, and the complete set of second lesion area coordinates, specifically including:
[0050] The synthetic image interception module traverses all the first synthetic voxel points on the first synthetic image; and during the traversal, uses the currently traversed first synthetic voxel point as the corresponding current synthetic voxel point, and uses the gastric cancer lesion area mask feature and the CT image pixel value of the current synthetic voxel point as the corresponding current feature and current pixel value; and when the current feature is 0, resets the corresponding current pixel value to the background pixel value;
[0051] At the end of the traversal, a geometrically connected region of voxels on the first synthetic graph consisting of a plurality of the first synthetic voxel points whose pixel values of the CT image are not the background pixel values is recorded as a corresponding second lesion area Bj; the total number of the second lesion areas Bj is counted and the statistical result is used as the total number of the corresponding lesion areas; wherein 1≤lesion area index j≤total number of lesion areas; each second lesion area Bj is composed of a plurality of the first synthetic voxel points;
[0052] and extracting the sub-images of each second lesion area Bj on the first synthetic image as the corresponding first lesion area sub-image Cj;
[0053] and forming a corresponding complete set of first lesion area sub-graphs Cj from all the obtained first lesion area sub-graphs;
[0054] and identifying the voxel point three-dimensional coordinates (d2, h2, w2) of each of the first synthesized voxel points within each of the second lesion areas Bj on the first synthesized image to obtain corresponding second voxel point coordinates; wherein 1≤depth coordinate d2≤depth D3 of the first synthesized image, 1≤height coordinate h2≤height H3 of the first synthesized image, and 1≤width coordinate w2≤width W3 of the first synthesized image;
[0055] All the second voxel point coordinates corresponding to each second lesion area Bj form a corresponding second lesion area coordinate set S2j; and all the obtained second lesion area coordinate sets S2j form a corresponding second lesion area coordinate full set.
[0056] Furthermore, performing a stage marking map synthesis process based on the second full set of prediction vectors, the second full set of lesion area coordinates, and the first synthetic map to obtain the corresponding T stage marking map specifically includes:
[0057] The two-way output module traverses all the second prediction vectors P2j in the entire set of the second prediction vectors; and during the traversal, uses the currently traversed second prediction vector P2j as the corresponding current prediction vector; and uses the T stage classification type corresponding to the second type prediction probability with the largest probability value in the current prediction vector as the corresponding second lesion area type;
[0058] and performing corresponding lesion area edge drawing processing on each second lesion area coordinate set S2j of the second lesion area coordinate set on the first synthetic image to obtain the corresponding gastric cancer lesion area edge; and marking the corresponding second lesion area type on each gastric cancer lesion area edge drawn in the first synthetic image;
[0059] The first synthetic image after the lesion area edge drawing and lesion area type marking is completed is used as the corresponding T stage marking image.
[0060] Preferably, the first data set includes a plurality of first sample records;
[0061] The first sample record includes a first sample cancer status, a first sample CT image, a first label mask image, a first sample feature type set, and a first sample sub-image type set;
[0062] The cancer status of the first sample includes: not having gastric cancer and having gastric cancer;
[0063] When the cancer status of the first sample is not suffering from gastric cancer, the corresponding first sample feature type set and the first sample subgraph type set are both empty;
[0064] When the cancer status of the first sample is gastric cancer, the corresponding first sample feature type set consists of one or more first sample feature type records, the corresponding first sample sub-image type set consists of one or more first sample sub-image type records, and the total number of the first sample feature type records and the first sample sub-image type records is the same; the first sample feature type record consists of a first sample lesion area feature and a first sample type label; the first sample sub-image type record consists of a first sample lesion area sub-image and a second sample type label; the first and second sample type labels both include T1 type, T2 type, T3 type, T4a type, and T4b type.
[0065] Preferably, the dataset constructed for training the T-stage prediction model is recorded as the corresponding first dataset, and specifically includes:
[0066] Step 101: recruit a subject set comprising a plurality of subjects who do not have gastric cancer, a plurality of subjects who have gastric cancer and whose gastric cancer tumor lesion area has a staging type of at least T1, a plurality of subjects who have gastric cancer and whose gastric cancer tumor lesion area has a staging type of at least T2, a plurality of subjects who have gastric cancer and whose gastric cancer tumor lesion area has a staging type of at least T3, a plurality of subjects who have gastric cancer and whose gastric cancer tumor lesion area has a staging type of at least T4a, and a plurality of subjects who have gastric cancer and whose gastric cancer tumor lesion area has a staging type of at least T4b; the subject set includes a plurality of first subjects, each of the first subjects corresponding to a first cancer status; the first cancer status includes not having gastric cancer and having gastric cancer;
[0067] Step 102: taking the first subject in the subject set as the corresponding current subject;
[0068] Step 103: Using the first cancer state corresponding to the current subject as the corresponding first sample cancer state; and using the most recent three-dimensional abdominal CT image of the current subject with complete three-dimensional stomach information as the corresponding first sample CT image; and generating a first label mask image having a shape consistent with the first sample CT image; the first label mask image includes a plurality of first label mask voxel points, each of which corresponds to a mask feature of the gastric cancer lesion area;
[0069] Step 104: If the cancer status of the first sample of the current subject is not gastric cancer, the gastric cancer lesion area mask features of all the first label mask voxel points in the first label mask image are marked as 0 based on a manual labeling method or other machine labeling method; and the corresponding first sample feature type set and the first sample sub-image type set are set to empty.
[0070] Step 105: If the cancer status of the first sample of the current subject is that the subject has gastric cancer, then based on a manual labeling method or other machine labeling method, the gastric cancer lesion area mask features of all the first label mask voxel points corresponding to the gastric cancer tumor lesion area on the first label mask map are marked as 1, and the gastric cancer lesion area mask features of all the first label mask voxel points on the first label mask map that are not related to the gastric cancer tumor lesion area are marked as 0; and the first label mask map and the corresponding first sample CT image that have been marked are feature spliced in a voxel feature channel splicing method to obtain the corresponding first sample composite image; and based on the imaging omics of the first prediction branch of the T stage prediction model, The feature extraction module performs lesion area total number identification, lesion area imaging feature extraction and lesion area coordinate feature extraction processing on the first sample composite image to obtain the corresponding first sample lesion area total number, the first sample lesion area feature data set and the first sample lesion area coordinate set; and uses each first sample lesion area feature data of the first sample lesion area feature data set as the corresponding first sample lesion area feature, and labels the gastric cancer T stage type corresponding to each first sample lesion area feature based on manual labeling or other machine labeling methods to obtain the corresponding first sample type label, and each first sample lesion area feature and the corresponding first sample type label form a corresponding first sample feature class. type record, and the first sample feature type record of the total number of the first sample lesion areas obtained constitutes the corresponding first sample feature type set; and based on the synthetic image interception module of the second type prediction branch of the T period prediction model, the first sample synthetic image is subjected to lesion area total number identification, lesion area sub-image interception and lesion area coordinate feature extraction processing to obtain the corresponding second lesion area total number, the first sample lesion area sub-image full set and the second sample lesion area coordinate full set, the second lesion area total number is equal to the first lesion area total number; and each first sample lesion area sub-image of the first sample lesion area sub-image full set is used as the corresponding first sample lesion area sub-image, and each is annotated based on manual labeling or other machine labeling methods. The gastric cancer T stage type corresponding to the first sample lesion area subgraph is labeled to obtain the corresponding second sample type label, and each first sample lesion area subgraph and the corresponding second sample type label form a corresponding first sample subgraph type record, and the first sample subgraph type records of the total number of second lesion areas obtained form a corresponding first sample subgraph type set; the first sample lesion area feature data set includes multiple first sample lesion area feature data, and the first sample lesion area feature data includes the grayscale threshold feature vector, the geometric morphology feature vector and the image texture feature tensor; the first sample lesion area subgraph set includes multiple first sample lesion area subgraphs;
[0071] Step 106: Combining the first sample cancer status corresponding to the current subject, the first sample CT image, the first label mask image, the first sample feature type set, and the first sample sub-image type set into a corresponding first sample record;
[0072] Step 107: Identify whether the current subject is the last of the first subject in the subject set; if so, proceed to step 108; if not, use the next first subject in the subject set as the new current subject and return to step 103;
[0073] Step 108: All the first sample records obtained are used to form the corresponding first data set.
[0074] Preferably, the performing model training on the T-stage prediction model based on the first data set specifically includes:
[0075] extracting the first sample CT image and the first label mask image of each first sample record of the first data set to form a corresponding first training data record; and forming a corresponding first training data set from all the obtained first training data records;
[0076] and extracting the first sample lesion area feature and the first sample type label of each first sample feature type record of the first data set to form a corresponding second training data record; and forming a corresponding second training data set from all the obtained second training data records;
[0077] and extracting the first sample lesion area sub-image and the second sample type label of each first sample sub-image type record of the first data set to form a corresponding third training data record; and forming a corresponding third training data set from all the obtained third training data records;
[0078] and training the semantic segmentation model of the T-period prediction model based on the first training data set;
[0079] and training the first type of prediction model of the first type of prediction branch of the T period prediction model based on the second training data set;
[0080] and training the second type of prediction model of the second type of prediction branch of the T period prediction model based on the third training data set;
[0081] And after the semantic segmentation model, the first-category prediction model and the second-category prediction model have all completed training, it is confirmed that the T-period prediction model has completed model training.
[0082] A second aspect of an embodiment of the present invention provides a device for implementing the processing method for T-stage classification prediction based on CT images described in the first aspect, the device comprising: a model construction module, a training set construction module, a model training module, and a model application module;
[0083] The model construction module is used to construct a T-stage prediction model for classifying and predicting gastric cancer T-stage according to an input CT image and model branch selection parameters and outputting a corresponding T-stage prediction result; the CT image is a three-dimensional abdominal CT image with complete three-dimensional information of the stomach; the model branch selection parameters include one category and two categories; the T-stage prediction result includes the total number of lesion areas and / or a T-stage marking map; the total number of lesion areas is an integer greater than or equal to 0, and when the total number of lesion areas is 0, the T-stage prediction result does not carry the T-stage marking map, and when the total number of lesion areas is greater than 0, the T-stage prediction result carries the T-stage marking map; the three-dimensional size of the T-stage marking map is consistent with the three-dimensional size of the CT image; the edges of the gastric cancer lesion areas of the total number of lesion areas are drawn on the T-stage marking map, and the corresponding T-stage classification type is marked on the edge of each gastric cancer lesion area; the T-stage classification types include T1 type, T2 type, T3 type, T4a type and T4b type;
[0084] The training set construction module is used to construct a data set for training the T-period prediction model, which is recorded as the corresponding first data set;
[0085] The model training module is used to perform model training on the T-stage prediction model based on the first data set;
[0086] 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.
[0087] A third aspect of an embodiment of the present invention provides an electronic device, including: a memory, a processor, and a transceiver;
[0088] The processor is configured to be coupled to the memory, read and execute instructions in the memory, so as to implement the method steps described in the first aspect above;
[0089] The transceiver is coupled to the processor, and the processor controls the transceiver to send and receive messages.
[0090] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed by a computer, the computer executes the instructions of the method described in the first aspect above.
[0091] Embodiments of the present invention provide a processing method, apparatus, electronic device, and computer-readable storage medium for T-stage classification prediction based on CT images. As can be seen from the foregoing, embodiments of the present invention construct a T-stage prediction model capable of classifying and predicting gastric cancer T-stage based on CT images, and construct a dataset for model training. After model training is completed, gastric cancer T-stage classification prediction is performed on any input CT image based on the T-stage prediction model. The T-stage prediction model provided by embodiments of the present invention not only improves the real-time nature and efficiency of predictions, but also ensures the stability of prediction quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0092] Figure 1 A schematic diagram of a processing method for T-stage classification prediction based on CT images provided in the first embodiment of the present invention;
[0093] Figure 2 This is a module structure diagram of the T-period prediction model provided in Example 1 of the present invention;
[0094] Figure 3 This is a module structure diagram of a processing device for performing T-stage classification prediction based on CT images provided in the second embodiment of the present invention;
[0095] Figure 4 This is a structural diagram of an electronic device provided in Example 3 of the present invention. DETAILED DESCRIPTION
[0096] To make the objectives, technical solutions, and advantages of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings. It should be understood that the embodiments described herein are merely some, rather than all, of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are intended to fall within the scope of protection of the present invention.
[0097] The first embodiment of the present invention provides a processing method for T stage classification prediction based on CT images, such as Figure 1 A schematic diagram of a processing method for T-stage classification prediction based on CT images provided in the first embodiment of the present invention is shown. The method mainly includes the following steps:
[0098] Step 1: constructing a T stage prediction model for classifying and predicting gastric cancer T stage based on input CT images and model branch selection parameters and outputting corresponding T stage prediction results;
[0099] The CT image is a three-dimensional abdominal CT image with complete three-dimensional information of the stomach; the model branch selection parameters include one category and two categories; the T staging prediction result includes the total number of lesion areas and / or the T staging marking 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 staging prediction result does not carry the T staging marking map; when the total number of lesion areas is greater than 0, the T staging prediction result carries the T staging marking map; the three-dimensional size of the T staging marking map is consistent with the three-dimensional size of the CT image; the T staging marking map draws the edges of the gastric cancer lesion areas with the total number of lesion areas, and the corresponding T stage classification type is marked on the edge of each gastric cancer lesion area; the T stage classification types include T1 type, T2 type, T3 type, T4a type, and T4b type.
[0100] Here, as Figure 2 As shown in the module structure diagram of the T-stage prediction model provided in Example 1 of the present invention, the T-stage prediction model of the embodiment of the present invention includes a semantic segmentation model, a synthetic image 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 and a second model input end, and the output end is recorded as the corresponding model output end; wherein, the first model input end is used to receive the CT image 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.
[0101] The connection relationship and module functions of the T-period prediction model of the embodiment of the present invention are as follows:
[0102] 1) Semantic Segmentation Model:
[0103] The input end of the semantic segmentation model of the embodiment of the present invention is connected to the first model input end, and the output end is connected to the second input end of the synthetic image processing module;
[0104] The semantic segmentation model of the embodiment of the present invention is implemented based on the model structure of the U-Net model;
[0105] The semantic segmentation model of the embodiment of the present invention is used to perform semantic segmentation processing on the gastric cancer lesion point of the CT image input by the model to obtain a corresponding first semantic segmentation map and send it to the synthesis map processing module;
[0106] Among them, the shape of the CT image is D0×H0×W0×C0, D0, H0, and W0 are the depth, height, and width in the three-dimensional size 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 voxel points, and the unique feature corresponding to each first CT voxel point is a CT image pixel value; the shape of the first semantic segmentation map is D1×H1×W1×C1, D1, H1, and W1 are the depth, height, and width in the three-dimensional size 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 voxel points, and the first semantic voxel points correspond one-to-one to the first CT voxel points. The unique feature corresponding to each first semantic voxel point 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;
[0107] 2) Synthetic image processing module:
[0108] The first input terminal of the synthetic graph processing module of the embodiment of the present invention is connected to the first model input terminal, and the output terminal is connected to the second input terminal of the data distribution module;
[0109] The synthetic image processing module of the embodiment of the present invention 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 perform feature splicing on the obtained first mask image and the CT image input by the model to obtain a corresponding first synthetic image; and send the first synthetic image to the data distribution module;
[0110] Among them, the shape of the first mask image is D2×H2×W2×C2, D2, H2, 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 voxel points, the first mask voxel points correspond to the first semantic voxel points and the first CT voxel points respectively, and the unique feature corresponding to each first mask voxel point is a binary gastric cancer lesion area mask feature with a value of 0 or 1; the first The shape of the synthetic image is D3×H3×W3×C3, where D3, H3, and W3 are the depth, height, and width of the three-dimensional dimensions of the first synthetic image, respectively. C3 is the feature dimension of the first synthetic image, D3=D2=D0, H3=H2=H0, W3=W2=W0, and C3=C2+C0=2. The first synthetic image is composed of D3×H3×W3 first synthetic voxel points, which correspond one-to-one to the first mask voxel points and the first CT voxel points. The C3 features corresponding to each first synthetic voxel point are composed of the corresponding gastric cancer lesion area mask feature and the CT image pixel value.
[0111] Performing mask conversion on the first semantic segmentation map sent by the semantic segmentation model to obtain a corresponding first mask map, and performing feature splicing on the obtained first mask map and the CT image input by the model to obtain a corresponding first synthetic map, specifically including:
[0112] Step A1: The synthetic image processing module traverses all first semantic voxel points of the first semantic segmentation image; and during the traversal, the first semantic voxel point currently traversed is used as the corresponding current semantic voxel point, and the semantic feature of the gastric cancer lesion point of the current semantic voxel point is used 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 whether the current semantic feature exceeds a preset gastric cancer lesion point probability threshold is identified; if so, the mask feature of the gastric cancer lesion area corresponding to the current mask voxel point is set to 1; if not, the mask feature of the gastric cancer lesion area corresponding to the current mask voxel point is set to 0;
[0113] Here, the gastric cancer lesion probability threshold is a pre-set probability value parameter;
[0114] In step A2, at the end of the traversal, all the obtained first mask voxel points are combined into a corresponding first mask image; and feature splicing is performed on the obtained first mask image and the CT image input by the model according to the voxel point feature channel splicing method to obtain a corresponding first synthetic image;
[0115] 3) Data distribution module:
[0116] The first input terminal of the data distribution module of the embodiment of the present invention is connected to the second model input terminal, the first and second output terminals are connected to the input terminals of the first and second type prediction branches respectively, and the third output terminal is connected to the third input terminal of the prediction output module;
[0117] The data distribution module of the embodiment of the present invention is used to perform data distribution processing on the first-class prediction branch, the second-class prediction branch or the prediction output module according to the first synthetic graph sent by the synthetic graph processing module and the model branch selection parameters input by the model;
[0118] The data distribution module sends the first synthetic image when distributing data to the first prediction branch or the second prediction branch, and the data sent to the prediction output module when distributing data is the total number of lesion areas that have completed zero value setting;
[0119] Performing data distribution processing on the first-class prediction branch, the second-class prediction branch or the prediction output module according to the first synthetic graph sent by the synthetic graph processing module and the model branch selection parameters input by the model, specifically including:
[0120] Step B1: The data distribution module counts the total number of first synthesized voxel points on the first synthesized image to obtain a corresponding first total number; counts the total number of first synthesized voxel points in the gastric cancer lesion area with a mask feature of 1 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;
[0121] Step B2, identifying whether the first ratio exceeds a preset ratio threshold;
[0122] Here, the ratio threshold is a preset ratio value parameter;
[0123] Step B3: If the first ratio exceeds the ratio threshold, the model branch selection parameters of the model input are identified; if the model branch selection parameters are class I, the first synthetic graph is sent to the class I prediction branch; if the model branch selection parameters are class II, the first synthetic graph is sent to the class II prediction branch;
[0124] Step B4: if the first ratio does not exceed the ratio threshold, setting the corresponding total number of lesion areas to 0; and sending the total number of lesion areas with the zero value set to 0 to the prediction output module;
[0125] 4) Type 1 prediction branch:
[0126] A prediction branch of an embodiment of the present invention includes an imaging omics feature extraction module, a prediction model, and an output module; wherein the input end of the imaging omics feature extraction module is connected to the input end of the prediction branch, the first output end is connected to the input end of the prediction model, and the second output end is connected to the first input end of the output module; the output end of the prediction 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 prediction output module.
[0127] 4a. Radiomics feature extraction module:
[0128] The imaging omics feature extraction module of the first prediction branch of the embodiment of the present invention is used to perform total lesion area identification, lesion area imaging omics feature extraction, and lesion area coordinate feature extraction processing on the first synthetic image sent by the data distribution module to obtain the corresponding total lesion area, the first lesion area feature data set, and the first lesion area coordinate set; and send the obtained first lesion area feature data set to the first prediction model; and send the obtained total lesion area, the first synthetic image, and the first lesion area coordinate set to the output module of the first path;
[0129] The first synthetic image sent by the data distribution module is processed to identify the total number of lesions, extract imaging features of lesions, and extract features of lesion coordinates to obtain the corresponding total number of lesions, the complete set of first lesion feature data, and the complete set of first lesion coordinates, specifically including:
[0130] In step C1, the radiomics feature extraction module traverses all first synthetic voxel points on the first synthetic image; during the traversal, the currently traversed first synthetic voxel point is used as the corresponding current synthetic voxel point, and the gastric cancer lesion area mask feature and CT image pixel value of the current synthetic voxel point are used 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;
[0131] Here, the background pixel value is a pre-set pixel value parameter;
[0132] Step C2: At the end of the traversal, a geometrically connected region of voxels on the first synthetic image consisting of a plurality of first synthetic voxel points whose CT image pixel values are not background pixel values is recorded as a corresponding first lesion area Ai; and the total number of the first lesion areas Ai is counted and the result of the count is used as the total number of the corresponding lesion areas;
[0133] Wherein, 1≤lesion area index i≤total number of lesion areas; each first lesion area Ai is composed of multiple first synthetic voxel points;
[0134] Step C3, performing feature calculation on the grayscale threshold feature, geometric morphology feature, and image texture feature of each first lesion area Ai to obtain corresponding first radiomics feature data Fi;
[0135] Among them, the first radiomics feature data Fi is composed of a grayscale threshold feature vector, a geometric morphology feature vector and an image texture feature tensor; the grayscale threshold feature vector includes the grayscale median value of the lesion area image, the grayscale average value of the lesion area image, the grayscale minimum value of the lesion area image, the grayscale maximum value of the lesion area image, the grayscale standard deviation of the lesion area image, the grayscale skewness of the lesion area image and the grayscale distribution peak value of the lesion area image; the geometric morphology feature vector includes the tumor surface area of the lesion area, the tumor volume of the lesion area, the tumor volume ratio of the lesion area, the sphericity of the lesion area tumor, the compactness type of the lesion area tumor and the tumor diameter of the lesion area; the image texture feature tensor includes the grayscale co-occurrence matrix of the lesion area image, the grayscale run length matrix of the lesion area image, the grayscale size area matrix of the lesion area image, the grayscale difference matrix of the lesion area image neighborhood and the grayscale correlation matrix of the lesion area image;
[0136] Here, the imaging features extracted by the imaging feature extraction module of the embodiment of the present invention include first-order features, morphological features, and texture features. The so-called first-order features are actually a series of grayscale threshold features, which are composed of the grayscale median, grayscale mean, grayscale minimum, grayscale maximum, grayscale standard deviation, grayscale skewness, and grayscale distribution peak of the CT image in a tumor region, i.e., the lesion region. The so-called morphological features are actually a series of geometric morphological features, which are composed of the tumor surface area, tumor volume, tumor volume ratio, tumor sphericity, tumor compactness type, and tumor diameter in a tumor region, i.e., the lesion region. The so-called texture features are actually a series of image texture features, which are composed of the grayscale co-occurrence matrix, grayscale run length matrix, grayscale size area matrix, neighborhood grayscale difference matrix, and grayscale correlation matrix of the CT image in a tumor region, i.e., the lesion region. The feature extraction methods corresponding to these three types of features are all public technical solutions and will not be described one by one here.
[0137] Step C4, forming a corresponding first lesion area feature data set from all the obtained first radiomics feature data Fi;
[0138] Step C5, identifying the voxel point three-dimensional coordinates (d1, h1, w1) of each first synthesized voxel point in each first lesion area Ai on the first synthesized image to obtain the corresponding first voxel point coordinates;
[0139] Wherein, 1≤depth coordinate d1≤depth D3 of the first synthetic image, 1≤height coordinate h1≤height H3 of the first synthetic image, 1≤width coordinate w1≤width W3 of the first synthetic image;
[0140] Step C6: All first voxel point coordinates corresponding to each first lesion area Ai form a corresponding first lesion area coordinate set S1i; and all obtained first lesion area coordinate sets S1i form a corresponding first lesion area coordinate complete set;
[0141] 4b. A type of prediction model:
[0142] In an embodiment of the present invention, a prediction model of a prediction branch is implemented based on a model structure of a machine learning model; the types of the above-mentioned machine learning model include at least a classification prediction model implemented based on an RF model, a classification prediction model implemented based on an SVM model, a classification prediction model implemented based on a GBDT model, and a classification prediction model implemented based on a GBDT+LR model;
[0143] In an embodiment of the present invention, a prediction model of a prediction branch of a type I is used to perform T-stage classification prediction based on each first radiomics feature data Fi of the first lesion area feature data set sent by the radiomics feature extraction module to obtain a corresponding first prediction vector P1i; and all the obtained first prediction vectors P1i are combined into a corresponding first prediction vector set and sent to an output module of a type I;
[0144] The vector length of the first prediction vector P1i is L1, where L1=5. The first prediction vector P1i is composed of L1 first-type prediction probabilities, each of which corresponds to a T-period classification type. The value of each first-type prediction probability in the first prediction vector P1i is between 0 and 1, and the sum of the L1 first-type prediction probabilities is 1.
[0145] 4c. One-way output module:
[0146] An output module of a prediction branch of the embodiment of the present invention is configured to receive the total number of lesion areas, the first synthetic image, and the complete set of first lesion area coordinates sent by the imaging omics feature extraction module, and receive the complete set of first prediction vectors sent by the prediction model; perform a stage marker synthesis process based on the complete set of first prediction vectors, the complete set of first lesion area coordinates, and the first synthetic image to obtain a corresponding T stage marker; and transmit the obtained total number of lesion areas and the T stage marker to the prediction output module;
[0147] The step of synthesizing the staging marking map according to the first prediction vector set, the first lesion area coordinate set, and the first synthesized map to obtain the corresponding T staging marking map specifically includes:
[0148] In step D1, an output module traverses all first prediction vectors P1i of the entire set of first prediction vectors; during the traversal, the currently traversed first prediction vector P1i 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;
[0149] Step D2: performing corresponding lesion area edge drawing processing on the first composite image based on each first lesion area coordinate set S1i of the complete set of first lesion area coordinates to obtain corresponding gastric cancer lesion area edges; and marking the corresponding first lesion area type on each gastric cancer lesion area edge drawn in the first composite image;
[0150] Step D3: using the first composite image after the lesion area edge drawing and lesion area type marking as the corresponding T stage marking image;
[0151] 5) Second type of prediction branch:
[0152] The second-class prediction branch of the embodiment of the present invention includes a synthetic image interception module, a second-class prediction model, and a two-way output module; the input end of the synthetic image interception module is connected to the input end of the second-class prediction branch, the first output end is connected to the input end of the second-class 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 second-class prediction model is connected to the second input end of the two-way output module; the output end of the two-way output module is connected to the second input end of the prediction output module;
[0153] 5a. Synthetic image capture module:
[0154] The synthetic image interception module of the second type prediction branch of the embodiment of the present invention is used to perform lesion area total number identification, lesion area sub-image interception and lesion area coordinate feature extraction processing on the first synthetic image sent by the data distribution module to obtain the corresponding lesion area total number, the first lesion area sub-image full set and the second lesion area coordinate full set; and send the obtained first lesion area sub-image full set to the second type prediction model; and send the obtained total number of lesion areas, the first synthetic image and the second lesion area coordinate full set to the two-way output module;
[0155] The first synthetic image sent by the data distribution module is processed to identify the total number of lesion areas, intercept the lesion area sub-image, and extract the 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, specifically including:
[0156] In step E1, the synthetic image interception module traverses all first synthetic voxel points on the first synthetic image; during the traversal, the currently traversed first synthetic voxel point is used as the corresponding current synthetic voxel point, and the gastric cancer lesion area mask feature and CT image pixel value of the current synthetic voxel point are used 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;
[0157] Step E2: At the end of the traversal, a geometrically connected region of voxels on the first synthetic image consisting of a plurality of first synthetic voxel points whose CT image pixel values are not background pixel values is recorded as a corresponding second lesion area Bj; and the total number of the second lesion areas Bj is counted and the result of the count is used as the total number of the corresponding lesion areas;
[0158] Wherein, 1≤lesion area index j≤total number of lesion areas; each second lesion area Bj is composed of multiple first synthetic voxel points;
[0159] Step E3: extracting the sub-images of the second lesion areas Bj on the first composite image as the corresponding first lesion area sub-images Cj;
[0160] Step E4, forming a corresponding complete set of first lesion area sub-images Cj from all the obtained first lesion area sub-images;
[0161] Step E5, identifying the voxel point three-dimensional coordinates (d2, h2, w2) of each first synthesized voxel point in each second lesion area Bj on the first synthesized image to obtain the corresponding second voxel point coordinates;
[0162] Wherein, 1≤depth coordinate d2≤depth D3 of the first synthetic image, 1≤height coordinate h2≤height H3 of the first synthetic image, 1≤width coordinate w2≤width W3 of the first synthetic image;
[0163] Step E6: forming a corresponding second lesion area coordinate set S2j from all second voxel point coordinates corresponding to each second lesion area Bj; and forming a corresponding second lesion area coordinate complete set from all obtained second lesion area coordinate sets S2j;
[0164] 5b. Second-class prediction model:
[0165] The second-class prediction model of the second-class prediction branch in the embodiment of the present invention is implemented based on the model structure of a deep learning model. The types of deep learning models include at least a classification prediction model implemented based on a ResNet model and a classification prediction model implemented based on a Transformer model.
[0166] The second-class prediction model of the second-class prediction branch of the embodiment of the present invention is used to perform T-stage classification prediction on each first lesion area sub-image Cj of the full set of first lesion area sub-images sent by the synthetic image interception module to obtain a corresponding second prediction vector P2j; and all the obtained second prediction vectors P2j are combined into a corresponding full set of second prediction vectors and sent to the two-way output module; the vector length of the second prediction vector P2j is L2, L2=5; the second prediction vector P2j is composed of L2 second-type prediction probabilities, each second-type prediction probability corresponds to a T-stage classification type; the value of each second-type prediction probability of the second prediction vector P2j is between 0 and 1, and the sum of the L2 second-type prediction probabilities is 1;
[0167] 5c. Two-way output module:
[0168] The two-way output module of the second type prediction branch of the embodiment of the present invention is used to receive the total number of lesion areas, the first synthetic image, and the full set of second lesion area coordinates sent by the synthetic image interception module, and receive the full set of second prediction vectors sent by the second type prediction model; and perform a stage marking map synthesis process based on the full set of second prediction vectors, the full set of second lesion area coordinates, and the first synthetic image to obtain a corresponding T stage marking map; and output the obtained total number of lesion areas and the T stage marking map to the prediction output module;
[0169] The step of synthesizing the staging marking map according to the full set of the second prediction vectors, the full set of the second lesion area coordinates, and the first synthesized map to obtain the corresponding T staging marking map specifically includes:
[0170] In step F1, the two-way output module traverses all second prediction vectors P2j in the entire set of second prediction vectors; during the traversal, the currently traversed second prediction vector P2j is used as the corresponding current prediction vector; and the T stage classification type corresponding to the second type prediction probability with the largest probability value in the current prediction vector is used as the corresponding second lesion area type;
[0171] Step F2: performing corresponding lesion area edge drawing processing on the first composite image based on each second lesion area coordinate set S2j in the complete set of second lesion area coordinates to obtain corresponding gastric cancer lesion area edges; and marking the corresponding second lesion area type on each gastric cancer lesion area edge drawn in the first composite image;
[0172] Step F3: The first composite image after the lesion area edge drawing and lesion area type marking is used as the corresponding T stage marking image;
[0173] 6) Prediction output module:
[0174] The output terminal of the prediction output module of the embodiment of the present invention is connected to the model output terminal;
[0175] The prediction output module of an embodiment of the present invention is used to, upon receiving the total number of lesion areas set to zero from the data distribution module, compose a corresponding T staging prediction result from the obtained total number of lesion areas and output it; and is also used to, upon receiving the total number of lesion areas and a T staging marking map from one output module or two output modules, compose a corresponding T staging prediction result from the obtained total number of lesion areas and the T staging marking map and output it.
[0176] Step 2: constructing a data set for training the T-period prediction model and recording it as the corresponding first data set;
[0177] Wherein, the first data set includes multiple first sample records; the first sample record includes a first sample cancer status, a first sample CT image, a first label mask image, a first sample feature type set and a first sample sub-image type set; the first sample cancer status includes not having gastric cancer and having gastric cancer; when the first sample cancer status is not having gastric cancer, the corresponding first sample feature type set and the first sample sub-image type set are both empty; when the first sample cancer status is having 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 a first sample lesion area feature and a first sample type label; the first sample sub-image type record consists of a first sample lesion area sub-image and a second sample type label; the first and second sample type labels both include T1 type, T2 type, T3 type, T4a type and T4b type;
[0178] Specifically comprising: step 21, recruiting a plurality of subjects who do not have gastric cancer, a plurality of subjects who have gastric cancer and whose gastric cancer tumor lesion area has a staging type of at least T1 type, a plurality of subjects who have gastric cancer and whose gastric cancer tumor lesion area has a staging type of at least T2 type, a plurality of subjects who have gastric cancer and whose gastric cancer tumor lesion area has a staging type of at least T3 type, a plurality of subjects who have gastric cancer and whose gastric cancer tumor lesion area has a staging type of at least T4a type, and a plurality of subjects who have gastric cancer and whose gastric cancer tumor lesion area has a staging type of at least T4b type to form a subject set;
[0179] The subject set includes a plurality of first subjects, each of which corresponds to a first cancer status; the first cancer status includes not having gastric cancer and having gastric cancer;
[0180] Step 22: taking the first subject in the subject set as the corresponding current subject;
[0181] Step 23: Using the first cancer state corresponding to the current subject as the corresponding first sample cancer state; using the most recent 3D abdominal CT image of the current subject with complete 3D stomach information as the corresponding first sample CT image; and generating a first label mask image having a shape consistent with the first sample CT image;
[0182] The first label mask image includes a plurality of first label mask voxel points, and each first label mask voxel point corresponds to a gastric cancer lesion area mask feature;
[0183] Step 24: If the cancer status of the first sample of the current subject is not gastric cancer, the gastric cancer lesion area mask features of all first label mask voxel points in the first label mask image are marked as 0 based on manual labeling or other machine labeling methods; and the corresponding first sample feature type set and first sample sub-image type set are set to empty;
[0184] Step 25: If the cancer status of the first sample of the current subject is gastric cancer, then based on a manual labeling method or other machine labeling method, the gastric cancer lesion mask features of all first label mask voxels corresponding to the gastric cancer tumor lesion on the first label mask map are all labeled as 1, and the gastric cancer lesion mask features of all first label mask voxels not related to the gastric cancer tumor lesion on the first label mask map are all labeled as 0; and feature splicing is performed on the labeled first label mask map and the corresponding first sample CT image according to the voxel point feature channel splicing method to obtain the corresponding first sample composite image; The imaging genomics feature extraction module of a type of prediction branch based on the T stage prediction model performs total lesion area identification, lesion area imaging genomics feature extraction and lesion area coordinate feature extraction processing on the first sample composite image to obtain the corresponding total number of first sample lesions, the first sample lesion area feature data set and the first sample lesion area coordinate set; and each first sample lesion area feature data of the first sample lesion area feature data set is used as the corresponding first sample lesion area feature, and the gastric cancer T stage type corresponding to each first sample lesion area feature is labeled based on manual labeling or other machine labeling methods. Obtain the corresponding first sample type label, and form a corresponding first sample feature type record by each first sample lesion area feature and the corresponding first sample type label, and form a corresponding first sample feature type set by the obtained first sample feature type record of the total number of first sample lesion areas; and perform lesion area total number identification, lesion area sub-image interception and lesion area coordinate feature extraction processing on the first sample composite image based on the second type prediction branch of the T period prediction model to obtain the corresponding second lesion area total number, the first sample lesion area sub-image full set and the second sample lesion area coordinate full set, the first sample lesion area 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 subgraph in the full set of the first sample lesion area subgraphs is used as the corresponding first sample lesion area subgraph, and the gastric cancer T stage type corresponding to each first sample lesion area subgraph is labeled based on a manual labeling method or other machine labeling method to obtain a corresponding second sample type label, and each first sample lesion area subgraph and the corresponding second sample type label are used to form a corresponding first sample subgraph type record, and the first sample subgraph type records of the total number of second lesion areas obtained are used to form a corresponding first sample subgraph type set;
[0185] The first sample lesion area feature data set includes multiple first sample lesion area feature data, and the first sample lesion area feature data is composed of a grayscale threshold feature vector, a geometric morphology feature vector, and an image texture feature tensor; the first sample lesion area sub-image set includes multiple first sample lesion area sub-images;
[0186] Step 26, forming a corresponding first sample record from the first sample cancer status, the first sample CT image, the first label mask image, the first sample feature type set, and the first sample sub-image type set corresponding to the current subject;
[0187] Step 27, identifying whether the current subject is the last first subject in the subject set; if so, proceeding to step 28; if not, taking the next first subject in the subject set as the new current subject and returning to step 23;
[0188] Step 28: All the obtained first sample records are used to form a corresponding first data set.
[0189] Step 3: training the T-period prediction model based on the first data set;
[0190] Specifically comprising: step 31, extracting the first sample CT image and the first label mask image of each first sample record of the first data set to form a corresponding first training data record; and forming a corresponding first training data set from all the obtained first training data records;
[0191] Step 32: extract the first sample lesion area features and the first sample type labels of each first sample feature type record of the first data set to form a corresponding second training data record; and form a corresponding second training data set from all the obtained second training data records;
[0192] Step 33: extract the first sample lesion area sub-image and the second sample type label of each first sample sub-image type record of the first data set to form a corresponding third training data record; and form a corresponding third training data set from all the obtained third training data records;
[0193] Step 34, training the semantic segmentation model of the T-period prediction model based on the first training data set;
[0194] Specifically comprising: step 3401, taking the first first training data record of the first training data set as the corresponding current data record;
[0195] Step 3402: Using the first sample CT image and the first label mask image in the current data record as the corresponding current sample CT image and current label mask image;
[0196] The shape of the current sample CT image is Ds×Hs×Ws×Cs, where Ds, Hs, and Ws are the depth, height, and width of the three-dimensional dimensions of the current sample CT image, respectively. Cs is the feature channel dimension of the current sample CT image, and Cs=1. The current sample CT image consists of Ds×Hs×Ws second CT voxel points, and the unique feature corresponding to each second CT voxel point is a CT image pixel value.
[0197] The shape of the current label mask is Dg×Hg×Wg×Cg, where Dg, Hg, and Wg are the depth, height, and width of the three-dimensional dimensions of the current label mask, respectively. Cg is the feature channel dimension of the current label mask, and Cg=1. The current label mask consists of Dg×Hg×Wg first label voxel points, which correspond one-to-one to second CT voxel points. 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.
[0198] Step 3403: Input the current sample CT image into the semantic segmentation model to perform semantic segmentation processing on gastric cancer lesions to obtain the corresponding current predicted semantic segmentation map;
[0199] Among them, the shape of the current predicted semantic segmentation map is Dp×Hp×Wp×Cp, where Dp, Hp, and Wp are the depth, height, and width in the three-dimensional dimensions of the current predicted semantic segmentation map, respectively, and Cp is the feature dimension of the current predicted semantic segmentation map, Dp=Ds, Hp=Hs, Wp=Ws, and Cp=1; the current predicted semantic segmentation map is composed of Dp×Hp×Wp second semantic voxel points, which correspond one-to-one to the second CT voxel points and the first label voxel points. The unique feature corresponding to each second semantic voxel point 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;
[0200] Step 3404: Substitute the current predicted semantic segmentation map and the current label mask map into a preset first model loss function to calculate and obtain a corresponding first loss value;
[0201] Wherein, the first model loss function is implemented based on the L1 loss function or the L2 loss function;
[0202] Step 3405: Identify whether the first loss value satisfies a preset first loss value range. If the first loss value satisfies the first loss value range, identify whether the current data record is the last first training data record of the first training data set. If so, proceed to step 3406. If not, extract the next first training data record of the first training data set as the new current data record and return to step 3402 to continue training. If the first loss value does not satisfy the first loss value range, perform a round of parameter optimization on the semantic segmentation model based on a preset first model parameter optimizer in a direction to minimize the first model loss function. After this round of parameter optimization is completed, return to step 3403 to continue training.
[0203] Wherein, the first model parameter optimizer includes at least an SDG optimizer; the first loss value range is a preset loss value range;
[0204] Step 3406: solidify the model parameters of the semantic segmentation model and confirm that the model training of the semantic segmentation model is completed;
[0205] Step 35, training a type of prediction model of a type of prediction branch of the T period prediction model based on the second training data set;
[0206] Specifically, step 3501 is to perform full parameter setting combinations on the M model hyperparameters SEm based on parameter setting ranges of the M model hyperparameters SEm of a type of prediction model to obtain corresponding multiple first hyperparameter combinations;
[0207] Where M is a positive integer greater than 0, 1≤hyperparameter index m≤M; the parameter setting range of each model hyperparameter SEm consists of Nm parameter setting options sem,n, and Nm corresponding to each model hyperparameter SEm is a positive integer greater than 0, 1≤setting option index n≤Nm; each first hyperparameter combination consists of M first hyperparameter setting options, and each first hyperparameter setting option corresponds to a parameter setting option sem,n of a model hyperparameter SEm;
[0208] Step 3502: Initialize the hyperparameters of the first-class prediction model based on each first hyperparameter combination to obtain the corresponding first-class prediction model;
[0209] Step 3503: randomly divide the second training data set into five equal subsets according to the data set partitioning method of the k-fold cross-validation method with k being 5, and record them as the corresponding first, second, third, fourth, and fifth subsets; and use the first subset as an evaluation data subset, and the second, third, fourth, and fifth subsets as four training data subsets to form a corresponding first training evaluation set; and use the second subset as an evaluation data subset, and the first, third, fourth, and fifth subsets as four training data subsets to form a corresponding first training evaluation set, and so on, to finally obtain five first training evaluation sets;
[0210] Wherein, each first training evaluation set consists of four training data subsets and one evaluation data subset;
[0211] Step 3504: Use the first first-class prediction model as the corresponding current prediction model;
[0212] Step 3505: Use the first first training evaluation set as the corresponding current training evaluation set;
[0213] Step 3506: All second training data records of the four training data subsets of the current training evaluation set form a corresponding current training data subset; and all second training data records of one evaluation data subset of the current training evaluation set form a corresponding current evaluation data subset;
[0214] Step 3507: Use the first second training data record of the current training data subset as the corresponding current data record;
[0215] Step 3508: Use the first sample lesion area feature of the current data record as the corresponding first training feature; and construct a first label vector with a length of vector length L1 based on the first sample type label of the current data record;
[0216] The first label vector has the same structure as the prediction vector output by the first-class 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 remaining L1-1 first label probabilities are 0.
[0217] Step 3509: Input the first training feature into the current prediction model to perform T-period classification prediction to obtain a corresponding first training prediction vector;
[0218] In step 3510, the first training prediction vector and the first label vector are fed into a preset second model loss function. A round of parameter optimization is then performed on the current prediction model based on a preset second model parameter optimizer in a direction that minimizes the second model loss function. At the end of this round of parameter optimization, it is determined whether the current data record is the last second training data record in the current training data subset. If so, the process proceeds to step 3511. If not, the next second training data record in the current training data subset is extracted as the new current data record, and the process returns to step 3508 to continue training.
[0219] The second model loss function is implemented based on a multi-classification cross entropy loss function; the second model parameter optimizer includes at least an SDG optimizer;
[0220] Step 3511, initialize an L1×L1 confusion matrix and record it as the corresponding first confusion matrix;
[0221] Wherein, each column of the first confusion matrix corresponds to a T stage label type, each row corresponds to a T stage prediction type, the first confusion matrix consists of L1×L1 first matrix units, and the initial value of each first matrix unit is 0;
[0222] Step 3512: traverse all second training data records of the current evaluation data subset; and during the 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 maximum 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 unit 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 unit; and add 1 to the value of the current matrix unit;
[0223] In step 3513, after traversing all second training data records of the current evaluation data subset, the accuracy, recall, and F1 score of the multi-classification are calculated based on the first confusion matrix to obtain the corresponding first accuracy, first recall, and first F1 score; and the corresponding first comprehensive score is calculated based on the first accuracy, first recall, and first F1 score, where the first comprehensive score = α × first accuracy + β × first recall + γ × first F1 score, where α, β, and γ are three preset weighting coefficients.
[0224] Step 3514: Identify whether the current training evaluation set is the last first training evaluation set; if so, proceed to step 3515; if not, use the next first training evaluation set as the new current training evaluation set and return to step 3506 to continue training;
[0225] Step 3515: Calculate the average of the five first comprehensive scores and use the calculated result as the corresponding first model score;
[0226] Step 3516: Identify whether the current prediction model is the last first-class prediction model; if so, go to step 3517; if not, use the next first-class prediction model as the new current prediction model and return to step 3505;
[0227] Step 3517: Select the maximum score from the obtained multiple first model scores as the corresponding maximum model score; and use the full model parameter set of the first-class prediction model corresponding to the maximum model score as the corresponding optimal model parameter set;
[0228] Step 3518: solidify all model parameters of the first type of prediction model based on the optimal model parameter set, and confirm that the model training of the first type of prediction model is completed;
[0229] Step 36, training the second-class prediction model of the second-class prediction branch of the T-period prediction model based on the third training data set;
[0230] Specifically comprising: step 3601, randomly dividing the third training data set into five subsets; selecting four of the five subsets to form corresponding current training data subsets, and using the remaining subset as the corresponding current evaluation data subset;
[0231] Step 3602: Use the first third training data record of the current training data subset as the corresponding current data record;
[0232] 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 vector length L2 based on the second sample type label of the current data record;
[0233] The second label vector has the same structure as the prediction vector output by the two-class 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.
[0234] Step 3604: Input the first training subgraph into the two-class prediction model to perform T-period classification prediction to obtain a corresponding second training prediction vector;
[0235] In step 3605, the second training prediction vector and the second label vector are fed into a preset third model loss function. A round of parameter optimization is performed on the two-class prediction model based on a preset third model parameter optimizer in a direction that minimizes the third model loss function. At the end of this round of parameter optimization, whether the current data record is the last third training data record in the current training data subset is identified. If so, the process proceeds to step 3606. If not, the next third training data record in the current training data subset is extracted as the new current data record, and the process returns to step 3603 to continue training.
[0236] The third model loss function is implemented based on a multi-classification cross entropy loss function; the third model parameter optimizer includes at least an SDG optimizer;
[0237] Step 3606, initialize an L2×L2 confusion matrix and record it as the corresponding second confusion matrix;
[0238] Wherein, each column of the second confusion matrix corresponds to a T stage label type, each row corresponds to a T stage prediction type, the second confusion matrix is composed of L2×L2 second matrix units, and the initial value of each second matrix unit is 0;
[0239] Step 3607: Traverse all third training data records of the current evaluation data subset; during the traversal, use the currently traversed third training data record as the corresponding current data record; input the first sample lesion area subgraph of the current data record into the two-class 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 unit 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 unit; and add 1 to the value of the current matrix unit;
[0240] In step 3608, after traversing all third training data records of the current evaluation data subset, the accuracy, recall, and F1 score of the multi-classification are calculated based on the second confusion matrix to obtain the corresponding second accuracy, second recall, and second F1 score; and a corresponding second comprehensive score is calculated based on the second accuracy, second recall, and second F1 score, where the second comprehensive score = α × second accuracy + β × second recall + γ × second F1 score, where α, β, and γ are three preset weighting coefficients;
[0241] Step 3609: Identify whether the second comprehensive score exceeds a preset comprehensive score threshold; if so, proceed to step 3610; if not, return to step 3601 to continue training;
[0242] Here, the comprehensive score threshold is a pre-set score parameter;
[0243] Step 3610: solidify the model parameters of the second-class prediction model and confirm that the model training of the second-class prediction model is completed;
[0244] In step 37 , 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.
[0245] Step 4: Based on the T stage prediction model that has completed model training, the gastric cancer T stage classification prediction is performed according to the input first CT image and the first model branch matching parameters to obtain the corresponding first T stage prediction result.
[0246] Figure 3 This is a module structure diagram of a processing device for T-stage classification prediction based on CT images provided in the second embodiment of the present invention. The device is a terminal device or server that implements the aforementioned method embodiment, and can also 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. Figure 3 As shown, the device includes: a model construction module 201, a training set construction module 202, a model training module 203 and a model application module 204.
[0247] The model construction module 201 is used to construct a T-stage prediction model for classifying and predicting gastric cancer T-stage based on an input CT image and model branch selection parameters and outputting a corresponding T-stage prediction result; the CT image is a three-dimensional abdominal CT image with complete three-dimensional information of the stomach; the model branch selection parameters include one category and two categories; the T-stage prediction result includes the total number of lesion areas and / or a T-stage marking map; the total number of lesion areas is an integer greater than or equal to 0, and when the total number of lesion areas is 0, the T-stage prediction result does not carry a T-stage marking map, and when the total number of lesion areas is greater than 0, the T-stage prediction result carries a T-stage marking map; the three-dimensional size of the T-stage marking map is consistent with the three-dimensional size of the CT image; the T-stage marking map draws 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 edge of each gastric cancer lesion area; the T-stage classification types include T1 type, T2 type, T3 type, T4a type, and T4b type.
[0248] The training set construction module 202 is used to construct a data set for model training of the T-period prediction model, which is recorded as the corresponding first data set.
[0249] The model training module 203 is used to perform model training on the T-period prediction model based on the first data set.
[0250] The model application module 204 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 matching parameters to obtain the corresponding first T stage prediction result.
[0251] An embodiment of the present invention provides a processing device for T-stage classification prediction based on CT images, which can execute the method steps in the above method embodiment. Its implementation principles and technical effects are similar and will not be repeated here.
[0252] It should be noted that the division of the modules of the above devices is merely a division of logical functions. In actual implementation, they can be fully or partially integrated into a physical entity or physically separated. Furthermore, these modules can all be implemented in the form of software called by a processing element; or all be implemented in the form of hardware; or some modules can be implemented in the form of software called by a processing element, and some modules can be implemented in the form of hardware. For example, the model building module can be a separate processing element, or it can be integrated into a chip of the above device. In addition, it can be stored in the form of program code in the memory of the above device, and called by a processing element of the above device to perform the functions of the above-mentioned module. The implementation of other modules is similar. In addition, these modules can all or partly be integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. During implementation, each step of the above method or each of the above modules can be completed by hardware integrated logic circuits in the processor element or instructions in the form of software.
[0253] For example, the above modules can be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), or one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs). For another example, when a certain module above is implemented in the form of a processing element scheduling program code, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0254] In the above embodiments, all or part of the embodiments may be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the above method embodiments are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The above-mentioned computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the above-mentioned computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, Bluetooth, microwave, etc.) means. The above-mentioned computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The above-mentioned available medium can be a magnetic medium (such as a floppy disk, hard disk, tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state drive (SSD)), etc.
[0255] Figure 4This is a schematic diagram of the structure of an electronic device provided in the third embodiment of the present invention. The electronic device can be a terminal device or server that implements the method of the aforementioned embodiment, or it can be a terminal device or server that implements the method of the aforementioned embodiment connected to the aforementioned terminal device or server. Figure 4 As shown, the electronic device may include: a processor 301 (such as a CPU), a memory 302, and a transceiver 303; the transceiver 303 is coupled to the processor 301, and the processor 301 controls the transceiver 303's transceiver actions. Various instructions may be stored in the memory 302 for completing various processing functions and implementing the processing steps described in the aforementioned embodiment method. Preferably, the electronic device involved in the embodiment 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 above-mentioned communication port 306 is used for connecting and communicating between the electronic device and other peripherals.
[0256] exist Figure 4 The system bus 305 mentioned in the figure can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface is used to realize communication between the database access device and other devices (such as clients, read-write libraries, and read-only libraries). The memory may include random access memory (RAM) and may also include non-volatile memory (Non-Volume ile Memory), such as at least one disk storage.
[0257] The above-mentioned processors 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, and discrete hardware components.
[0258] It should be noted that an embodiment of the present invention further provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is run on a computer, it enables the computer to execute the methods and processing procedures provided in the above embodiments.
[0259] An embodiment of the present invention further provides a chip for executing instructions, which is used to execute the processing steps described in the above method embodiment.
[0260] Embodiments of the present invention provide a processing method, apparatus, electronic device, and computer-readable storage medium for T-stage classification prediction based on CT images. As can be seen from the foregoing, embodiments of the present invention construct a T-stage prediction model capable of classifying and predicting gastric cancer T-stage based on CT images, and construct a dataset for model training. After model training is completed, gastric cancer T-stage classification prediction is performed on any input CT image based on the T-stage prediction model. The T-stage prediction model provided by embodiments of the present invention not only improves the real-time nature and efficiency of predictions, but also ensures the stability of prediction quality.
[0261] Professionals should also be further aware that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0262] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0263] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method 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 in the scope of protection of the present invention.
Claims
1. A processing method for T stage classification prediction based on CT images, characterized in that: The method comprises: A T-stage prediction model is constructed for classifying and predicting gastric cancer T-stage according to an input CT image and model branch selection parameters and outputting a corresponding T-stage prediction result; the CT image is a three-dimensional abdominal CT image with complete three-dimensional information of the stomach; the model branch selection parameters include one category and two categories; the T-stage prediction result includes the total number of lesion areas and / or a T-stage marking map; the total number of lesion areas is an integer greater than or equal to 0, and when the total number of lesion areas is 0, the T-stage prediction result does not carry the T-stage marking map, and when the total number of lesion areas is greater than 0, the T-stage prediction result carries the T-stage marking map; the three-dimensional size of the T-stage marking map is consistent with the three-dimensional size of the CT image; the edges of the gastric cancer lesion areas of the total number of lesion areas are drawn on the T-stage marking map, and the corresponding T-stage classification type is marked on the edge of each gastric cancer lesion area; the T-stage classification types include T1 type, T2 type, T3 type, T4a type and T4b type; A data set constructed for training the T-period prediction model is recorded as a corresponding first data set; Performing model training on the T-stage prediction model based on the first data set; The T stage prediction model based on the completed model training 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; 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 synthetic image processing module is used to perform mask image conversion according to the first semantic segmentation image sent by the semantic segmentation model to obtain a corresponding first mask image, and perform feature splicing on the first mask image and the CT image to obtain a corresponding first synthetic image and send it to the data distribution module; The data distribution module is configured to perform data distribution processing on the first-class prediction branch, the second-class prediction branch, or the prediction output module according to the first synthetic image and the model branch selection parameters; send the first synthetic image when distributing data to the first-class prediction branch or the second-class prediction branch, and send the total number of lesion areas that have completed zero value setting when distributing data to the prediction output module; The first prediction branch includes an imaging feature extraction module, a prediction model and an output module; Radiomics features include the grayscale median, mean, minimum, maximum, standard deviation, skewness, and distribution peak of the lesion area image; the tumor surface area, volume, volume ratio, sphericity, compactness type, and diameter of the lesion area; the grayscale co-occurrence matrix, run length matrix, size area matrix, difference matrix, and correlation matrix of the lesion area image; The second-class prediction branch includes a synthetic image interception module, a second-class prediction model and a two-way output module; The synthetic image interception module is used to identify the total number of lesion areas, intercept the lesion area sub-images and extract the features of the lesion area coordinates on the first synthetic image to obtain the corresponding total number of lesion areas, the complete set of first lesion area sub-images and the complete set of second lesion area coordinates; and send the complete set of the first lesion area sub-images to the two-category prediction model; and send the total number of lesion areas, the first synthetic image and the complete set of the second lesion area coordinates to the two-way output module.
2. The method for T-stage classification prediction based on CT images according to claim 1, characterized in that: 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 recorded as a corresponding model output end; the first model input end is used to receive the CT image input by the model; the second model input end is used to receive the model branch selection parameter input by the model; The model output end is used to output the corresponding T staging prediction result; 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 image processing module; The semantic segmentation model is used to perform semantic segmentation processing on the gastric cancer lesion point of the CT image input by the model to obtain a corresponding first semantic segmentation map and send it to the synthetic map processing module; the shape of the CT image is D0×H0×W0×C0, 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 voxel points, and the unique feature corresponding to each first CT voxel point is a CT image pixel value; The shape of the first semantic segmentation map is D1×H1×W1×C1, where D1, H1, and W1 are respectively the depth, height, and width in the three-dimensional dimensions of the first semantic segmentation map, 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 voxel points, the first semantic voxel points correspond one-to-one to the first CT voxel points, and the unique feature corresponding to each first semantic voxel point 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; The first input terminal of the synthetic 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 shape of the first mask image is D2×H2×W2×C2, where D2, H2, and W2 are respectively the depth, height, and width of the three-dimensional dimensions of the first mask image, 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 is composed of D2×H2×W2 first mask voxel points, and the first mask voxel points correspond one-to-one to the first semantic voxel points and the first CT voxel points, respectively. The unique feature corresponding to each of the first mask voxel points is a binary gastric cancer lesion area mask feature with a value of 0 or 1; the first composite The shape of the resulting image is D3×H3×W3×C3, where D3, H3, and W3 are respectively the depth, height, and width in the three-dimensional dimensions of the first synthetic image, and C3 is the feature dimension of the first synthetic image, D3=D2=D0, H3=H2=H0, W3=W2=W0, and C3=C2+C0=2; the first synthetic image is composed of D3×H3×W3 first synthetic voxel points, each of which corresponds one-to-one to the first mask voxel points and the first CT voxel points, and C3 features corresponding to each first synthetic voxel point are composed of the corresponding gastric cancer lesion area 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 connected to the input terminals of the first and second type prediction branches respectively, and the third output terminal is connected to the third input terminal of the prediction output module; The input end of the radiomics feature extraction module is connected to the input end of the first prediction branch, the first output end is connected to the input end of the first prediction model, and the second output end is connected to the first input end of the output module; the output end of the first prediction 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 prediction output module; The imaging omics feature extraction module of the first type of prediction branch is used to perform lesion area total number identification, lesion area imaging omics feature extraction and lesion area coordinate feature extraction processing on the first synthetic image sent by the data distribution module to obtain the corresponding lesion area total number, the first lesion area feature data set and the first lesion area coordinate set; and send the obtained first lesion area feature data set to the first type of prediction model; and send the obtained total number of lesion areas, the first synthetic image and the first lesion area coordinate set to the output module of one path; The first type of prediction model of the first type of prediction branch is used to extract the first imaging feature data F of the first lesion area feature data set sent by the imaging feature extraction module. i Perform T-period classification prediction to obtain the corresponding first prediction vector P1 i ; and 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 is composed of L1 first type prediction probabilities, each of which corresponds to one of the T-stage classification types; the first prediction vector P1 i The value of each of the first type prediction probabilities is between 0 and 1, and the sum of 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 synthetic map, and the first complete set of lesion area coordinates sent by the imaging omics feature extraction module, and receive the first complete set of prediction vectors sent by the first type of prediction model; and perform staging marking map synthesis processing based on the first complete set of prediction vectors, the first complete set of lesion area coordinates, and the first synthetic map to obtain the corresponding T staging marking map; and send the obtained total number of lesion areas and the T staging marking map to the prediction output module; The input end of the synthetic image interception module is connected to the input end of the two-category prediction branch, the first output end is connected to the input end of the two-category 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-category prediction model is connected to the second input end of the two-way output module; the output end of the two-way output module is connected to the second input end of the prediction output module; The second type prediction model of the second type prediction branch is used to generate the first lesion area sub-images C of the first lesion area sub-image set sent by the synthetic image interception module. j Perform T-period classification prediction to obtain the corresponding second prediction vector P2 j ; and 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 The second prediction vector P2 is composed of L2 second type prediction probabilities, each of which corresponds to one of the T-stage classification types; j The value of each of the second type prediction probabilities is between 0 and 1, and the sum of L2 second type prediction probabilities is 1; The two-way output module of the second-category prediction branch is used to receive the total number of lesion areas, the first synthetic image, and the full set of coordinates of the second lesion areas sent by the synthetic image interception module, and receive the full set of second prediction vectors sent by the second-category prediction model; and perform a stage marking map synthesis process based on the second full set of prediction vectors, the full set of second lesion area coordinates, and the first synthetic image to obtain the corresponding T stage marking map; and send the obtained total number of lesion areas and the T stage marking map to the prediction output module; The output end of the prediction output module is connected to the model output end; The prediction output module is used to, upon receiving the total number of lesion areas set to zero sent by the data distribution module, compose the corresponding T staging prediction result from the obtained total number of lesion areas and output it; and is also used to, upon receiving the total number of lesion areas and the T staging marking map sent by 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 marking map and output it.
3. The processing method for T stage classification prediction based on CT images according to claim 2, characterized in that: The step of performing mask conversion on the first semantic segmentation map sent by the semantic segmentation model to obtain a corresponding first mask map and performing feature stitching on the obtained first mask map and the CT image input by the model to obtain a corresponding first synthetic map specifically includes: The synthetic image processing module traverses all the first semantic voxel points of the first semantic segmentation map; and during the traversal, takes the currently traversed first semantic voxel point as the corresponding current semantic voxel point, and takes the semantic feature of the gastric cancer lesion point of the current semantic voxel point as the corresponding current semantic feature, and generates a corresponding first mask voxel point for the current semantic voxel point and records it as the corresponding current mask voxel point; and identifies whether the current semantic feature exceeds a preset gastric cancer lesion point probability threshold, and if so, sets the gastric cancer lesion area mask feature corresponding to the current mask voxel point to 1; if not, sets the gastric cancer lesion area mask feature corresponding to the current mask voxel point to 0; At the end of the traversal, all the first mask voxel points obtained are used to form a corresponding first mask image; and the first mask image obtained and the CT image input by the model are feature-spliced according to the voxel point feature channel splicing method to obtain the corresponding first synthetic image.
4. The method for T-stage classification prediction based on CT images according to claim 2, characterized in that: The performing data distribution processing on the first type prediction branch, the second type prediction branch or the prediction output module according to the first synthetic graph sent by the synthetic graph processing module and the model branch selection parameter of the model input specifically includes: The data distribution module counts the total number of the first synthetic voxel points on the first synthetic image to obtain a corresponding first total number; counts the total number of the first synthetic voxel points whose mask feature of the gastric cancer lesion area is 1 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 identifying whether the first ratio exceeds a preset ratio threshold; If the first ratio exceeds the ratio threshold, the model branch selection parameter of the model input is identified; if the model branch selection parameter is a first category, the first synthetic graph is sent to the first category prediction branch; if the model branch selection parameter is a second category, the first synthetic graph is sent to the second category prediction branch; If the first ratio does not exceed the ratio threshold, the corresponding total number of lesion areas is set to 0; and the total number of lesion areas with the zero value set is sent to the prediction output module.
5. The processing method for T stage classification prediction based on CT images according to claim 2, characterized in that: The performing of lesion area total number identification, lesion area imaging feature extraction, and lesion area coordinate feature extraction processing on the first synthetic image sent by the data distribution module to obtain the corresponding lesion area total number, first lesion area feature data set, and first lesion area coordinate set specifically includes: The imaging feature extraction module traverses all the first synthetic voxel points on the first synthetic image; and during the traversal, uses the currently traversed first synthetic voxel point as the corresponding current synthetic voxel point, and uses the gastric cancer lesion area mask feature and the CT image pixel value of the current synthetic voxel point as the corresponding current feature and current pixel value; and resets the corresponding current pixel value to a preset background pixel value when the current feature is 0; At the end of the traversal, the geometrically connected region of voxel points on the first synthetic image consisting of a plurality of the first synthetic voxel points whose pixel values of the CT image are not the background pixel values is recorded as the corresponding first lesion area A i ; and the first lesion area A i The total number of the first lesion area A is counted and the statistical result is used as the corresponding total number of the lesion area; wherein 1≤lesion area index i≤total number of lesion areas; each of the first lesion areas A i are composed of a plurality of the first composite voxel points; And for each of the first lesion areas A i The grayscale threshold feature, geometric morphology feature and image texture feature are calculated to obtain the corresponding first imaging feature data F i ; wherein, the first imaging genomics feature data F i It is composed of a grayscale threshold feature vector, a geometric morphology feature vector and an image texture feature tensor; the grayscale threshold feature vector includes the grayscale median value of the lesion area image, the grayscale average value of the lesion area image, the grayscale minimum value of the lesion area image, the grayscale maximum value of the lesion area image, the grayscale standard deviation of the lesion area image, the grayscale skewness of the lesion area image and the grayscale distribution peak value of the lesion area image; the geometric morphology feature vector includes the lesion area tumor surface area, the lesion area tumor volume, the lesion area tumor volume ratio, the lesion area tumor sphericity, the lesion area tumor compactness type and the lesion area tumor diameter; the image texture feature tensor includes the lesion area image grayscale co-occurrence matrix, the lesion area image grayscale run length matrix, the lesion area image grayscale size area matrix, the lesion area image neighborhood grayscale difference matrix and the lesion area image grayscale correlation matrix; And all the first radiomics feature data F obtained i forming a corresponding complete set of characteristic data of the first lesion area; And for each of the first lesion areas A i Identify the voxel point three-dimensional coordinates (d1, h1, w1) of each first synthesized voxel point on the first synthesized image to obtain the corresponding first voxel point coordinates; wherein 1≤depth coordinate d1≤depth D3 of the first synthesized image, 1≤height coordinate h1≤height H3 of the first synthesized image, and 1≤width coordinate w1≤width W3 of the first synthesized image; Each of the first lesion areas A i The corresponding coordinates of all the first voxel points form a corresponding first lesion area coordinate set S1 i ; and all the first lesion area coordinate sets S1 are obtained i A corresponding complete set of coordinates of the first lesion area is formed.
6. The method for T stage classification prediction based on CT images according to claim 5, characterized in that: The step of synthesizing the staging marking map according to the first complete set of prediction vectors, the first complete set of lesion area coordinates, and the first synthesized map to obtain the corresponding T staging marking map specifically includes: The output module outputs all the first prediction vectors P1 of the first prediction vector set. i Traverse; and when traversing, the first prediction vector P1 currently traversed i as the corresponding current prediction vector; and taking the T stage classification type corresponding to the first type prediction probability with the largest probability value in the current prediction vector as the corresponding first lesion area type; And on the first synthetic map, each first lesion area coordinate set S1 based on the first lesion area coordinate set i Performing corresponding lesion area edge drawing processing to obtain corresponding gastric cancer lesion area edges; and marking corresponding first lesion area types on each gastric cancer lesion area edge drawn in the first synthetic image; The first synthetic image after the lesion area edge drawing and lesion area type marking is completed is used as the corresponding T stage marking image.
7. The method for T stage classification prediction based on CT images according to claim 2, characterized in that: The step of performing lesion area total number identification, lesion area sub-image interception, and lesion area coordinate feature extraction processing on the first synthetic image sent by the data distribution module to obtain the corresponding lesion area total number, the first lesion area sub-image full set, and the second lesion area coordinate full set specifically includes: The synthetic image interception module traverses all the first synthetic voxel points on the first synthetic image; and during the traversal, uses the currently traversed first synthetic voxel point as the corresponding current synthetic voxel point, and uses the gastric cancer lesion area mask feature and the CT image pixel value of the current synthetic voxel point as the corresponding current feature and current pixel value; and resets the corresponding current pixel value to a background pixel value when the current feature is 0; At the end of the traversal, the geometrically connected region of voxels on the first synthetic image consisting of a plurality of the first synthetic voxel points whose pixel values of the CT image are not the background pixel values is recorded as the corresponding second lesion area B j ; and the second lesion area B j The total number of the second lesion area B is counted and the statistical result is used as the total number of the corresponding lesion area; wherein 1≤lesion area index j≤total number of lesion areas; each second lesion area B j are composed of a plurality of the first composite voxel points; And each of the second lesion areas B on the first synthetic image j The sub-graph is cut out as the corresponding first lesion area sub-graph C j ; And all the first lesion area subgraphs C are obtained j forming a corresponding complete set of sub-images of the first lesion area; And for each of the second lesion areas B j Identify the voxel point three-dimensional coordinates (d2, h2, w2) of each of the first synthesized voxels on the first synthesized image to obtain the corresponding second voxel point coordinates; wherein 1≤depth coordinate d2≤depth D3 of the first synthesized image, 1≤height coordinate h2≤height H3 of the first synthesized image, and 1≤width coordinate w2≤width W3 of the first synthesized image; Each of the second lesion areas B j The corresponding coordinates of all the second voxel points form a corresponding second lesion area coordinate set S2 j ; and all the second lesion area coordinate sets S2 are obtained j A corresponding complete set of coordinates of the second lesion area is formed.
8. The method for T stage classification prediction based on CT images according to claim 7, characterized in that: The step of synthesizing the staging marking map according to the second full set of prediction vectors, the second full set of lesion area coordinates, and the first synthesized map to obtain the corresponding T staging marking map specifically includes: The two-way output module outputs all the second prediction vectors P2 of the second prediction vector set. j Traverse; and when traversing, the second prediction vector P2 currently traversed j as the corresponding current prediction vector; and taking the T stage classification type corresponding to the second type prediction probability with the largest probability value in the current prediction vector as the corresponding second lesion area type; And on the first synthetic map, each second lesion area coordinate set S2 based on the second lesion area coordinate set j Performing corresponding lesion area edge drawing processing to obtain corresponding gastric cancer lesion area edges; and marking corresponding second lesion area types on each gastric cancer lesion area edge drawn in the first synthetic image; The first synthetic image after the lesion area edge drawing and lesion area type marking is completed is used as the corresponding T stage marking image.
9. The method for T stage classification prediction based on CT images according to claim 2, characterized in that: The first data set includes a plurality of first sample records; The first sample record includes a first sample cancer status, a first sample CT image, a first label mask image, a first sample feature type set, and a first sample sub-image type set; 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 suffering from gastric cancer, the corresponding first sample feature type set and the first sample subgraph type set are both empty; When the cancer status of the first sample is gastric cancer, the corresponding first sample feature type set consists of one or more first sample feature type records, the corresponding first sample sub-image type set consists of one or more first sample sub-image type records, and the total number of the first sample feature type records and the first sample sub-image type records is the same; the first sample feature type record consists of a first sample lesion area feature and a first sample type label; the first sample sub-image type record consists of a first sample lesion area sub-image and a second sample type label; 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 stage classification prediction based on CT images according to claim 9, characterized in that: The dataset constructed for training the T-period prediction model is recorded as the corresponding first dataset, and specifically includes: Step 101: recruit a subject set comprising a plurality of subjects who do not have gastric cancer, a plurality of subjects who have gastric cancer and whose gastric cancer tumor lesion area has a staging type of at least T1, a plurality of subjects who have gastric cancer and whose gastric cancer tumor lesion area has a staging type of at least T2, a plurality of subjects who have gastric cancer and whose gastric cancer tumor lesion area has a staging type of at least T3, a plurality of subjects who have gastric cancer and whose gastric cancer tumor lesion area has a staging type of at least T4a, and a plurality of subjects who have gastric cancer and whose gastric cancer tumor lesion area has a staging type of at least T4b; the subject set includes a plurality of first subjects, each of the first subjects corresponding to a first cancer status; the first cancer status includes not having gastric cancer and having gastric cancer; Step 102: taking the first subject in the subject set as the corresponding current subject; Step 103: Using the first cancer state corresponding to the current subject as the corresponding first sample cancer state; and using the most recent three-dimensional abdominal CT image of the current subject with complete three-dimensional stomach information as the corresponding first sample CT image; and generating a first label mask image having a shape consistent with the first sample CT image; the first label mask image includes a plurality of first label mask voxel points, each of which 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, the gastric cancer lesion area mask features of all the first label mask voxel points in the first label mask image are marked as 0 based on a manual labeling method or other machine labeling method; and the corresponding first sample feature type set and the first sample sub-image type set are set to empty. Step 105: If the cancer status of the first sample of the current subject is that the subject has gastric cancer, then based on a manual labeling method or other machine labeling method, the gastric cancer lesion area mask features of all the first label mask voxel points corresponding to the gastric cancer tumor lesion area on the first label mask map are marked as 1, and the gastric cancer lesion area mask features of all the first label mask voxel points on the first label mask map that are not related to the gastric cancer tumor lesion area are marked as 0; and the first label mask map and the corresponding first sample CT image are feature spliced in a voxel feature channel splicing method to obtain the corresponding first sample composite image; and the image group of the first prediction branch of the T stage prediction model is spliced. The imaging feature extraction module performs lesion area total number identification, lesion area imaging feature extraction and lesion area coordinate feature extraction processing on the first sample composite image to obtain the corresponding first sample lesion area total number, the first sample lesion area feature data set and the first sample lesion area coordinate set; and each first sample lesion area feature data of the first sample lesion area feature data set is used as the corresponding first sample lesion area feature, and the gastric cancer T stage type corresponding to each first sample lesion area feature is labeled based on a manual labeling method or other machine labeling method to obtain the corresponding first sample type label, and each first sample lesion area feature and the corresponding first sample type label form a corresponding first sample. The method comprises the following steps: a) performing lesion area identification on the first sample composite image, performing lesion area sub-image interception and lesion area coordinate feature extraction on the first sample composite image based on the second type prediction branch of the T period prediction model, and recording the first sample feature type record of the total number of the first sample lesion areas, and forming the corresponding first sample feature type set; and performing lesion area total number identification, lesion area sub-image interception and lesion area coordinate feature extraction on the first sample composite image based on the second type prediction branch of the T period prediction model to obtain the corresponding second lesion area total number, the first sample lesion area sub-image full set and the second sample lesion area coordinate full set, the second lesion area total number is equal to the first lesion area total number; and taking each first sample lesion area sub-image of the first sample lesion area sub-image full set as the corresponding first sample lesion area sub-image, and performing lesion area identification on the first sample composite image based on the manual annotation method or other machine annotation method. The gastric cancer T stage type corresponding to each first sample lesion area subgraph is labeled by the formula to obtain the corresponding second sample type label, and each first sample lesion area subgraph and the corresponding second sample type label form a corresponding first sample subgraph type record, and the first sample subgraph type records of the total number of second lesions obtained form a corresponding first sample subgraph type set; the first sample lesion area feature data set includes multiple first sample lesion area feature data, and the first sample lesion area feature data includes a grayscale threshold feature vector, a geometric morphology feature vector and an image texture feature tensor; the first sample lesion area subgraph set includes multiple first sample lesion area subgraphs; Step 106: Combining the first sample cancer status corresponding to the current subject, the first sample CT image, the first label mask image, the first sample feature type set, and the first sample sub-image type set into a corresponding first sample record; Step 107: Identify whether the current subject is the last of the first subject in the subject set; if so, proceed to step 108; if not, use the next first subject in the subject set as the new current subject and return to step 103; Step 108: All the first sample records obtained are used to form the corresponding first data set.
11. The method for T stage classification prediction based on CT images according to claim 9, characterized in that: The performing model training on the T-stage prediction model based on the first data set specifically includes: extracting the first sample CT image and the first label mask image of each first sample record of the first data set to form a corresponding first training data record; and forming a corresponding first training data set from all the obtained first training data records; and extracting the first sample lesion area feature and the first sample type label of each first sample feature type record of the first data set to form a corresponding second training data record; and forming a corresponding second training data set from all the obtained second training data records; and extracting the first sample lesion area sub-image and the second sample type label of each first sample sub-image type record of the first data set to form a corresponding third training data record; and forming a corresponding third training data set from all the obtained third training data records; and training the semantic segmentation model of the T-period prediction model based on the first training data set; and training the first type of prediction model of the first type of prediction branch of the T period prediction model based on the second training data set; and training the second type of prediction model of the second type of prediction branch of the T period prediction model based on the third training data set; And after the semantic segmentation model, the first-category prediction model and the second-category prediction model have all completed training, it is confirmed that the T-period prediction model has completed model training.
12. A device for executing the processing method for T stage classification prediction based on CT images according to any one of claims 1 to 11, characterized in that: The device includes: a model construction module, a training set construction module, a model training module and a model application module; The model construction module is used to construct a T-stage prediction model for classifying and predicting gastric cancer T-stage according to an input CT image and model branch selection parameters and outputting a corresponding T-stage prediction result; the CT image is a three-dimensional abdominal CT image with complete three-dimensional information of the stomach; the model branch selection parameters include one category and two categories; the T-stage prediction result includes the total number of lesion areas and / or a T-stage marking map; the total number of lesion areas is an integer greater than or equal to 0, and when the total number of lesion areas is 0, the T-stage prediction result does not carry the T-stage marking map, and when the total number of lesion areas is greater than 0, the T-stage prediction result carries the T-stage marking map; the three-dimensional size of the T-stage marking map is consistent with the three-dimensional size of the CT image; the edges of the gastric cancer lesion areas of the total number of lesion areas are drawn on the T-stage marking map, and the corresponding T-stage classification type is marked on the edge of each gastric cancer lesion area; the T-stage classification types include T1 type, T2 type, T3 type, T4a type and T4b type; The training set construction module is used to construct a data set for training the T-period prediction model, which is recorded as the corresponding first data set; The model training module is used to perform model training on the T-stage prediction model based on the first data set; 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, processors, and transceivers; The processor is configured to be coupled to the memory, read and execute instructions in the memory, so as to implement the method according to any one of claims 1 to 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, and when the computer instructions are executed by a computer, the computer is caused to execute the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
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