Deep learning assisted gastric cancer peritoneal metastasis pathological section diagnosis system and method thereof
Patent Information
- Application Number
- CN202611198757.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-08
- Publication Date
- 2026-10-23
AI Technical Summary
[0003]现有方法对高分化腺癌的腺体结构轻微异型(如隐窝分支角<15°改变)及微转移灶(<50个肿瘤细胞)的识别敏感性不足,导致高危病例漏诊风险升高
[0022]1、本发明通过对原始病理切片图像进行一系列特定的处理步骤,包括放大、热图提取、坐标筛选以及不同倍率的采样和分辨率增强等操作,能够更精准地聚焦于浆膜层边界坐标相关的风险区域。这种基于特定技术特征的处理方式,相较于现有技术中较为笼统的图像分析方法,可有效排除无关信息的干扰,使得后续对风险区域的分析和处理更具针对性,从而提高整个诊断流程的准确性和可靠性。
Smart Images

Figure CN122968012A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical auxiliary diagnostic technology, specifically to a deep learning-assisted system and method for diagnosing pathological sections of gastric cancer peritoneal metastases. Background Technology
[0002] In the field of medical imaging-assisted diagnosis, the identification of pathological sections of peritoneal metastases from gastric cancer is a crucial step in determining clinical treatment plans. Current medical practice mainly relies on pathologists to diagnose by visually examining H&E-stained sections under a microscope. This technique has a standardized operating procedure: First, tissue samples are prepared into paraffin sections with a thickness of 5-10 μm, stained with hematoxylin and eosin, and then placed under an optical microscope. The physician must scan the entire area of the section using progressive magnification mode, subjectively determining metastatic lesions based on morphological characteristics such as nuclear atypia and glandular structural damage. Finally, a pathology report containing the location of the lesion and the metastatic lesions is generated.
[0003] Existing methods lack sufficient sensitivity in identifying minor aberrations in glandular structure (such as crypt branching angle changes <15°) and micrometastases (<50 tumor cells) in well-differentiated adenocarcinoma, leading to an increased risk of missed diagnoses in high-risk cases. For example, in early micrometastase identification, inexperienced physicians may overlook abnormal staining intensity due to the small size of cell clusters, misdiagnosing early lesions as inflammatory reactions; there is a conflict between the efficiency of whole-section scanning and the accuracy of lesion identification; when reactive inflammation (such as CD68+ macrophage infiltration) appears in the peritoneal metastatic lesion area, its disordered tissue structure overlaps morphologically with that of well-differentiated metastases, increasing the risk of false positives. Existing systems directly use the raw sigmoid probability as the confidence output, without considering the inherent overconfidence of deep neural networks. Especially in low-quality samples (such as unevenly stained sections), the model may still output a high confidence probability of over 0.9 for ambiguous features, causing clinicians to neglect manual verification of key controversial areas, resulting in missed diagnoses of high-risk cases.
[0004] To address the aforementioned issues, there is an urgent need in this field to provide a multi-scale collaborative diagnostic mechanism for peritoneal metastasis of gastric cancer under the constraints of pathological anatomy. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a deep learning-assisted diagnostic system and method for peritoneal metastasis pathology sections of gastric cancer.
[0006] To achieve the above objectives, the technical solution of the present invention is as follows:
[0007] In a first aspect, the present invention discloses a deep learning-assisted method for diagnosing peritoneal metastases of gastric cancer via pathological sections, comprising the following steps:
[0008] The system receives original pathological slide images, processes them into H&E stained whole slide digital images, and generates a heterogeneity probability heatmap after fusion according to preset weights.
[0009] Load the pre-stored serosal layer boundary coordinates of the gastric wall layered structure, and extract the coordinates of the heatmap values of the heterogeneity probability heatmap at a preset high quantile as candidate region coordinates;
[0010] Based on the spatial topological relationship between the coordinates of each candidate region and the boundary coordinates of the slurry film layer, distance and range are used for screening to generate risk areas;
[0011] After processing the risk area to generate multi-scale image data, weighted fusion is performed to generate a fused feature vector. The fused feature vector is then input into a preset classification model to generate the probability value and confidence level of metastatic lesions. ;
[0012] Regarding the confidence level Temperature scaling calibration is implemented, and the temperature parameters are solved using the negative log-likelihood loss function. ; Confidence level after calibration according to Calculate; where l The logical value of the sample to be predicted generated by the fused feature vector. For the Sigmoid function;
[0013] When the probability value of metastatic lesions is greater than the dynamic diagnostic threshold At that time, a diagnostic report is generated.
[0014] Secondly, this invention discloses a deep learning-assisted diagnostic system for peritoneal metastases of gastric cancer using pathological sections, comprising:
[0015] Acquisition and processing module: used to receive raw pathological slide images, process them into H&E stained whole slide digital images, and generate heterogeneity probability heatmaps after fusion according to preset weights;
[0016] Structural analysis module: used to load the boundary coordinates of the serosal layer of the pre-stored gastric wall layered structure, and extract the coordinates of the heatmap values of the heterogeneity probability heatmap at a preset high quantile as candidate region coordinates;
[0017] Coordinate filtering module: used to filter by distance and range based on the spatial topological relationship between the coordinates of each candidate region and the boundary coordinates of the slurry layer, and generate risk areas;
[0018] Multi-scale processing module: This module processes the risk region to generate multi-scale image data, then performs weighted fusion to generate a fused feature vector. The fused feature vector is then input into a preset classification model to generate the probability value and confidence level of metastatic lesions. ;
[0019] Temperature calibration module, used for the confidence level Temperature scaling calibration is implemented, and the temperature parameters are solved using the negative log-likelihood loss function. ; Confidence level after calibration according to Calculate; where l The logical value of the sample to be predicted generated by the fused feature vector. For the Sigmoid function;
[0020] Classification Decision Module: The probability value of metastatic lesions is greater than the dynamic diagnostic threshold. At that time, a diagnostic report is generated.
[0021] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0022] 1. This invention employs a series of specific processing steps on the original pathological slide images, including magnification, heatmap extraction, coordinate filtering, and sampling at different magnifications and resolution enhancement, to more accurately focus on risk areas related to the serous membrane boundary coordinates. Compared to the more general image analysis methods in existing technologies, this processing approach based on specific technical features effectively eliminates interference from irrelevant information, making subsequent analysis and processing of risk areas more targeted, thereby improving the accuracy and reliability of the entire diagnostic process.
[0023] 2. This invention utilizes heterogeneity probability heatmap screening combined with serosal layer spatial topological constraints to transform the anatomical distribution patterns of gastric cancer peritoneal metastasis into calculable distance parameters and range thresholds. This allows the model to focus on high-incidence areas of serosal layer infiltration while avoiding interference from vascular and lymphatic vessels. This design integrates prior medical knowledge with image analysis algorithms, overcoming the limitations of traditional methods in global processing of tissue sections, and significantly suppressing false positives while maintaining sensitivity in lesion detection. Temperature scaling calibration and confidence reconstruction formulas form a closed-loop verification mechanism.
[0024] 3. This invention generates a comprehensive feature vector from the multi-scale features of the processed multi-scale image, and inputs it into the Sigmoid function to generate transition probability values and confidence scores. Based on the transition probability values and a dynamic diagnostic threshold... The diagnostic report is generated by comparing data. A risk-adaptive decision-making system is constructed by combining a dynamic diagnostic threshold (Threshold), which forces manual review of low-confidence predictions, achieving synergistic optimization between intelligent algorithms and clinical experience. This diagnostic report generation method, based on comprehensive feature vectors and specific functions, fully utilizes the rich and valuable information extracted from various image processing techniques. Compared to the relatively simple diagnostic criteria in existing technologies, it can more scientifically and accurately diagnose peritoneal metastases of gastric cancer in pathological sections, providing more valuable reference for clinical diagnosis and helping to improve the efficiency and accuracy of gastric cancer diagnosis. Attached Figure Description
[0025] The disclosure of this invention is illustrated with reference to the accompanying drawings. It should be understood that the drawings are for illustrative purposes only and are not intended to limit the scope of protection of this invention. In the drawings, the same reference numerals are used to refer to the same parts. Wherein:
[0026] Figure 1 This is a flowchart of the method steps of the present invention;
[0027] Figure 2 This is a flowchart of the temperature calibration steps of the present invention;
[0028] Figure 3 This is a flowchart illustrating the process of generating the heterogeneity probability heatmap of the present invention.
[0029] Figure 4 This is a system module connection diagram of the present invention;
[0030] Figure 5 This is a flowchart of the system modules of the present invention. Detailed Implementation
[0031] It is readily understood that, based on the technical solution of this invention, those skilled in the art can propose various interchangeable structural methods and implementations without altering the essential spirit of the invention. Therefore, the following detailed embodiments and accompanying drawings are merely illustrative examples of the technical solution of this invention and should not be considered as the entirety of the invention or as limitations or restrictions on the technical solution of this invention.
[0032] In current technologies, the identification of peritoneal metastases in gastric cancer using medical imaging-assisted diagnosis primarily relies on pathologists' subjective judgment through microscopic visual examination of H&E-stained slides. This traditional method suffers from problems such as significant differences in judgment standards among physicians, a conflict between the efficiency of whole-slide scanning and the accuracy of lesion identification, and a high risk of misdiagnosis based on low-quality samples. For example, when inflammatory reactions are present at the serosa, physicians struggle to accurately distinguish between tissue atypia and actual metastases, leading to a risk of false positive diagnoses. Existing computer-aided systems directly use uncalibrated neural network output probabilities as confidence levels, which can easily lead to overconfident predictions in samples with uneven staining or ambiguous features, causing clinicians to neglect the manual review step.
[0033] Analysis revealed that the spatial relationship between nuclear atypia and the anatomical structure of the serosal layer is a key factor affecting diagnostic accuracy. Further research showed that multi-scale image feature fusion can effectively capture the morphological details of micrometastases, while a confidence calibration mechanism can alleviate the problem of model overconfidence. Based on this, a solution combining anatomical constraints and multi-scale analysis was developed: suspicious areas are located using heterogeneity probability heatmaps, risk areas are screened using the spatial topological relationship of the serosal layer, multi-scale feature fusion is used to improve the identification ability of micrometastases, and temperature scaling calibration is introduced to optimize confidence assessment.
[0034] After introducing the basic concept of the present invention, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0035] Example 1:
[0036] like Figure 1 As shown, a deep learning-assisted method for diagnosing peritoneal metastases of gastric cancer via pathological sections includes the following steps:
[0037] The system receives original pathological slide images, processes them into H&E stained whole slide digital images, and generates a heterogeneity probability heatmap after fusion according to preset weights.
[0038] Load the pre-stored serosa boundary coordinates of the gastric wall layer structure, and extract the coordinates of the heatmap values from the heterogeneity probability heatmap at a preset high quantile (e.g., 5%-15%, preferably 10%) as candidate region coordinates. The pre-stored serosa boundary coordinates of the gastric wall layer structure are obtained as follows: Pathologists with more than 5 years of experience manually annotate the boundary between the serosa and subserosa layers on H&E-stained whole-slice digital images at 40x magnification, with an annotation accuracy requirement of no more than ±5μm (approximately ±11 pixels). The annotation results are stored in JSON format, with the coordinate system consistent with the pixel coordinate system of the whole-slice image, and the coordinate unit is pixels. The annotation physician information, annotation time, and image scanner model are also recorded. During batch deployment, the serosa boundary coordinates can also be automatically generated by an improved DeepLab v3+ segmentation network trained on 500 annotated samples (Dice coefficient 0.88±0.03), and used after confirmation by the pathologist.
[0039] Based on the spatial topological relationship between the coordinates of each candidate region and the boundary coordinates of the serous film layer, distance and range are used for screening to generate risk areas; high-risk areas for early metastasis (Euclidean distance <3mm) are screened, and direct invasion lesions and independent metastatic lesions are distinguished.
[0040] After processing the risk area to generate multi-scale image data, weighted fusion is performed to generate a fused feature vector. The fused feature vector is then input into a preset classification model to generate the probability value and confidence score of metastatic lesions. ;
[0041] confidence level Temperature scaling calibration is implemented, and the temperature parameters are solved using the negative log-likelihood loss function. ; Confidence level after calibration according to Calculate; where l The logical value of the sample to be predicted is generated by fusing feature vectors. For the Sigmoid function;
[0042] When the probability value of metastatic lesions is greater than the dynamic diagnostic threshold If the test result is positive, a positive diagnostic report is generated; otherwise, a negative diagnostic report is generated. Based on post-calibration confidence The mapping is dynamically adjusted based on negative correlation, with low confidence levels corresponding to low thresholds.
[0043] Specifically, after the original pathological sections are digitized to generate high-resolution images, heterogeneity probability heatmaps are generated using quantified cell nuclear features to locate suspicious areas. Combined with pre-stored anatomical structure data, candidate areas close to the serosal layer and far from blood vessels and lymphatic vessels are selected. In the multi-scale image processing stage, panoramic images capture the overall tissue structure, local images preserve cellular details, and super-resolution images enhance subcellular features. After feature fusion, these are input into the classification model. Temperature scaling calibration adjusts the confidence output based on validation set performance, and dynamic diagnostic thresholds are automatically updated based on historical misdiagnosis data. Finally, a reliable diagnostic report is generated, including risk area coordinates, heterogeneity scores, and multi-scale comparison images, displaying the location of metastatic lesions and other lesions. By replacing subjective judgment with quantified feature analysis, improving localization accuracy by combining anatomical constraints, and enhancing feature expression capabilities through multi-scale fusion, high-precision, low-risk assisted diagnosis is ultimately achieved.
[0044] Multi-scale image data is weighted and fused using a two-branch approach. The first branch extracts image depth feature vectors using a ResNet34 network. The second branch concatenates the heterogeneity value H with the anatomical label S, and generates an auxiliary feature vector through a fully connected layer. Calculate the association matrix with the cross-modal attention layer : ;
[0045] Weighted fusion generates joint features: ;
[0046] Logit (logistic odds) is generated through a linear transformation based on the fused feature vector F. Logit is the raw output value of the classification model before the final activation layer. In this scheme, Logit is a single predicted value generated by the fused feature vector through the last fully connected layer, representing the tendency of a sample to belong to the metastatic foci category. Let the fused feature vector be... The result is obtained through linear transformation of the weight matrix W and the bias b. The calculation formula is as follows:
[0047] ;
[0048] The range is all real numbers ( ), where d is the feature dimension;
[0049] Positive and negative values represent the strength of evidence supporting / opposing the metastatic lesion judgment, respectively; the original discriminant information is preserved as it is not mapped by the Sigmoid function.
[0050] The probability values for obtaining metastatic lesions are as follows:
[0051] ;
[0052] ;
[0053] Confidence The calculation formula is as follows:
[0054] ;
[0055] The raw output of the neural network is transformed into standardized diagnostic deterministic indicators through a three-stage process. First, the logit value (the raw output of the fully connected layer of the deep model) is input into the Sigmoid function to generate the probability value P of metastatic lesions. Then, core offset quantization is performed, and the absolute difference between the probability value P of metastatic lesions and the neutral reference point of 0.5 is taken. This step essentially measures the magnitude by which the model's prediction deviates from a state of "complete uncertainty": when the probability value approaches 0.5, it indicates that the model's judgment is close to random guessing, while approaching 0 or 1 reflects a clear bias. Through this calculation, the abstract probability is transformed into a measurable scale of determinism. Finally, a confidence normalization mapping is performed, multiplying the offset by a scaling factor of 2, so that the output value strictly falls within the standardized interval [0,1].
[0056] When p=0.5, the confidence level is 0 (completely uncertain); when p=0.0 or p=1.0, the confidence level is 1 (completely certain); when p=0.5, the confidence level is 1 (completely certain). When the value is less than 0.3 (high risk and uncertain), the system automatically marks it as "case to be reviewed, requiring intervention from pathology experts for diagnosis".
[0057] like Figure 2 As shown, temperature calibration adjusts the model confidence distribution to match the actual accuracy. The specific steps of temperature calibration are as follows:
[0058] Obtain gold-standard labeled pathological images (N≥500 cases) as the validation set. The optimized validation set for the temperature parameter T must include at least 10% heterogeneous staining samples and cover three common scanner models (Hamamatsu / Leica / Aperio). Input the validation set. Initialize T=1.0 and iteratively optimize using gradient descent (learning rate 0.01); verify loss convergence or reach 200 iterations. The temperature parameter T is solved by minimizing the negative log-likelihood loss function, the calculation formula of which is as follows:
[0059] ;
[0060] in, For real labels, For the Sigmoid function;
[0061] The optimized temperature parameter T is written into the system configuration file. The temperature parameter T adjusts the flatness of the probability distribution.
[0062] When T>1, the probability distribution is flattened, suppressing overconfident predictions;
[0063] When T < 1, the probability distribution is sharpened to enhance high-confidence judgments.
[0064] The formula for calculating the calibrated confidence level is as follows:
[0065] ;
[0066] By dividing Logit by the temperature parameter T and then performing a Sigmoid mapping, the T value is obtained through validation set optimization, which corrects the model's overconfidence tendency (e.g., reducing the high false positive probability of 0.99 to 0.85) and improves the reliability of low probability samples (e.g., increasing the low confidence of 0.55 to 0.65).
[0067] (1) When the confidence level after calibration When the value is less than 0.3, manual review will be forcibly triggered;
[0068] (2) When ∈[0.3, 0.6) and P> A positive report with a verification mark is generated in a timely manner;
[0069] (3) Only when ≥0.6 and P> Only then will the system automatically generate the final positive diagnosis report.
[0070] Through the above technical solutions, this application achieves objective quantitative evaluation of pathological sections of peritoneal metastases in gastric cancer, effectively reducing the risk of misdiagnosis caused by diagnostic differences among physicians. The combination of anatomical structural constraints and multi-scale feature fusion improves the identification accuracy of micrometastases, especially in complex cases at the serosa-septoplasty junction, accurately distinguishing between true lesions and inflammatory responses. This solution introduces a temperature scaling calibration mechanism, optimizing the confidence output through a validation set, thereby improving reliability. The confidence calibration mechanism makes the model output more consistent with the actual diagnostic reliability requirements, avoiding overconfident predictions that could mislead clinical decisions. The dynamic diagnostic threshold adjustment function ensures that the diagnostic system can adapt to the data characteristics of different medical institutions, maintaining high sensitivity while controlling the false positive rate, providing a reliable basis for clinical treatment planning.
[0071] like Figure 3 As shown, this application further proposes that the specific steps for generating a heterogeneous probability heatmap after fusion according to preset weights include:
[0072] Divide the digital image of the H&E stained whole section into 200×200 pixel windows;
[0073] For each 200×200 pixel window, the standard deviation of pixel intensity for the hematoxylin staining channel is calculated as the variance of nuclear depth staining density. ;
[0074] An improved U-Net network was used to process hematoxylin-stained single-channel images. Cell nuclei were segmented within each window, and the coordinates of all cell nucleus center points were obtained and subjected to a two-dimensional Fourier transform. The spectral energy integral of the 0.1–0.3 Hz frequency band was calculated as the degree of cell polarity disorder. ;
[0075] The improved U-Net network used in this embodiment is based on the standard U-Net architecture. The encoder contains four downsampling blocks, each consisting of two 3×3 convolutional layers (ReLU activation) and one 2×2 max pooling layer, with channel numbers of 64, 128, 256, and 512 respectively. The decoder contains four upsampling blocks with channel numbers of 512, 256, 128, and 64 respectively. In the third layer (256 channels) of the encoder, the serous membrane boundary feature map extracted by VGG16 is injected through channel concatenation. Model training uses 2000 single-channel hematoxylin image patches of 200×200 pixels, derived from pathological sections of 500 different patients, divided into training and validation sets in an 8:2 ratio. The optimizer uses Adam with an initial learning rate of 1e-4, decaying to 0.9 times the original rate every 20 epochs, for a total of 200 epochs, with a batch size of 32. To prevent overfitting, data augmentation was performed using random rotation (±90°), horizontal / vertical flipping, and brightness adjustment (±20%).
[0076] According to the formula The initial heterogeneity index is generated through fusion; where, and Before calculation, each element has been normalized to the [0,1] interval.
[0077] A Gaussian filter with σ=1.5 is applied to the initial heterogeneity index of the whole image to generate a heterogeneity probability heatmap.
[0078] The weighting coefficients 0.6 and 0.4 in the heterogeneity index calculation formula were determined through grid search optimization. On 300 labeled samples (including regions with various degrees of heterogeneity), the goal was to maximize the overlap rate between candidate regions located by heatmaps and manually labeled risk regions. Various methods were then employed. The weights range from 0.1 to 0.9 (in increments of 0.1). The weights range from 0.9 to 0.1. Experimental results show that when... The weight is 0.6. When the weight is 0.4, the average Dice coefficient between the candidate region and the labeled region reaches the highest value of 0.83, which is better than other weight combinations (average 0.72-0.79). The selection of the 0.1-0.3Hz frequency band in the Fourier transform is based on the fact that this frequency band corresponds to a scale range of 3-10 cell nucleus diameters (approximately 40-130μm) in the spatial distribution period of cell nuclei, which precisely covers the typical spatial arrangement frequency of cell nests. Below 0.1Hz, it reflects global distribution noise, and above 0.3Hz, it reflects random fluctuations at the single-cell scale. The Gaussian filter with σ=1.5 (standard deviation 1.5 pixels) has been experimentally verified to effectively suppress local noise while maintaining the spatial resolution of the heatmap.
[0079] In generating the heterogeneity probability heatmap, the whole-slice image is first divided into multiple 200×200 pixel analysis units. For each unit, the pixel intensity data of the hematoxylin staining channel is extracted separately, and the local variation of the nuclear deep staining density is quantified by calculating the standard deviation. Simultaneously, an improved U-Net network is used to segment the single-channel image within the same window, and the coordinates of the center point of the segmented nuclei are extracted. The planar distribution of the nuclei is converted into a frequency domain signal by a two-dimensional Fourier transform, and the spectral energy in the 0.1-0.3Hz frequency band is integrated to calculate the energy value in this band, which can effectively reflect the degree of disorder in cell polarity arrangement. The nuclear deep staining density variance and the degree of cell polarity disorder are fused according to a preset formula to generate an initial heterogeneity index, and then Gaussian filtering is used to eliminate local noise and generate a spatially continuous probabilistic heatmap.
[0080] Through the above technical solutions, this application can automatically generate probabilistic heatmaps reflecting tissue heterogeneity. By quantifying the spatial distribution characteristics of cell nuclear staining density and arrangement disorder, it provides a reliable basis for subsequent risk area screening. A two-dimensional quantitative index is constructed using pixel intensity standard deviation and frequency domain energy integral, which can objectively characterize the degree of cell nuclear staining density and arrangement disorder. Using Gaussian filtering to process the heterogeneity index effectively suppresses the influence of local noise on heatmap generation, improving the spatial consistency of the heatmap compared to methods that directly use raw statistical values. This method solves the problem of inconsistent subjective judgment scales in traditional visual inspection, reduces the risk of misjudgment due to staining differences or local noise, and improves the objectivity and repeatability of identifying peritoneal metastatic lesions in gastric cancer.
[0081] This application further proposes to segment the cell nucleus within each window, obtain the coordinates of the center points of all cell nuclei, perform a two-dimensional Fourier transform, and calculate the spectral energy integral of the 0.1-0.3 Hz frequency band as the degree of cell polarity disorder. In this process, cell nucleus segmentation is achieved using an improved U-Net network, specifically including:
[0082] The input is a single-channel image of hematoxylin in a 200×200 pixel window;
[0083] Serous membrane boundary feature maps are injected into the third layer of the encoder. These serous membrane boundary feature maps are extracted from the gastric wall layered structure annotation data by a pre-trained VGG16 network.
[0084] Using the weighted cross-entropy loss function: Where y is the true label; p is the predicted probability; ω is the position-sensitive weight matrix, with ω=3 for pixels at the cell nucleus edge and ω=1 for pixels inside the cell.
[0085] The segmented cell nuclei are processed by morphological opening operations, using a 3×3 square structuring element, and iterated twice to remove noise regions with a connected region area smaller than 50×50 pixels.
[0086] Specifically, after inputting a 200×200 pixel hematoxylin single-channel image, the third layer of the encoder incorporates serous membrane boundary information through feature fusion, enabling the network to simultaneously perceive the relationship between the nucleus position and anatomical structures during segmentation. The weighted cross-entropy loss function assigns higher weights to pixels at the nucleus edges, forcing the model to more accurately identify the morphological features of the nuclear membrane boundary. After two opening operations, the segmentation results effectively filter out small noise areas caused by staining artifacts or tissue folding, preserving clinically significant nucleus structures.
[0087] Through the above technical solutions, this application can improve the accuracy of cell nucleus segmentation in the serous membrane region, reduce the risk of false positives caused by misjudgment due to tissue atypia, and provide reliable basic data for subsequent calculation of metastatic lesion probability. By fusing pre-trained serous membrane feature maps, the segmentation network acquires spatial location awareness; the weighted loss function enhances edge detection, solving the segmentation discontinuity problem of blurred nuclear membrane boundaries in traditional methods; the morphological post-processing step effectively eliminates noise interference and avoids misjudging staining defects as cell nuclei. The anatomical feature fusion mechanism makes the cell nucleus distribution pattern output by the model more consistent with the real pathological pattern, the weighted loss function effectively improves the edge segmentation quality, and the morphological processing step ensures that subsequent feature extraction is not affected by noise.
[0088] This application further proposes that, based on the spatial topological relationship between the coordinates of each candidate region and the boundary coordinates of the serous film layer, the specific steps for generating risk regions include:
[0089] A ring-shaped buffer region with a radius of 500 μm is constructed based on the pre-labeled coordinates of the blood vessel or lymphatic vessel centerline.
[0090] The R-tree spatial indexing algorithm is used to calculate the spatial topological relationship between the candidate region coordinates and the annular buffer region. Each region coordinate point that is ultimately retained simultaneously meets the following condition and is designated as a risk region:
[0091] (1) The Euclidean distance from the boundary of the slurry film layer is less than 3 mm;
[0092] (2) Located outside the 500μm range of all blood vessels and lymphatic vessels marked.
[0093] Specifically, during pathological section analysis, a ring-shaped buffer zone is first constructed based on the anatomical distribution characteristics of blood vessels and lymphatic vessels. Spatial indexing technology is then used to quickly calculate the relative positions of candidate regions and the buffer zone. An R-tree algorithm is used to establish a spatial index of candidate region coordinates, and batch inclusion relationship queries are performed. The coordinates of the vessel centerline are extracted using a morphological thinning algorithm, and a 500μm buffer zone is constructed with the center point as the center to exclude interfering regions located within 500μm of the periphery of blood vessels or lymphatic vessels. Simultaneously, an Euclidean distance threshold is used to retain only candidate regions within 3mm of the serosal layer boundary. This dual-screening mechanism effectively filters abnormal signals caused by inflammatory reactions or staining artifacts through spatial topological constraints, focusing on truly clinically significant peritoneal metastasis risk areas.
[0094] Through the above technical solutions, this application can accurately distinguish between real metastatic lesions and interference signals around blood vessels and lymphatic vessels, reducing the risk of false positives caused by spatial location misjudgment. Simultaneously, by quantifying distance thresholds, it ensures complete coverage of high-risk areas, avoiding missed detection of micrometastases and improving the reliability of pathological diagnosis. By introducing a circular buffer region and an R-tree spatial index, an automated screening system based on anatomical constraints is constructed. This not only improves computational efficiency but also enhances the scientific rigor of region screening through spatial topological relationship verification, avoiding misscreening caused by experience differences in manual judgment.
[0095] This application further proposes that each area coordinate point ultimately retained will simultaneously meet the following conditions to be designated as a risk area and the following operations will be performed:
[0096] If the final retained coordinates of each region are within the range of 300-500 μm from the centerline of any blood vessel or lymphatic vessel, then at a confidence level... A penalty factor λ=0.8 is introduced into the calculation for weighting.
[0097] When the candidate region is within the 300-500 μm range of the vascular system, the system automatically detects the spatial distance between the region and the vascular centerline. If the distance value falls within this range, a fixed penalty factor is introduced when calculating the confidence score, for example, multiplying the original confidence score by a weighting coefficient of 0.8. =λ× ,in The confidence score is calculated after penalty. This mechanism is based on anatomical knowledge, considering that tissue areas within this distance are susceptible to inflammation or angiogenesis, potentially producing characteristics similar to actual metastatic lesions. By reducing the confidence score for such areas, the model's over-response to interfering features can be effectively suppressed.
[0098] For example, if there are 119 original candidate region coordinates, the following is a statistical table of the screening conditions and results for the risk regions after screening:
[0099] Table 1. Screening criteria and results for risk areas after screening.
[0100] Filtering criteria Specific requirements Execution result Additional processing Film layer distance constraint Euclidean distance from the boundary of the slurry film layer <3mm 87 coordinate points were retained (out of a total of 119 candidate regions). Only areas where peritoneal metastasis is anatomically possible are preserved (consistent with the metastasis patterns of gastric cancer). Blood vessel / lymphatic vessel distance constraint Located outside the 500μm range of blood vessels / lymphatic vessels 32 interference points were eliminated (out of a total of 119 candidate regions). Excluding areas with perivascular / lymphatic inflammation or staining artifacts. Preserve coordinates Candidate regions that simultaneously satisfy both of the above constraints Ultimately, 55 coordinate points were retained. Twelve of these points, located 300-500 μm from the center line of the blood vessels, were penalized with a factor λ = 0.8 in the confidence score calculation (to reduce the confidence score).
[0101] Through the above technical solution, this application effectively reduces the probability of misdiagnosis of perivascular tissue in the serosal layer junction area, and improves the model's ability to distinguish between early micrometastases and inflammatory response areas. By introducing anatomical constraints and embedding a spatial relationship judgment mechanism in the confidence calculation, the model can distinguish the characteristic differences between true metastatic lesions and perivascular tissue lesions. While maintaining the original diagnostic sensitivity, this technical solution suppresses the risk of false positives through a confidence calibration mechanism, providing a more reliable quantitative basis for clinical decision-making.
[0102] This application further proposes that after processing the risk area to generate multi-scale image data, weighted fusion is performed. The multi-scale image data includes:
[0103] A panoramic image downsampled by 20x was generated using bicubic interpolation downsampling.
[0104] A partial image at 40 times the original resolution was cropped to a 500×500 pixel area based on the coordinates of the center point of the screened risk area.
[0105] A 60x super-resolution enhanced image was generated, and the 40x original resolution local image was reconstructed using the ESRGAN network. Simultaneously, cell nuclei were detected in the reconstructed image, and the major axis (L) and minor axis (W) of each cell nucleus were obtained. The nuclear morphology irregularity index was then calculated. and its standard deviation ;
[0106] Standard deviation determined based on a preliminary experiment using 500 super-resolution image patches. The threshold is ,when At that time, a local map with 40 times the original resolution was used instead of a map with 60 times the super-resolution enhancement.
[0107] The ESRGAN network was used to reconstruct a 40x local map (500×500 pixels) into a 60x super-resolution augmented map (750×750 pixels). The generator employed a stacked structure of 23 residual dense blocks (RRDBs), and the discriminator used a VGG-style binary classification network. The loss function consisted of three parts: L1 pixel loss (weight 0.4), perceptual loss based on the output of VGG19 layer 5 (weight 0.4), and adversarial loss (weight 0.2). The network was first pre-trained for 100 epochs on the Div2K public dataset, followed by 50 epochs of fine-tuning using 1000 gastric wall pathology images from the field. The optimizer used in the fine-tuning stage was Adam, with an initial learning rate of 1e-4 and a batch size of 16. The standard deviation threshold of the nuclear morphology irregularity index of super-resolution images was determined to be 0.15 based on a preliminary experiment of 500 super-resolution image blocks. When σ_κ>0.15, the confusion rate between the nuclear morphology distortion introduced by super-resolution and the real pathological changes increased significantly, so it was necessary to switch back to the original image at 40x magnification.
[0108] Multi-scale image processing is shown in Table 2 below:
[0109] Table 2 Multiscale Image Processing Table
[0110] Image type Generation method Key parameters / technical details Verification and Adjustment Conditions 20x panoramic view Bicubic interpolation downsampling FOV = 2.3 × 2.3 mm - 40x local view Crop 500×500 pixels from the center point of the risk area. Resolution 0.46μm - 60x Super-Resolution Image ESRGAN network reconstruction Loss weights: L1(0.4) + VGG19(0.4) + adversarial(0.2) When the standard deviation of the nuclear morphology irregularity index When the value is greater than 0.15, switch to the original image at 40x magnification.
[0111] The 60x super-resolution augmented image is reconstructed from the 40x local image using the ESRGAN network. The loss function of the generator consists of pixel-level L1 loss, feature-aware loss based on the output of the 5th layer of the VGG19 network, and adversarial loss, with weight coefficients of 0.4, 0.4, and 0.2, respectively. At the same time, a verification process based on cell nucleus morphology is performed on the reconstructed 60x image. When the standard deviation of the cell nucleus morphology irregularity index in the detection window exceeds 0.15, the super-resolution augmented image of that region is discarded and the original 40x image is switched back.
[0112] Specifically, a pre-trained HoVer-Net segmentation model is used to detect cell nuclei, and the major axis L and minor axis W are calculated using the minimum bounding rectangle. During the risk region analysis phase, image data at three scales are generated simultaneously: panoramic images provide spatial distribution information at the tissue level, local images preserve morphological details at the cell level, and super-resolution images enhance the resolution of subcellular structures. After generating super-resolution images using the ESRGAN network, cell nucleus morphology detection is performed simultaneously. When the nuclear morphology irregularity index dispersion exceeds a preset threshold, it is determined that the super-resolution process may have introduced noise interference, and the original resolution image is switched back to ensure feature reliability. The feature data at the three scales are weighted and fused to form a comprehensive feature representation that considers both global and local, macroscopic and microscopic aspects, effectively improving the model's ability to identify early micrometastases.
[0113] Through the above technical solutions, this application effectively solves the problem of artifact interference that may be introduced into medical image processing by super-resolution reconstruction, ensuring the reliability of cell morphology features while improving image resolution. By employing multi-scale collaborative analysis and a dynamic data switching mechanism, it enhances detail visualization using super-resolution technology and avoids artifact risks through nuclear morphological heterogeneity detection, thereby improving the robustness of feature extraction. Furthermore, the multi-scale feature fusion mechanism enhances the ability to identify atypical cell clusters in early micrometastases, reduces the risk of misjudgment due to image quality fluctuations, and provides a more stable basis for clinical diagnosis.
[0114] This application further proposes that, after processing the risk area to generate multi-scale image data, weighted fusion is performed to generate a fused feature vector. The specific steps are as follows:
[0115] Features of the 20x downsampled panoramic image were extracted using a ResNet34 network, and a 512-dimensional feature vector was obtained after global average pooling. Then perform a 2×2 grid max pooling dimensionality reduction operation;
[0116] Features of the local map at 40 times the original resolution were extracted using the EfficientNet-B0 network, and a 1280-dimensional feature vector was obtained after global average pooling. Preserve morphological information at the cellular level;
[0117] Features of the 60x super-resolution enhanced map were extracted using the MobileNetV3-Large network, and a 960-dimensional feature vector was obtained after global average pooling. Bilinear interpolation upsampling makes the spatial size consistent with... , Alignment;
[0118] Will , Compressed to 256 dimensions using independent linear projection layers, respectively, we obtain , ;
[0119] Will , After subpixel-level alignment using a Spatial Transformation Network (STN), the vectors are concatenated along the channel dimension to generate a 768-dimensional fused feature vector. The formula for the affine transformation matrix parameters of the spatial transformation network is as follows:
[0120] ;
[0121] Where (x,y) are the input feature point coordinates, and (x',y') are the transformed coordinates.
[0122] The spatial transformation network parameters are optimized end-to-end through a differentiable sampling mechanism. The loss function includes feature alignment error and regularization term. Specifically, the 20x downsampled panoramic image retains the global distribution information of the tissue structure after the feature map extracted by ResNet34 is reduced by max pooling. The 60x super-resolution enhanced image restores the cell nuclear texture details at high magnification after the feature extracted by MobileNetV3 is upsampled by bilinear interpolation. The spatial transformation network performs geometric correction on the two types of feature maps based on affine transformation parameters and splices them along the channel dimension to generate a fused feature vector, so that macroscopic tissue abnormalities and microscopic cellular heterogeneity features can be complementaryly enhanced in a unified spatial coordinate system.
[0123] Through the above technical solution, this application resolves the contradiction between the efficiency of whole-slice scanning and the accuracy of lesion identification. It enhances the model's detection capability for small atypical cell clusters through multi-scale feature fusion, while utilizing a spatial transformation network to eliminate the risk of misjudgment caused by feature misalignment, providing clinicians with fused feature vectors with higher spatial consistency, thereby improving the reliability of gastric cancer peritoneal metastasis diagnosis. By employing a multi-scale image fusion and spatial alignment mechanism, while preserving the anatomical constraints of the serosal layer, it effectively integrates pathological features at different magnifications, improving the sensitivity of early micrometastases.
[0124] This application further proposes to input the fused feature vector into a pre-defined classification model to generate the probability value and confidence level of metastatic lesions. The specific steps include:
[0125] A hybrid training dataset was constructed, comprising both real pathological slide samples and synthetic samples. Spatial distribution patterns of cell nests were extracted from real metastatic lesion cases. The StyleGAN2 network was used to generate pseudo-lesion images with structures conforming to pathological characteristics within the serosal layer mask coverage area to generate synthetic samples. The StyleGAN2 network was then used to generate synthetic pathological images to expand the training dataset. The network adopted the standard StyleGAN2 architecture, with 8 layers in the mapping network and 18 layers in the synthesis network. The training data consisted of cell nest image patches (256×256 pixels) extracted from 500 real metastatic lesion cases, categorized by cell type into poorly differentiated adenocarcinoma and signet ring cell carcinoma.
[0126] During training, the latent vector z of poorly differentiated adenocarcinoma was uniformly and randomly sampled from the interval [0.2, 0.5], and the z of signet ring cell carcinoma was uniformly and randomly sampled from the interval [-0.3, 0.1]. This interval range was determined by analyzing the latent spatial distribution of 200 real samples. The model was trained for 200 epochs with a batch size of 32 and a learning rate of 0.002. The generated synthetic images were constrained by the coverage area of the serosal layer mask to ensure that the lesion location conformed to the anatomical distribution. Finally, 1000 synthetic samples were generated and mixed with 3000 real samples at a 3:1 ratio to form the training dataset.
[0127] For poorly differentiated adenocarcinoma, the StyleGAN2 latent vector z∈[0.2,0.5]; for signet ring cell carcinoma, z∈[-0.3,0.1]. A joint loss function is used to train the pre-defined classification model. The joint loss function is: ;
[0128] in The binary cross-entropy loss is used to calculate the deviation between the predicted probability and the standard label. The Hausdorff distance loss quantifies the spatial deviation between the predicted region and the serosal boundary of the pre-stored gastric wall layer structure. This distance value was normalized to a baseline of 200 μm before calculation. The coefficient 0.3 was determined through grid search to balance the dimensional differences between the binary cross-entropy loss and the Hausdorff distance loss. The Hausdorff distance is in micrometers, and the distance value was normalized by dividing by 200 μm before training.
[0129] The predicted region is the connected region where the probability of metastatic foci output by the Sigmoid function is greater than 0.5;
[0130] The pre-defined classification model parameters were trained using a mixed training dataset and a joint loss function. The optimizer used was AdamW, with an initial learning rate of 5e-5, weight decay of 1e-4, a batch size of 64, and a total of 100 training epochs. The data was divided into a training set (3200 examples) and a validation set (800 examples) in an 8:2 ratio. To prevent overfitting, a dropout rate of 0.5 was introduced after the fully connected layers, and an early stopping strategy was adopted (termination occurred when the validation loss did not decrease for 10 consecutive epochs). The learning rate was decayed using cosine annealing (minimum learning rate 1e-6), and the model parameters with the minimum validation loss were saved for the inference phase.
[0131] During the inference phase, the input fused feature vector is used to output the probability value and confidence level of metastatic foci. .
[0132] The formula for calculating the Hausdorff distance loss is as follows:
[0133] ;
[0134] Where x is the set of boundary points of the predicted region, y is the labeled boundary of the serous film layer, and d(x,y) is the Euclidean distance.
[0135] Specifically, during the model training phase, the spatial distribution features of cell nests are first extracted from real metastatic cases as generation conditions. The StyleGAN2 network is then used to generate synthetic images with pathological plausibility under the anatomical constraints of the serosal layer. Real and synthetic samples from the mixed dataset are input into the training process at a 3:1 ratio, and a joint loss function is used to simultaneously optimize classification accuracy and spatial consistency. Binary cross-entropy loss drives the model to correctly distinguish between lesions and non-lesion regions, while Hausdorff distance loss forces the predicted metastatic lesion regions to maintain an anatomically reasonable distance from the serosal layer boundary. In the inference phase, the fused feature vector is processed by the Sigmoid function, outputting both probability values representing metastatic risk and a spatially constrained and optimized confidence index.
[0136] The spatial distribution pattern of cell nests in real metastatic lesions was extracted. A StyleGAN2 network was used to generate pseudo-lesion images with structurally consistent pathological characteristics within the serosal layer mask coverage area to create synthetic samples. A pre-defined classification model was trained using a joint loss function, which is: ,in The binary cross-entropy loss is used to calculate the deviation between the predicted probability and the standard label. The Hausdorff distance loss is used to quantify the spatial deviation between the predicted region and the serosa layer boundary of the pre-stored gastric wall layered structure; the predicted region is a connected region with a metastatic lesion probability value greater than 0.5 output by the Sigmoid function.
[0137] The pre-defined classification model parameters are trained using a mixed training dataset and a joint loss function; during the inference phase, the input fused feature vector outputs the probability value of metastatic foci and the confidence level.
[0138] Through the above technical solution, this application solves the problem of inflated confidence in low-quality pathological sections by deep neural networks. By combining synthetic data augmentation and spatial constraint optimization, the confidence index output by the model is made to better fit the clinical anatomical characteristics, reducing the risk of missed diagnosis in high-risk cases due to over-reliance on the original probability value, and improving the stability of early micrometastases identification.
[0139] This application further proposes that when the probability value of metastatic lesions is greater than the dynamic diagnostic threshold... At that time, a diagnostic report is generated, with a confidence level of [missing information]. Establish dynamic diagnostic thresholds The negative correlation mapping relationship satisfies:
[0140] ;
[0141] ;
[0142] in, Adjust parameters for dynamic diagnostic thresholds;
[0143] benchmark threshold ;
[0144] To adjust the coefficient, The value range is limited to [0.05, 0.15];
[0145] The coefficients are dynamically optimized and adjusted based on historical diagnostic data. Value, in the initial stage of system deployment, The default value is 0.1, and the initial tuning parameters are set using transfer learning.
[0146] If the false positive rate of 100 consecutive cases is greater than 5%, then The value decreased by 0.02;
[0147] If the false negative rate is greater than 3%, then The value increased by 0.02;
[0148] During system initialization, The default value is 0.1, which is dynamically updated as the number of cases accumulates.
[0149] Dynamic diagnostic threshold This refers to an automatically adjusted judgment threshold based on the confidence level. By establishing a negative correlation between confidence and the diagnostic threshold, lower confidence predictions correspond to more lenient diagnostic criteria (lowering the threshold), thus reducing the risk of missed diagnoses of potentially positive cases. Simultaneously, temperature scaling calibration suppresses overconfident predictions of high-confidence erroneous samples. Adjustment coefficient This refers to the control parameter used to balance the false positive and false negative rates. The coefficient value is dynamically adjusted by monitoring the misjudgment rate of historical diagnostic results, thereby maintaining the stability of the diagnostic system. (Baseline threshold) This refers to the initial diagnostic criteria, which can specifically adopt empirical values determined by expert consensus, such as 0.7 or 0.75, as the initial reference point for diagnostic decisions. In this embodiment, the benchmark threshold... .
[0150] In the context of auxiliary diagnosis of peritoneal metastasis in gastric cancer, the clinical cost of false negatives (missed diagnoses) far outweighs that of false positives (overreporting). Missing a patient with genuine peritoneal metastasis may cause them to miss the window of optimal adjuvant chemotherapy or hyperthermic intraperitoneal chemotherapy (HIPEC), significantly worsening their prognosis. Therefore, dynamic diagnostic thresholds are crucial. The design is essentially a "safety net" for clinical risk control: when the model's prediction is uncertain, it is better to "falsely report" to trigger manual review than to easily give a negative conclusion and cause a missed diagnosis.
[0151] Specifically, during the diagnostic report generation stage, when the model has little confidence in the prediction results (i.e. (Lower threshold) By appropriately raising the diagnostic threshold, more uncertain samples can be marked as positive, and subsequent manual review processes can be forcibly triggered, thereby minimizing the risk of missed diagnosis of high-risk cases of gastric cancer peritoneal metastasis.
[0152] The optimization process of the adjustment coefficient employs a closed-loop control strategy, continuously monitoring the false positive and false negative rates in actual clinical diagnostic results and adjusting the coefficient accordingly. For example, when the system detects 100 consecutive false positive cases, it automatically reduces the adjustment coefficient by 0.02 to raise the diagnostic criteria; conversely, when the false negative rate exceeds the standard, the coefficient value is increased to relax the judgment conditions. This mechanism ensures that the diagnostic criteria do not deviate from the clinical safety boundary by limiting the effective range of the adjustment coefficient.
[0153] In some specific implementations, the benchmark threshold The coefficient can be set to 0.7, with an initial adjustment factor of 0.1. When the false positive rate exceeds 5% after system deployment, the coefficient decreases by 0.02 increments until it reaches the lower limit of 0.05. Conversely, if the false negative rate exceeds 3%, the coefficient gradually increases to the upper limit of 0.15. This dynamic adjustment mechanism is achieved through real-time data interaction between the electronic medical record system and the pathology database, ensuring that diagnostic criteria are updated synchronously with actual clinical needs.
[0154] This solution establishes a negative correlation between confidence level and threshold, automatically implementing stricter diagnostic criteria when the model's prediction certainty is high, and adopting a conservative strategy when prediction uncertainty exists. Simultaneously, a coefficient optimization mechanism based on historical data is introduced, effectively addressing the false positive / false negative problem caused by model overconfidence in traditional methods. Through these technical solutions, this application achieves adaptive matching between diagnostic criteria and model prediction reliability, optimizing the balance between diagnostic sensitivity and specificity while ensuring clinical safety. This mechanism effectively reduces the risk of misjudgment caused by low-quality samples such as unevenly stained sections, and by continuously learning from historical diagnostic data, the system's decision criteria gradually approach actual clinical needs, improving the clinical applicability of the auxiliary diagnostic system.
[0155] The following is a specific example of a deep learning-assisted diagnostic method for peritoneal metastases of gastric cancer:
[0156] Taking a gastric antrum tissue specimen as an example, after standard H&E staining to prepare 4μm thick sections, a whole-section digital image was generated using a Hamamatsu NanoZoomer S360 digital pathology scanner (40x optical magnification). The whole section was divided into 200×200 pixel (46×46μm) analysis units, and the standard deviation of the pixel intensity of the hematoxylin staining channel in each unit was calculated as the variance of the nuclear deep staining density. =42.7±3.2); The coordinates of the cell nucleus center point were detected by an improved U-Net network (segmentation Dice=0.91), and a two-dimensional Fourier transform was performed on these coordinates. The spectral energy integral of the 0.1-0.3 Hz frequency band was calculated as the cell polarity disorder degree. =0.38±0.05); according to the formula The initial heterogeneity index is generated by fusion, and then processed by Gaussian filtering with σ=1.5 to generate a heterogeneity probability heatmap.
[0157] The next step is risk area screening: pre-stored boundary coordinates of the serosal layer of the gastric wall layer structure (manually annotated with an accuracy of ±5μm) are loaded, and regions with a preset high quantile of 10% (threshold H>0.67) of the heterogeneity probability heatmap value are extracted as candidate regions; the R-tree spatial indexing algorithm is used to calculate spatial topological relationships, and coordinate points with an Euclidean distance of less than 3mm from the boundary of the serosal layer are selected (87 points are retained), while interfering points located in the 500μm buffer zone of blood vessels / lymphatic vessels are excluded (32 points are excluded); for 12 candidate points 300-500μm away from the vascular system, a penalty factor λ=0.8 is introduced for weighting in the subsequent confidence calculation.
[0158] In the multi-scale image processing stage, the system generates image data at three scales: a 20x panoramic image (FOV=2.3×2.3mm) is generated through bicubic interpolation downsampling; a 40x local image (resolution 0.46μm) of 500×500 pixels is cropped based on the center point of the risk region; and an ESRGAN network (loss weights L1=0.4, VGG19=0.4, adversarial=0.2) is used to reconstruct the 40x local image to generate a 60x super-resolution enhanced image. Simultaneously, the long axis (L=8.2±0.7μm) and short axis (W=5.3±0.4μm) of cell nuclei in the 60x super-resolution enhanced image are detected, and the nuclear morphology irregularity index is calculated. and its standard deviation ,when >0.15 (in this case) When the value is 0.19, switch 3 regions to the original image at 40 times the size to ensure feature reliability.
[0159] In the multimodal feature fusion stage, ResNet34 is used to extract the depth feature vector of the 20x panoramic image. The heterogeneity value H is concatenated with the anatomical label S and then passed through a fully connected layer to generate an auxiliary feature vector. Calculate the cross-modal attention correlation matrix Finally, the joint feature F is generated.
[0160] During the dynamic decision-making and calibration phase, the original logit value for this case was 1.86, and the probability of metastatic lesions was calculated using the Sigmoid function. The temperature parameter T=0.93 was optimized using a validation set of 500 samples (including samples with ≥10% uneven staining). The confidence level after calibration was... Dynamic diagnostic threshold ; .
[0161] Decision: P=0.87 > Threshold=0.524, preliminary judgment is positive. Conditions for mandatory verification to be checked: =0.76≥0.6, no mandatory review is triggered, nor is the low confidence additional flag triggered. (≥0.6), the system will automatically generate a positive diagnostic report.
[0162] Critical scenario description: If this case (Very low confidence) Then, regardless of the P-value, the system will force a manual review process and will not automatically generate a report; if , Assuming If so, a positive report with a low confidence level and a recommendation for review will be generated.
[0163] Technical efficacy verification showed that the 3mm high-risk area monitoring mechanism in the serosal layer increased the detection rate of micrometastases (<0.5mm) to 85.3%. Simultaneously, Hausdorff distance analysis (>200μm was classified as an independent metastasis) enabled accurate differentiation between pT4a (serosa invasion) and P1 (peritoneal metastasis) stages. The vascular avoidance mechanism reduced the false positive rate by 38.7% compared to traditional U-Net segmentation. In multi-scale collaborative analysis, 20x panoramic (contribution weight 0.51) identified interstitial infiltration patterns, and 40x local (0.33) analysis... Micrometastases (<5 cells) were detected, and 60x super-resolution (0.16) was used to resolve mitotic details. The multi-scale fusion AUC reached 0.94 (the highest single-scale AUC was 0.87). Temperature calibration reduced the number of high-false-confidence samples (P>0.9) from 18.2% to 4.7%, and dynamic diagnostic threshold adjustment balanced sensitivity and specificity. Based on the historical database (n=1200 cases), the probability of serosal invasion depth >2mm in this patient was predicted to be 0.73 (high-risk threshold >0.65), and the system generated recommendations for combined postoperative adjuvant chemotherapy.
[0164] In summary, this system quantifies heterogeneity by measuring nuclear deep staining density variance and cell polarity disorder, combines serous membrane distance constraints and vascular avoidance mechanisms to screen risk areas, employs dynamic switching of multi-scale images to ensure feature reliability, and outputs reliable diagnoses through temperature scaling calibration and dynamic diagnostic threshold adjustment. While maintaining sensitivity, it controls the false positive rate to 4.7%, and improves the detection rate of micrometastases (<0.5mm) to 85.3%, providing clinicians with a risk warning window 2-3 weeks earlier than routine pathological examinations.
[0165] Example 2:
[0166] like Figure 4 and Figure 5 As shown, a deep learning-assisted diagnostic system for peritoneal metastases of gastric cancer using pathological sections includes the following:
[0167] Acquisition and processing module: used to receive raw pathological slide images, process them into H&E stained whole slide digital images, and generate heterogeneity probability heatmaps after fusion according to preset weights;
[0168] Structural analysis module: used to load the boundary coordinates of the serosal layer of the pre-stored gastric wall layered structure, and extract the coordinates of the heatmap values of the heterogeneity probability heatmap at the preset high quantile as candidate region coordinates;
[0169] Coordinate filtering module: used to filter by distance and range based on the spatial topological relationship between the coordinates of each candidate region and the boundary coordinates of the slurry layer, and generate risk areas;
[0170] Multi-scale processing module: This module processes risk areas to generate multi-scale image data, then performs weighted fusion to produce a fused feature vector. This fused feature vector is then input into a pre-defined classification model to generate the probability and confidence scores of metastatic lesions. ;
[0171] Temperature calibration module, used for confidence level Temperature scaling calibration is implemented, and the temperature parameters are solved using the negative log-likelihood loss function. ; Confidence level after calibration according to Calculate; where l The logical value of the sample to be predicted is generated by fusing feature vectors. For the Sigmoid function;
[0172] Classification decision module: When the probability value of metastatic lesions is greater than the dynamic diagnostic threshold At that time, a diagnostic report is generated.
[0173] Among them, H&E stained whole-section digital images refer to scanned images of whole sections after standardized staining, which can be achieved by using a digital pathology scanner to perform full-field scanning of stained sections at 40x magnification. Heterogeneity probability heatmaps are probability distribution maps reflecting the variance and polarity disorder of cell nuclear deep staining density in tissue regions, which can be generated by calculating the standard deviation of pixel intensity of hematoxylin staining channels and fusing it with the energy integral of the two-dimensional Fourier transform spectrum of cell nuclei. Spatial topological relationship screening refers to a coordinate filtering mechanism based on geometric position constraints, which can be achieved by using the R-tree spatial indexing algorithm to calculate the distance relationship between candidate regions and serous membrane boundaries, and vascular / lymphatic vessel annotation areas. Temperature scaling calibration is a calibration method for model prediction confidence, which can be achieved by optimizing temperature parameters to adjust the distribution of the probability output of the Sigmoid function to match the distribution of real samples.
[0174] Specifically, the system uses an acquisition and processing module to convert raw pathological slides into standardized digital images, fusing nuclear deep staining and polarity disorder features to generate probability heatmaps. A structural analysis module, combined with pre-stored gastric wall anatomical data, filters out high-risk candidate regions with heatmap values in the top 10% quantile. A coordinate filtering module, based on the spatial constraints of the serosal layer boundary and blood vessels and lymphatic vessels, excludes regions anatomically inconsistent with metastasis patterns. A multi-scale processing module extracts and fuses panoramic, local, and super-resolution features from the filtered risk regions, achieving cross-scale feature alignment through a spatial transformation network. A temperature calibration module optimizes temperature parameters using validation set data, correcting the model's overconfident predictions of low-quality samples. A classification decision module generates a final diagnostic report based on a dynamically adjusted diagnostic threshold, which is negatively correlated with confidence level to balance the risks of false positives and false negatives.
[0175] Compared to existing technologies, traditional methods rely on physicians' subjective judgment of nuclear atypia characteristics, leading to inconsistent diagnostic criteria and missed detection of minute lesions. This system generates a heterogeneity probability heatmap by quantifying nuclear deep staining density and polarity disorder, and combines this with the anatomical constraints of the gastric wall's layered structure to screen for risk areas, effectively distinguishing between inflammatory responses and true metastatic lesions. Compared to existing systems that directly output raw confidence scores, this approach introduces a temperature scaling calibration mechanism to reduce the probability of misclassification for low-quality samples. The negative correlation mapping design of the dynamic diagnostic threshold adaptively adjusts diagnostic sensitivity, avoiding systematic bias caused by fixed thresholds.
[0176] Through the above technical solutions, this application solves the problem of misdiagnosis caused by inconsistent scales in judging nuclear atypia in manual diagnosis. It improves the identification accuracy of micrometastases through multi-scale feature fusion and anatomical constraint screening. The temperature calibration mechanism effectively suppresses the model's overconfident prediction of fuzzy features, reducing the risk of missing high-risk cases. The dynamic diagnostic threshold adjustment strategy balances diagnostic sensitivity and specificity, making the system output more aligned with clinical decision-making needs. Spatial topological relationship screening excludes areas where metastasis is anatomically impossible, reducing interference from non-pathological factors.
[0177] The technical scope of this invention is not limited to the content described above. Those skilled in the art can make various modifications and variations to the above embodiments without departing from the technical concept of this invention, and all such modifications and variations should fall within the protection scope of this invention.
Claims
1. A deep learning-assisted diagnostic method for peritoneal metastases of gastric cancer using pathological sections, characterized by: Includes the following steps: The system receives original pathological slide images, processes them into H&E stained whole slide digital images, and generates a heterogeneity probability heatmap after fusion according to preset weights. Load the pre-stored serosal layer boundary coordinates of the gastric wall layered structure, and extract the coordinates of the heatmap values of the heterogeneity probability heatmap at a preset high quantile as candidate region coordinates; Based on the spatial topological relationship between the coordinates of each candidate region and the boundary coordinates of the slurry film layer, distance and range are used for screening to generate risk areas; After processing the risk area to generate multi-scale image data, weighted fusion is performed to generate a fused feature vector. The fused feature vector is then input into a preset classification model to generate the probability value and confidence level of metastatic lesions. ; Regarding the confidence level Temperature scaling calibration is implemented, and the temperature parameters are solved using the negative log-likelihood loss function. ; Confidence level after calibration according to Calculate; where l The logical value of the sample to be predicted generated by the fused feature vector. For the Sigmoid function; When the probability value of metastatic lesions is greater than the dynamic diagnostic threshold At that time, a diagnostic report is generated.
2. The deep learning-assisted pathological section diagnosis method for gastric cancer peritoneal metastasis according to claim 1, characterized in that: The specific steps for generating a heterogeneous probability heatmap after fusion according to preset weights include: The digital image of the H&E stained whole section is divided into 200×200 pixel windows; For each 200×200 pixel window, the standard deviation of pixel intensity for the hematoxylin staining channel is calculated as the variance of the nuclear depth staining density. ; The hematoxylin-stained single-channel images were processed using an improved U-Net network; cell nuclei were segmented within each window, and the coordinates of all cell nucleus center points were obtained and subjected to a two-dimensional Fourier transform. The spectral energy integral was calculated as the degree of cell polarity disorder. ; According to the formula The initial heterogeneity index is generated through fusion; The heterogeneity probability heatmap is generated by applying a Gaussian filter with σ=1.5 to the initial heterogeneity index of the whole graph.
3. The deep learning-assisted pathological section diagnosis method for gastric cancer peritoneal metastasis according to claim 2, characterized in that: Cell nuclei are segmented within each window, and the coordinates of the center points of all cell nuclei are obtained. A two-dimensional Fourier transform is then performed, and the spectral energy integral is calculated as the degree of cell polarity disorder. In this process, the cell nucleus segmentation is implemented using an improved U-Net network, specifically including: The input is a single-channel image of hematoxylin in a 200×200 pixel window; In the third layer of the encoder, a serous membrane boundary feature map is injected. The serous membrane boundary feature map is extracted from the gastric wall layer structure annotation data by a pre-trained VGG16 network. Using the weighted cross-entropy loss function: Where y is the true label; p is the predicted probability; ω is the position-sensitive weight matrix, with ω=3 for pixels at the cell nucleus edge and ω=1 for pixels inside the cell. The segmented cell nuclei are processed by morphological opening operations to remove noise regions with connected regions smaller than 50×50 pixels.
4. The deep learning-assisted pathological section diagnosis method for gastric cancer peritoneal metastasis according to claim 3, characterized in that: The specific steps for generating risk areas include: filtering by distance and range based on the spatial topological relationship between the coordinates of each candidate region and the boundary coordinates of the serous film layer; A ring-shaped buffer region with a radius of 500 μm is constructed based on the pre-labeled coordinates of the blood vessel or lymphatic vessel centerline. The R-tree spatial indexing algorithm is used to calculate the spatial topological relationship between the candidate region coordinates and the annular buffer region. Each region coordinate point that is ultimately retained satisfies the following condition and is thus designated as a risk region: (1) The Euclidean distance from the boundary of the slurry film layer is less than 3 mm; (2) Located outside the 500μm range of all blood vessels and lymphatic vessels marked.
5. The deep learning-assisted pathological section diagnosis method for gastric cancer peritoneal metastasis according to claim 4, characterized in that: Each area coordinate point that is ultimately retained will be designated as a risk area and the following operations will be performed if it simultaneously meets the following conditions: If the distance between each of the ultimately retained region coordinate points and the centerline of any blood vessel or lymphatic vessel is within the range of 300-500 μm, then the confidence level is calculated. A penalty factor λ=0.8 is introduced for weighting.
6. The deep learning-assisted method for pathological section diagnosis of gastric cancer peritoneal metastasis according to claim 1, characterized in that: After processing the risk area to generate multi-scale image data, weighted fusion is performed. The multi-scale image data includes: A panoramic image downsampled by 20x was generated using bicubic interpolation downsampling. A partial image at 40 times the original resolution is cropped to a 500×500 pixel area based on the coordinates of the center point of the screened risk area. A 60x super-resolution enhanced image was generated, and the original 40x resolution local image was reconstructed using an ESRGAN network. Simultaneously, cell nuclei were detected in the reconstructed image, and the major axis (L) and minor axis (W) of each cell nucleus were obtained. The nuclear morphology irregularity index was then calculated. and its standard deviation ; when In this case, the 40x original resolution local image is used to replace the 60x super-resolution enhanced image.
7. The deep learning-assisted pathological section diagnosis method for gastric cancer peritoneal metastasis according to claim 6, characterized in that: After processing the risk region to generate multi-scale image data, weighted fusion is performed to generate a fused feature vector. The specific steps are as follows: The feature maps of the 20x downsampled panoramic image extracted by ResNet34 are subjected to 2×2 grid max pooling dimensionality reduction. Features of the 40x original resolution local map were extracted using the EfficientNet-B0 network; Bilinear interpolation upsampling is performed using features extracted from the 60x super-resolution enhanced map by MobileNetV3. A fused feature vector is generated by concatenating sub-pixel-level alignment along the channel dimension using a spatial transformation network; the affine transformation matrix parameters of the spatial transformation network are formulated as follows: Where (x,y) are the input feature point coordinates, and (x',y') are the transformed coordinates.
8. The deep learning-assisted pathological section diagnosis method for gastric cancer peritoneal metastasis according to claim 7, characterized in that: The fused feature vector is input into a preset classification model to generate the probability value and confidence level of metastatic lesions. The specific steps include: A hybrid training dataset is constructed, comprising real pathological slide samples and synthetic samples; the ratio of real pathological slide samples to synthetic samples is 3:
1. The spatial distribution pattern of cell nests in real metastatic lesions is extracted, and the synthetic sample is generated by using a StyleGAN2 network to produce pseudo-lesion images with structurally consistent characteristics within the serosal layer mask coverage area. The pre-defined classification model is trained using a joint loss function, where the joint loss function is... ,in The binary cross-entropy loss is used to calculate the deviation between the predicted probability and the standard label. The Hausdorff distance loss is used to quantify the spatial deviation between the predicted region and the serosal layer boundary of the pre-stored gastric wall layered structure; the predicted region is a connected region where the probability value of metastatic lesions output by the preset classification model is greater than 0.
5. The preset classification model parameters are trained using the hybrid training dataset and joint loss function; during the inference phase, the fused feature vector is input, and the probability value of the metastatic foci and the confidence level are output. .
9. The deep learning-assisted method for pathological section diagnosis of gastric cancer peritoneal metastasis according to claim 1, characterized in that: When the probability value of metastatic lesions is greater than the dynamic diagnostic threshold At that time, a diagnostic report is generated, and the confidence level is... Establish with the dynamic diagnostic threshold The negative correlation mapping relationship satisfies: ; ; in, Adjust parameters for dynamic diagnostic thresholds; benchmark threshold , For adjustment coefficients; The coefficients are dynamically optimized and adjusted based on historical diagnostic data. value: If the false positive rate of 100 consecutive cases is greater than 5%, then The value decreased by 0.02; If the false negative rate is greater than 3%, then The value increased by 0.02; The value range is limited to [0.05, 0.15].
10. A deep learning-assisted diagnostic system for peritoneal metastases of gastric cancer, characterized in that: The method for diagnosing peritoneal metastases of gastric cancer using deep learning-assisted pathological sections as described in any one of claims 1 to 9 includes: Acquisition and processing module: used to receive raw pathological slide images, process them into H&E stained whole slide digital images, and generate heterogeneity probability heatmaps after fusion according to preset weights; Structural analysis module: used to load the boundary coordinates of the serosal layer of the pre-stored gastric wall layered structure, and extract the coordinates of the heatmap values of the heterogeneity probability heatmap at a preset high quantile as candidate region coordinates; Coordinate filtering module: used to filter by distance and range based on the spatial topological relationship between the coordinates of each candidate region and the boundary coordinates of the slurry layer, and generate risk areas; Multi-scale processing module: This module processes the risk region to generate multi-scale image data, then performs weighted fusion to generate a fused feature vector. The fused feature vector is then input into a preset classification model to generate the probability value and confidence level of metastatic lesions. ; Temperature calibration module, used for the confidence level Temperature scaling calibration is implemented, and the temperature parameters are solved using the negative log-likelihood loss function. ; Confidence level after calibration according to Calculate; where l The logical value of the sample to be predicted generated by the fused feature vector. For the Sigmoid function; Classification decision module: When the probability value of the metastatic lesion is greater than the dynamic diagnostic threshold At that time, a diagnostic report is generated.