Gastric cancer risk prediction model construction method and system based on joint segmentation classification network
By combining a joint segmentation and classification network with a dual-model arbitration fusion strategy, and dynamically selecting models and combining confidence arbitration, the problems of flexibility and accuracy in gastric cancer risk assessment are solved, and efficient and reliable gastric cancer risk prediction is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG CANCER HOSPITAL
- Filing Date
- 2026-02-28
- Publication Date
- 2026-06-30
AI Technical Summary
In existing technologies, gastric cancer risk assessment models lack flexibility and accuracy, making it difficult to provide efficient and reliable diagnosis in complex scenarios. Furthermore, the lack of multi-model fusion strategies leads to high rates of missed diagnoses and misdiagnoses.
A joint segmentation and classification network is adopted, which dynamically selects the appropriate model for processing through a front-end routing network, and introduces dual-model arbitration fusion when necessary. UNet and Swin Transformer are used for segmentation and classification tasks, and the results are arbitrated by combining confidence scores.
It improves the accuracy and reliability of gastric cancer risk prediction, reduces the rate of missed diagnoses and misdiagnoses, adapts to different medical imaging modalities, provides intuitive lesion localization and risk assessment, and enhances diagnostic efficiency and interpretability.
Smart Images

Figure CN121747964B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to medical image processing technology, and in particular to a method and system for constructing a gastric cancer risk prediction model using a joint segmentation and classification network. Background Technology
[0002] Gastric cancer is one of the most common malignant tumors of the digestive system worldwide. Early detection and accurate assessment of the risk level of the lesion are of great significance for the treatment and prognosis of patients. Traditional gastric cancer risk assessment mainly relies on the visual judgment of endoscopists on gastroscopy images or a comprehensive analysis combined with the patient's clinical history. This manual analysis method is easily affected by factors such as physician experience and subjective fatigue, which may lead to missed diagnoses or misjudgments. In addition, with the development of medical imaging technology, the amount of information that doctors need to process is constantly increasing, and timely and accurate detection of high-risk lesions from a large number of endoscopic images and other medical images is quite challenging.
[0003] In recent years, artificial intelligence technologies, represented by deep learning, have made significant progress in the field of medical image analysis. In particular, models such as convolutional neural networks (CNNs) have performed exceptionally well in image classification and segmentation tasks. For example, networks like UNet are widely used in medical image segmentation to delineate the boundaries of lesion regions; while classification networks such as ResNet and VGG are used to predict the presence of cancer in images. However, single classification models often fail to provide the precise location of lesions, while single segmentation models struggle to directly determine the cancer risk level. Therefore, researchers have proposed multi-task learning models that combine segmentation and classification, aiming to simultaneously obtain the location and category information of the target region to improve the accuracy and interpretability of diagnosis.
[0004] Nevertheless, existing technologies still have some shortcomings: First, the fixed approach of using a single model lacks flexibility; using the same model for both simple and complex scenarios may lead to inefficiency or poor accuracy. Second, the handling of model uncertainty is inadequate; when the confidence level of the model's output is low, the system often struggles to make a reliable judgment in a timely manner. Third, the result fusion strategy is simplistic; when combining multiple models, a simple method such as fixed weighted averaging is generally used, failing to fully utilize the strengths of different models to dynamically adjust decisions. These shortcomings may reduce the reliability and practicality of gastric cancer risk prediction.
[0005] Therefore, it is necessary to provide a new technical solution that can flexibly select appropriate models for analysis based on the characteristics of the input image, and fuse the results of multiple models when necessary, thereby improving the accuracy and robustness of gastric cancer risk prediction and reducing the rate of missed diagnosis and misdiagnosis. Summary of the Invention
[0006] In view of the problems existing in the prior art, the purpose of this invention is to provide a method and system for constructing a gastric cancer risk prediction model based on a joint segmentation and classification network, so as to at least partially solve the above-mentioned problems.
[0007] In a first aspect, embodiments of this application provide a method for constructing a gastric cancer risk prediction model using a joint segmentation and classification network, comprising the following steps:
[0008] Step s1: Perform image preprocessing on the input gastroscopy, CT, or pathology images to obtain the preprocessed input images;
[0009] Step s2: Identify whether the input image contains a label with a high clinical risk level L. If it contains a label with a high risk level L, proceed to step s5; otherwise, proceed to step s3.
[0010] The risk label L can be assigned by a doctor or automatically generated by the system based on medical history and examination reports. When the identification result is high-risk, the system's processing objective switches from "efficiency first" to "safety first," that is, prioritizing the accuracy and comprehensiveness of the judgment results. At this time, the system uses dual-model parallel analysis and arbitration fusion to minimize missed diagnoses.
[0011] For high-risk cases, the segmentation mask results output by the two models can be combined to ensure that all suspected lesions are labeled, thereby reducing the risk of missing potential lesions.
[0012] Step s3: Input the input image into the front-end routing network, which dynamically selects either the first prediction model or the second prediction model as the subsequent analysis model based on the features of the input image.
[0013] Step s4: Input the input image into the first prediction model / second prediction model selected in step s3, and output the first discrimination result or the second discrimination result. The discrimination result includes the risk prediction result, the segmentation mask of the suspected lesion area, and the confidence level corresponding to the prediction result.
[0014] Determine whether the confidence level is higher than a preset threshold: if it is higher than the preset threshold, the judgment result is directly output as the final gastric cancer risk prediction result; if it is lower than the preset threshold, proceed to step s5.
[0015] Step s5: Input the input image into the first prediction model and the second prediction model respectively to obtain the first discrimination result and the second discrimination result. The first discrimination result and the second discrimination result are fused by the arbitrator to output the final discrimination result. The final discrimination result includes the final gastric cancer risk prediction result, the lesion mask of the final suspected lesion area and the confidence level corresponding to the final gastric cancer risk prediction result.
[0016] The first prediction model adopts the UNet backbone structure and embeds a morphological attention module (MAM) to output a first discrimination result, which includes a lesion mask maskA generated by the segmentation branch for the suspected lesion area; and outputs the gastric cancer risk prediction result Rs and its confidence Cs by the classification branch.
[0017] The second prediction model uses the Swing Transformer backbone network. The second prediction model includes a segmentation branch and a classification branch, and outputs a second discrimination result. The second discrimination result includes a mask MaskB generated by the segmentation branch for suspected lesion areas, and the classification branch outputs the corresponding gastric cancer risk prediction result Rt and its confidence level Ct.
[0018] The confidence scores Cs and Ct are used to characterize the credibility of each prediction model for its own output results, and the confidence scores range from [0,1].
[0019] The clinical risk level L can be marked by the doctor or automatically confirmed based on the patient's medical history data, and provided along with the input image for use in step s2.
[0020] In step s3, the pre-routing network selects the first prediction model or the second prediction model by analyzing the image features of the input image. The image features include image sharpness and noise level, the number and size of suspicious lesion areas in the image, the texture complexity of the image, and the type or modality of image acquisition.
[0021] In step s5, when the arbitrator fuses the first and second discrimination results, it employs a confidence-weighted fusion algorithm to output the comprehensive probability of the risk prediction result. .
[0022] The overall probability of the risk prediction results The calculation method is as follows:
[0023] .
[0024] Secondly, this application provides a gastric cancer risk prediction model system based on a joint segmentation classification network, comprising:
[0025] The preprocessing module is used to perform image preprocessing on the input gastroscopy and CT images to obtain the preprocessed input images;
[0026] The label recognition module is used to identify high-risk labels L associated with images;
[0027] The front-end routing network module dynamically selects either the first or second prediction model as the subsequent analysis model based on the features of the input image.
[0028] The first prediction model module is used to extract local features based on the UNet+ morphological backbone structure and output the first discrimination result. The first discrimination result includes generating a lesion mask maskA for suspected lesion areas through segmentation branches; and outputting risk Rs and confidence Cs through classification branches.
[0029] The second prediction model module is used to extract global features based on the Swin Transformer and output a second discrimination result. The second discrimination result includes the lesion mask MaskB generated by the segmentation branch for the suspected lesion area, and the corresponding gastric cancer risk prediction result Rt and its confidence Ct output by the classification branch.
[0030] The arbitration fusion module is used to fuse the first and second discrimination results and generate the final risk prediction result, confidence level and comprehensive segmentation mask;
[0031] The output module is used to display the risk prediction results, confidence level, and lesion mask visualization results.
[0032] Thirdly, this application also provides an electronic device, including: a processor;
[0033] Memory used to store the processor's executable instructions;
[0034] The processor is configured to execute the instructions to implement the steps of the method of the first aspect described above.
[0035] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method described in the first aspect above.
[0036] Beneficial effects
[0037] In summary, through the above-described innovative design, the present invention effectively overcomes the shortcomings of the prior art, and compared with the prior art, the present invention has the following beneficial effects:
[0038] Dynamic model selection improves efficiency and adaptability: This invention introduces a pre-routing network to select an appropriate model for processing based on image complexity and characteristics. Simple and straightforward cases are processed by lightweight models, yielding results quickly; complex and difficult cases are analyzed by more powerful models, improving prediction accuracy. This dynamic allocation of computing resources balances efficiency and performance, significantly reducing unnecessary computation compared to using a fixed, complex model, thus improving inference efficiency while maintaining diagnostic accuracy.
[0039] Integrating segmentation and classification enhances accuracy and interpretability: The predictive model in this invention simultaneously performs segmentation and classification tasks, outputting a mask and risk level for suspected lesions. Segmentation results provide intuitive localization evidence for risk prediction, helping doctors understand the reasons behind the model's judgments and facilitating targeted follow-up examinations or biopsies of the lesion area. Classification results directly provide risk assessment. The combination of both gives the model both global judgment and fine-grained localization capabilities, helping to reduce misdiagnosis and missed diagnosis.
[0040] Confidence-driven dual-model arbitration fusion enhances reliability: When a single model lacks sufficient confidence in the result, this invention automatically introduces another model for auxiliary judgment and fuses the opinions of the two models through an arbitrator. The arbitration process considers factors such as model confidence and segmentation region matching, dynamically determining the final output, which is more intelligent than simple voting or averaging. In practice, this dual-model verification mechanism effectively reduces the errors that may occur when a model makes a decision alone, improves the system's ability to handle cases with ambiguous edges, ensures that high-risk cases are detected as much as possible, and prevents low-risk cases from being overdiagnosed.
[0041] Applicable to multiple medical imaging modalities: The method of this invention is compatible with multimodal data such as endoscopic images, CT images, and pathological images. By considering image modal characteristics in the pre-routing and model architecture and selecting optimized model branches, the method can perform effective gastric cancer risk analysis for images from different sources, thus expanding its application scope.
[0042] In summary, the method for constructing a gastric cancer risk prediction model using a joint segmentation and classification network provided by this invention addresses the shortcomings of existing technologies through an innovative multi-model collaboration approach, and can provide a smart, efficient, and reliable auxiliary diagnostic tool for clinical use. Attached Figure Description
[0043] Figure 1 This is a flowchart of the method for constructing a gastric cancer risk prediction model using a joint segmentation and classification network;
[0044] Figure 2 This is a logical diagram of the construction of a gastric cancer risk prediction model using a joint segmentation and classification network;
[0045] Figure 3 This is an electronic device architecture diagram used to implement a gastric cancer risk prediction model construction method based on a joint segmentation and classification network. Detailed Implementation
[0046] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings. It should be noted that these descriptions are for the purpose of aiding understanding the present invention, but do not constitute a limitation thereof. Furthermore, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0047] It should be noted that in the description of this invention, the terms "upper", "lower", "left", "right", "front", "rear", etc., indicate the orientation or positional relationship based on the description of the structure of this invention shown in the accompanying drawings. They are only for the convenience of describing this invention and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0048] The terms "first" and "second" in this technical solution are merely designations for corresponding structures that are identical or similar, or that perform similar functions. They do not represent an arrangement of the importance of these structures, nor do they imply any ranking, comparison of size, or other meaning.
[0049] Example 1
[0050] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, but the scope of protection of the present invention is not limited thereto.
[0051] like Figure 1 As shown, in one embodiment, the steps of the technical solution of the present invention are as follows:
[0052] Step s1: Perform image preprocessing on the input gastroscopy, CT, or pathology images to obtain the preprocessed input image; specifically, this includes normalization preprocessing of the image, such as adjusting the resolution to the size required by the network input, applying histogram equalization to improve contrast, etc., to generate a clear preprocessed image.
[0053] Step s2: Identify whether the input image contains a label with a high clinical risk level L. If it contains a label with a high risk level L, proceed to step s5; otherwise, proceed to step s3.
[0054] By querying the patient information associated with the image, the system determines whether a high-risk label L, marked by a doctor, exists. In step S2, the system queries the patient's electronic information associated with the input image to determine whether a high-risk label L, marked by a doctor, exists. This label indicates whether the patient has prior factors indicating a high risk of gastric cancer, including clinical assessment, medical history, and examination results.
[0055] The sources of the risk label L include:
[0056] Manual labeling method: Doctors can add "high risk of gastric cancer" tags to patients through the hospital's electronic medical record system or image archiving system; the tag format can be a structured field (e.g., risk level = high) or standard terms (e.g., early cancer suspected, severe dysplasia, family history of gastric cancer); the tag data is synchronously stored in the image data management platform and associated with the image data through a unique image identifier.
[0057] Automatic identification method: The system can automatically determine high risk based on the patient's past structured medical history. If any of the following conditions are met, it is considered high risk: the previous gastroscopy report contains keywords such as "severe atypical hyperplasia" or "glandular structure disorder"; the pathology report contains gastric cancer risk or gastric mucosal lesions; there is a first- or second-degree family history of gastric cancer; long-term abnormality of tumor markers such as CEA / CA19-9. The system uses keyword search, rule engine or lightweight model to automatically identify the above indicators and mark them with the internal label L=high.
[0058] If the patient is classified as high-risk, proceed directly to step S5, where a dual-model fusion discrimination is invoked to improve the detection rate of potential cancerous changes. If there is no high-risk prior, proceed to step S3.
[0059] Step s3: Input the input image into the front-end routing network, which dynamically selects either the first prediction model or the second prediction model as the subsequent analysis model based on the features of the input image.
[0060] In cases where high risk is not clearly identified, a pre-routing network is used to quickly analyze the image itself, thereby dynamically selecting the subsequent model branch. This pre-routing network can be a lightweight convolutional neural network or a rule-based discriminant algorithm, used to evaluate the complexity or feature distribution of the image. The routing network takes the preprocessed image as input and extracts a series of discriminative features, including but not limited to image sharpness and noise level, the number and size of suspicious lesion regions in the image, the texture complexity of the image, and the type or modality of image acquisition.
[0061] Image sharpness / quality: For example, sharpness and noise levels can be evaluated by calculating image gradients, Laplace operators, etc.
[0062] Number and size of suspicious lesions: A pre-trained small detection network or a threshold-based method can be used to initially identify the number of prominent abnormal regions in the image. If multiple discrete suspicious regions are detected, it indicates that the lesions may be scattered and the situation may be complex; conversely, if only a single obvious region is detected, the situation is relatively simple.
[0063] Lesion morphological characteristics: such as whether the lesion edges are clear and continuous, and the area size relative to the image. If the lesion boundaries are clear and the shape is regular, it indicates that traditional segmentation models (such as UNet) are sufficient; if the lesion edges are blurry or the shape is irregular, introducing a model with global context awareness is more advantageous.
[0064] Image acquisition type or modality: Based on whether the input image is a gastroscopy photograph (endoscopic imaging), a medical image (CT slice), or a pathological tissue slice, select the model more suitable for processing that modality. For example, endoscopic photographs are color realistic scenes containing information such as light reflection, and the structure of UNet with morphological attention module can highlight local suspicious lesions; while CT images are grayscale medical images, and models such as Swin Transformer are better at utilizing global information and have more effective results.
[0065] The preceding routing network combines the above features to provide a model selection signal. For example, the routing network outputs a binary classification result. When the overall image score is below a certain threshold T, it indicates that the image complexity is low and the quality is high, and the first prediction model is selected; when the score is above the threshold T, it indicates that the image is complex or of average quality, and the second prediction model is selected.
[0066] Preferably, the output score S ranges from [0,1]. The system presets a score threshold T=0.5, which can be dynamically adjusted. If S<0.5, the image structure is considered clear, and the first prediction model dominated by structural features is selected; if S≥0.5, the image is complex, and the second prediction model is used preferentially for risk prediction.
[0067] Specifically, in a preferred embodiment of the present invention: for images that are clear and contain a single, obvious anomalous region, the preceding routing network tends to select the first prediction model based on UNet, because this model can fully utilize morphological priors to accurately segment individual lesions and assess risk; for images with complex content or numerous suspected lesions with small and scattered areas, the second prediction model based on Swin Transformer is preferred, because this model excels at global feature extraction and multi-target processing. Through this dynamic routing, the system can automatically use a more suitable model for different images, improving analysis efficiency and accuracy.
[0068] Step s4: Input the input image into the first prediction model / second prediction model selected in step s3, and output the first discrimination result or the second discrimination result. The discrimination result includes the risk prediction result, the segmentation mask of the suspected lesion area, and the confidence level corresponding to the prediction result.
[0069] Determine whether the confidence level is higher than a preset threshold T1: If it is higher than the preset threshold T1, the judgment result is directly output as the final gastric cancer risk prediction result; if it is lower than the preset threshold T1, then step s5 is executed.
[0070] In this step, the prediction model selected in step s3 is used to determine the risk of gastric cancer in the input image. Specifically, if the routing network selects the first prediction model, the preprocessed image is input into the first prediction model; if the second prediction model is selected, it is input into the second prediction model. The two prediction models have different structures, but their output formats are similar, both including segmentation results and classification results.
[0071] The first prediction model (UNet+MAM): This model adopts the UNet backbone structure and embeds a morphological attention module (MAM) into the network. The UNet backbone consists of an encoder and a decoder. The encoder progressively extracts multi-scale features from the image, and the decoder progressively restores the spatial resolution. The morphological attention module can fuse features at different scales and focus on the shape edges of suspected lesions, improving the ability to extract structural information. After completing forward inference, the first model outputs a segmentation mask MaskA through its segmentation branch to mark the location of suspected lesion areas in the image; and outputs the corresponding risk prediction result Rs (e.g., a probability score for the "high-risk" category) and confidence Cs through its classification branch. Here, the confidence Cs can be the probability value of the classification branch output belonging to the predicted category, or it can be based on the model's assessment of the stability of the prediction (e.g., uncertainty calculated based on multiple Dropout sampling). Intuitively, Rs characterizes the model's judgment on the presence of malignant lesions / high risk (e.g., positive or negative), while Cs characterizes the reliability of this judgment.
[0072] The second prediction model (Swin Transformer): This model uses the Swin Transformer as its backbone. The Swin Transformer is a network based on the visual Transformer, utilizing a multi-head self-attention mechanism and hierarchical local windowing techniques to extract image features. It can capture the relationship between lesions and surrounding tissues globally, and has advantages for large-scale images or multiple lesion situations. The second model also includes a segmentation branch and a classification branch: the segmentation branch uses the features decoded by the Transformer to generate a mask MaskB for suspected lesion regions; the classification branch outputs the risk prediction result Rt and confidence score Ct based on global features. The definitions of Rt and confidence score Ct are similar to those of Rs and Cs mentioned above, but they come from the second model. To correspond with the output of the first model, Rt can be understood as an indicator of the risk category (e.g., whether it is high risk) judged by the second model. In this embodiment, confidence scores Cs and Ct are used to characterize the credibility of each prediction model's output results, and the confidence score ranges from [0,1].
[0073] After the selected model completes inference on the input image, the system obtains the model's discrimination result (i.e., the aforementioned risk prediction result, segmentation mask, and confidence level). Next, this step compares the confidence level of the discrimination result with a preset threshold:
[0074] If the confidence level (Cs or Ct) of the model output is higher than the preset threshold T1, preferably with a value in the range of [0.8-0.95], then the model is considered to have a high degree of confidence in the result. In this case, the risk prediction result given by the model is directly used as the final output, and its segmentation mask is provided for clinical reference. For example, the first model may output a "high risk" judgment with Cs=0.95 (very confident), then the system directly outputs the high-risk conclusion and the lesion location shown in MaskA. Since the model is highly confident, there is no need to use the second model in this case, saving resources and avoiding unnecessary computational overhead.
[0075] If the confidence level of the model output is lower than the preset threshold T1, it indicates that the model is not certain about the current judgment and there may be a risk of misjudgment. In this uncertain situation, the present invention will not output a result rashly, but will introduce another model for verification, i.e., proceed to step s5. The preset threshold T1 can be determined based on the model performance on the training set. For example, a probability value of 0.8 or 0.85 that can guarantee accuracy can be selected as the threshold. If it is lower than this value, further verification is required.
[0076] Step s5: Input the input image into the first prediction model and the second prediction model respectively to obtain the first discrimination result and the second discrimination result. The first discrimination result and the second discrimination result are fused by the arbitrator to output the final discrimination result. The final discrimination result includes the final gastric cancer risk prediction result, the lesion mask of the final suspected lesion area and the confidence level corresponding to the final gastric cancer risk prediction result.
[0077] If the first or second discrimination result is uncertain, or if the input is marked as high-risk, this step simultaneously employs both the first and second prediction models to analyze the same input image separately, and then fuses the two discrimination results to generate the final gastric cancer risk prediction result. The specific process is as follows:
[0078] Obtain the discrimination results of the two models: Input the input image into the first prediction model and the second prediction model in parallel (for cases entering from step s4, since one model already has a result, the other model can be run again to obtain another result; for high-risk cases that jump directly from step s2, both models are run simultaneously). This yields the discrimination result (Rs, Cs, MaskA) output by the first model and the discrimination result (Rt, Ct, MaskB) output by the second model.
[0079] Arbitrator Fusion: This invention includes an arbitrator module for comprehensively analyzing the results of two models and providing a final decision. The arbitrator can be implemented using software algorithms, such as a rule engine or a small neural network. The following factors are considered during the fusion decision:
[0080] Are the risk prediction results Rs and Rt output by the two models consistent (e.g., both are judged as high risk, or one is high risk and the other is low risk)?
[0081] The confidence levels Cs and Ct reflect the reliability of their respective results.
[0082] Differences and similarities between segmentation masks MaskA and MaskB include whether the lesion regions overlap and whether their sizes are similar. If the two models mark the same or overlapping suspected lesion regions on the image, it indicates a consensus on the same region, which is more credible; if the regions marked by each model are completely different or even do not overlap, further analysis is needed to determine which one is more likely to be a true positive.
[0083] The arbitrator combines the above information with a dynamic fusion strategy. For example, a confidence-weighted fusion algorithm can be used to calculate the combined probability of the risk prediction results from the two models. ,For example:
[0084]
[0085] in and Let Rs and Rt represent the probabilities that the first and second models predict a high-risk outcome, respectively, derived from Rs and Rt, with values ranging from 0 to 1. For example, if the model outputs Rs as a high-risk judgment with a probability of 85%, then... It is 0.85.
[0086] The weights are determined by their respective confidence levels Cs and Ct; models with higher confidence levels have a larger weighting on their results. The arbitrator can... The final risk level is determined by comparing it with a decision threshold. If If the risk exceeds the threshold, it is considered high risk; otherwise, it is considered low risk.
[0087] However, the present invention is not limited to a simple weighted average. In a preferred embodiment, the arbitrator may adopt a fusion strategy that dynamically adjusts the fusion based on the consistency of the discrimination results and the mask information, for example:
[0088] If the two models reach the same conclusion and both have a confidence level higher than the threshold T3, preferably with T3 ranging from 0.5 to 0.8, for example, if both are judged as high risk, then the final result is also judged as high risk. In this case, the confidence level can be increased based on the two models' confidence levels, such as taking the higher confidence level as the final confidence output, and then the masking results of the two models can be superimposed and fused, such as by taking the intersection or union, preferably the union to give the overall lesion range. If both models conclude as low risk, then the low-risk conclusion is directly output.
[0089] If the two models reach opposite conclusions (one high risk, one low risk), the arbitrator will focus on comparing the confidence levels of the two models.
[0090] Compare the confidence differences between the two models When ΔC is greater than the preset confidence difference threshold T2, the prediction result output by the model with higher confidence is preferred, since this model is more certain about the result; preferably, T2 is set to 0.2 to 0.4. At the same time, the arbitrator also refers to a mask: if the model judged as high-risk marks a clear lesion area, while the model judged as low-risk has no obvious mask or a very small mask, then it tends to believe the high-risk judgment of having substantial lesions and outputs a high-risk prediction result.
[0091] Conversely, if the low-risk model has low confidence but also marks some regions, and the regions are not consistent with the high-risk model, with low overlap, it is preferable to set the overlap ratio to be below the threshold T4 to determine low consistency. The arbitrator reduces the credibility of the high-risk judgment, and the output result needs to be manually reviewed.
[0092] Specifically, a mask consistency coefficient M is introduced, which can be used to correct the prediction results. M reflects the overlap ratio of the segmentation masks of the two models. The ratio is determined by the ratio of the overlapping region to the union region. α is a correction coefficient with a value range of [0-1].
[0093]
[0094] If the low-risk model, although having a low confidence level, still identifies some regions with high consistency to the high-risk model, and the overlapping region exceeds a threshold T4 (preferably with a threshold T4 value of 50%, and the range of the threshold T4 can be dynamically adjusted), then the system can improve the reliability of the high-risk judgment and output a high-risk prediction result.
[0095]
[0096] in, The probability of the risk prediction result output by the model with high confidence is given, and its value ranges from [0-1]. The arbitrator can... The final risk level is determined by comparing it with a decision threshold.
[0097] When ΔC is less than the threshold T2, the prediction results of the two are fused in an equal-weighted manner, that is, the above-mentioned method is adopted. The algorithm obtains a comprehensive risk probability, and then uses this probability to determine the final category. This avoids errors that might result from blindly relying on a single model.
[0098] If both models have low confidence levels, but their confidence values are below the threshold T3, yet they both point to the same high-risk conclusion, the combined result may still reach a probability above the threshold, thus outputting a high-risk conclusion, marking suspicious lesion areas, outputting the average confidence level of the two models, and indicating that there is still some uncertainty requiring manual review. If both models point to a low-risk conclusion, the arbitrator outputs a low-risk conclusion, but still reminds users that a final manual judgment is needed. Furthermore, this judgment process has higher priority than processes where the two models reach opposite conclusions; that is, if the confidence levels of both models are below the threshold T3, this judgment process is executed, and there is no need to compare the difference in confidence levels between the two models.
[0099] The final output obtained through the above-described arbitration fusion strategy includes: a final gastric cancer risk prediction result (e.g., high or low risk level), its confidence level (which can be obtained based on fusion calculation or rule-based determination), and a final segmentation mask (generated by combining MaskA and MaskB, for example, by taking the union of the two to ensure that all possible lesions are marked, or by assigning higher weight to overlapping areas). This final result will be provided to doctors as an auxiliary diagnostic basis. If the overall confidence level of the arbitrator is still low, the method of this invention can also mark the result as "uncertain," indicating that further manual examination or other diagnostic methods are needed for confirmation.
[0100] In summary, the technical solution of this invention realizes a hierarchical processing flow for gastric cancer risk prediction through a front-end routing network + dual-model + arbitrator architecture: under normal circumstances, a single model is used to quickly provide results, while under high-risk or uncertain circumstances, dual-model cross-validation and fusion judgment are automatically activated, thereby improving the reliability and robustness of model decision-making.
[0101] Example 2
[0102] This application provides a gastric cancer risk prediction model system based on a joint segmentation and classification network, including:
[0103] The preprocessing module is used to perform image preprocessing on the input gastroscopy and CT images to obtain the preprocessed input images;
[0104] The label recognition module is used to identify high-risk labels L associated with images;
[0105] The front-end routing network module dynamically selects either the first or second prediction model as the subsequent analysis model based on the features of the input image.
[0106] The first prediction model module is used to extract local features based on the UNet+ morphological backbone structure and output the first discrimination result. The first discrimination result includes generating a lesion mask maskA for suspected lesion areas through segmentation branches; and outputting risk Rs and confidence Cs through classification branches.
[0107] The second prediction model module is used to extract global features based on the Swin Transformer and output a second discrimination result. The second discrimination result includes the lesion mask MaskB generated by the segmentation branch for the suspected lesion area, and the corresponding gastric cancer risk prediction result Rt and its confidence Ct output by the classification branch.
[0108] The arbitration fusion module is used to fuse the first and second discrimination results and generate the final risk prediction result, confidence level and comprehensive segmentation mask;
[0109] The output module is used to display the risk prediction results, confidence level, and lesion mask visualization results.
[0110] Example 3
[0111] An electronic device, such as Figure 3 As shown, it includes a memory storing executable program code and a processor coupled to the memory; wherein the processor calls the executable program code stored in the memory to execute the method steps disclosed in the above embodiments.
[0112] Example 4
[0113] A computer storage medium storing a computer program, wherein the computer program is executed by a processor to perform the method steps disclosed in the above embodiments.
[0114] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0115] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0116] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0117] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. For those skilled in the art, various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention, and these variations still fall within the protection scope of the present invention.
Claims
1. A method for constructing a gastric cancer risk prediction model using a joint segmentation and classification network, characterized in that: Step s1: Perform image preprocessing on the input gastroscopy and CT images to obtain the preprocessed input images; Step s2: Identify whether the input image contains a label with a high clinical risk level L. If it contains a label with a high risk level L, proceed to step s5; otherwise, proceed to step s3. Step s3: Input the input image to the front-end routing network, which dynamically selects either the first prediction model or the second prediction model as the subsequent analysis model based on the features of the input image. Step s4: Input the input image into the first prediction model / second prediction model selected in step s3, and output the first discrimination result or the second discrimination result. The discrimination result includes the risk prediction result, the lesion mask of the suspected lesion area, and the confidence level corresponding to the prediction result; determine whether the confidence level is higher than the preset threshold T1: if it is higher than the preset threshold T1, then the discrimination result is directly output as the final risk prediction result. If the value is lower than the preset threshold T1, then proceed to step s5; Step s5: Input the input image into the first prediction model and the second prediction model respectively to obtain the first discrimination result and the second discrimination result. The first discrimination result and the second discrimination result are fused by the arbitrator to output the final discrimination result. The final discrimination result includes the final risk prediction result, the lesion mask of the final suspected lesion area and the confidence level corresponding to the final risk prediction result. The first discrimination result includes a first risk prediction result Rs, a first confidence level Cs, and a lesion mask MaskA for the first suspected lesion area; the second discrimination result includes a second risk prediction result Rt, a second confidence level Ct, and a lesion mask MaskB for the second suspected lesion area. When the first risk prediction result Rs is consistent with the second risk prediction result Rt, and both the first confidence level Cs and the second confidence level Ct are higher than the third confidence level threshold T3, the arbitrator takes the risk prediction result that both of them point to as the final risk prediction result. When the first risk prediction result Rs is opposite to the second risk prediction result Rt, the arbitrator compares the confidence difference ΔC between the first confidence level Cs and the second confidence level Ct. If the confidence difference ΔC is greater than the preset confidence difference threshold T2, the risk prediction result output by the prediction model with higher confidence is adopted, and the credibility of the risk prediction result is corrected by combining the mask consistency. If the confidence difference ΔC is less than the preset confidence difference threshold T2, the risk probabilities output by the first prediction model and the second prediction model are equally weighted and fused to determine the final risk prediction result.
2. The method for constructing a gastric cancer risk prediction model using a joint segmentation classification network according to claim 1, characterized in that: The first prediction model adopts the UNet backbone structure and embeds a morphological attention module (MAM) to output a first discrimination result, which includes a lesion mask maskA generated by the segmentation branch for the suspected lesion area; and outputs the gastric cancer risk prediction result Rs and its confidence Cs by the classification branch.
3. The method for constructing a gastric cancer risk prediction model using a joint segmentation classification network according to claim 2, characterized in that: The second prediction model uses the Swing Transformer backbone network. The second prediction model includes a segmentation branch and a classification branch, and outputs a second discrimination result. The second discrimination result includes the lesion mask MaskB generated by the segmentation branch for the suspected lesion area, and the corresponding gastric cancer risk prediction result Rt and its confidence Ct output by the classification branch.
4. The method for constructing a gastric cancer risk prediction model using a joint segmentation classification network according to claim 1, characterized in that: The clinical risk level L can be marked by the doctor or automatically confirmed based on the patient's medical history data, and provided along with the input image for use in step s2.
5. The method for constructing a gastric cancer risk prediction model using a joint segmentation classification network according to claim 1, characterized in that: In step s3, the pre-routing network selects the first prediction model or the second prediction model by analyzing the image features of the input image.
6. The method for constructing a gastric cancer risk prediction model using a joint segmentation classification network according to claim 5, characterized in that: The image features include image sharpness and noise level, the number and size of suspicious lesion areas in the image, and the type or modality of image acquisition.
7. The method for constructing a gastric cancer risk prediction model using a joint segmentation classification network according to claim 3, characterized in that: In step s5, when the arbitrator performs equal-weighted fusion processing on the first and second discrimination results, it adopts a confidence-weighted fusion algorithm to output the comprehensive probability of the risk prediction result. .
8. The method for constructing a gastric cancer risk prediction model using a joint segmentation classification network according to claim 7, characterized in that: The combined probability of the final gastric cancer risk prediction results The calculation method is as follows: 。 9. A gastric cancer risk prediction model system for implementing the method of any one of claims 1 to 8, characterized in that, include: The preprocessing module is used to perform image preprocessing on the input gastroscopy and CT images to obtain the preprocessed input images; The label recognition module is used to identify high-risk labels L associated with images; The front-end routing network module dynamically selects either the first or second prediction model as the subsequent analysis model based on the features of the input image. The first prediction model module is used to extract local features based on the UNet+ morphological backbone structure and output the first discrimination result. The first discrimination result includes generating a lesion mask maskA for suspected lesion areas through segmentation branches; and outputting risk Rs and confidence Cs through classification branches. The second prediction model module is used to extract global features based on the Swin Transformer and output a second discrimination result. The second discrimination result includes the lesion mask MaskB generated by the segmentation branch for the suspected lesion area, and the corresponding gastric cancer risk prediction result Rt and its confidence Ct output by the classification branch. The arbitration fusion module is used to fuse the first and second discrimination results and generate the final risk prediction result, confidence level and comprehensive segmentation mask; The final judgment result includes the final risk prediction result, the lesion mask of the final suspected lesion area, and the confidence level corresponding to the final risk prediction result; The arbitration fusion module is used to take the risk prediction result that both the first risk prediction result Rs and the second risk prediction result Rt are consistent, and both the first confidence level Cs and the second confidence level Ct are higher than the third confidence threshold T3, as the final risk prediction result. The arbitration fusion module is further configured to compare the confidence difference ΔC between the first confidence level Cs and the second confidence level Ct when the first risk prediction result Rs and the second risk prediction result Rt are opposite; if the confidence difference ΔC is greater than the preset confidence difference threshold T2, the risk prediction result output by the prediction model with higher confidence is adopted, and the credibility of the risk prediction result is corrected by combining mask consistency; if the confidence difference ΔC is less than the preset confidence difference threshold T2, the risk probabilities output by the first prediction model module and the second prediction model module are equally weighted and fused to determine the final risk prediction result. The output module is used to display the risk prediction results, confidence level, and lesion mask visualization results.
10. An electronic device, characterized in that: The method includes a memory storing executable program code and a processor coupled to the memory; wherein the processor invokes the executable program code stored in the memory to perform the method as described in any one of claims 1-8.