Grading method for gastric mucosal atrophy and intestinal metaplasia based on gastroscopy images

By constructing a biaxial multi-task grading model and generating salient regions, the instability and data quality issues in the determination of gastric mucosal atrophy and intestinal metaplasia were resolved, achieving more stable grading and executable region of interest prompts, thus improving the efficiency and accuracy of endoscopic diagnosis.

CN123120313APending Publication Date: 2026-11-17GUANGANMEN HOSPITAL CHINA ACAD OF CHINESE MEDICAL SCI +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611350629.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-02
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing technologies lack strong constraints on target sites in determining the degree of gastric mucosal atrophy and intestinal metaplasia, resulting in unstable graded outputs, difficulty in achieving dual-axis structured joint outputs, and the generated heatmaps lack actionable region of interest prompts. Insufficient screening of training data quality also affects the model's generalization ability.

Method used

By constructing a biaxial multi-task hierarchical model based on gastroscopy images, including a shared feature extraction module, a gastric mucosal atrophy and intestinal metaplasia branching module, and a bidirectional feature interaction module, combined with data quality screening and anatomical site identification, a salient region map is generated to assist endoscopists in selecting mucosal sampling locations.

Benefits of technology

It improves the stability and consistency of grading, reduces fluctuations caused by differences in non-target sites and acquisition conditions, enhances the model's generalization ability and clinical usability, provides actionable candidate areas of interest suggestions, and reduces the cost of repeated interpretation and communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123120313A_ABST
    Figure CN123120313A_ABST
Patent Text Reader

Abstract

This invention discloses a method for grading the degree of gastric mucosal atrophy and intestinal metaplasia based on gastroscopy images, comprising: S1, acquiring static gastroscopy images collected by a hospital endoscopy system as input image I; S2, performing preprocessing and data augmentation; S3, performing quality screening, dividing the data into training and validation sets at a ratio of 7:3; constructing a dual-axis, dual-task grading model; S4, identifying the gastric anatomical location of the input image I to be inferred, obtaining the target location image category P(I); when P(I) belongs to the target location set, proceeding to subsequent grading steps; when P(I) does not belong to the target location set, not proceeding to the grading process or outputting a "non-target location" prompt; S5, directly outputting the gastric mucosal atrophy level and intestinal metaplasia level; S6, generating a salient region map; S7, outputting the final result. This invention can reduce grading fluctuations caused by differences in non-target locations and acquisition conditions, improving grading stability, consistency, and clinical usability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of medical image processing and computer vision technology, and relates to a method for grading the degree of gastric mucosal atrophy and intestinal metaplasia based on gastroscopy images. Specifically, it relates to a method for grading the gastric mucosal state of hospital gastroscopy images, including image preprocessing, target anatomical site selection, multi-task grading, confidence calibration, and salient region generation. This method outputs gastric mucosal atrophy grading information and intestinal metaplasia grading information to assist endoscopists in assessment and suggests areas of interest to assist in the selection of mucosal sampling locations. Background Technology

[0002] Gastric mucosal atrophy is a chronic condition characterized by a decrease in the number or function of gastric mucosal epithelial cells, leading to reduced gastric acid secretion and decreased digestive function. Atrophic gastric mucosa may be accompanied by intestinal metaplasia or dysplasia, and is considered a precancerous lesion. Intestinal metaplasia (IM) refers to a pathological change in which normal cells of the gastric mucosa are replaced by cells similar to those of the intestinal mucosa (such as goblet cells, Paneth cells, and absorptive cells).

[0003] Current methods for determining the severity of gastric mucosal atrophy and intraepithelial neoplasia (IM) typically employ deep learning to automatically analyze gastroscopy images. A typical approach involves: acquiring gastroscopy images (or extracting frames from video), preprocessing them, inputting the images into a grading / classification model, and outputting mucosal state labels or grading results. Some approaches incorporate gastric anatomical location identification or keyframe filtering to reduce invalid input; others generate interpretable heatmaps (such as CAM / gradient attribution) to display regions of interest to the model. Overall, current technologies largely follow a core process of "input image—output label—heatmap display." However, these existing technologies still have the following drawbacks:

[0004] (1) Existing technologies do not form a strong constraint of “grading only images of target areas such as the gastric antrum”, which makes it easy for images of non-target areas to be mixed into the grading input, resulting in fluctuations in grading output and a decrease in stability and consistency.

[0005] (2) Existing technologies are difficult to perform biaxial structured joint output of atrophy level (A0–A3) and intestinal metaplasia level (IM0–IM3), and lack confidence calibration or uncertainty indication mechanism for adjacent levels, which can easily lead to confusing or overconfident output in adjacent level scenarios.

[0006] (3) Existing technologies generate heat maps that are mostly at the interpretation level and lack a process for structuring the heat map into candidate areas of interest and filtering and sorting them, making it difficult to form an actionable biopsy area of ​​interest prompt.

[0007] (4) Existing technologies lack effective quality screening strategies in the training data preparation stage. Low-quality image samples can easily interfere with the model's learning of key mucosal features, thereby reducing the model's generalization ability and output reliability.

[0008] Based on this, the present invention proposes a grading method for the degree of gastric mucosal atrophy and intestinal metaplasia based on gastroscopy images. Summary of the Invention

[0009] This invention aims to provide a grading method for the degree of gastric mucosal atrophy and intestinal metaplasia based on gastroscopy images. This addresses the challenges of existing technologies where the differences between adjacent grades of atrophy and intestinal metaplasia are subtle and easily affected by acquisition conditions such as lighting, distance, and viewing angle, making it difficult for simple classification networks to stably distinguish them. It also addresses the need to embed target site selection into the overall process, coordinating training data organization with inference strategies for handling non-target sites. Furthermore, it requires an engineered definition of the reliability of the grading results, clarifying confidence level calibration and uncertainty triggering conditions to ensure usable output. Finally, it necessitates further structuring the interpretable heatmap into displayable, filterable, and sortable candidate regions of interest to create actionable sampling prompts.

[0010] To achieve the above objectives, the present invention provides the following technical solution:

[0011] A method for grading the degree of gastric mucosal atrophy and intestinal metaplasia based on gastroscopy images includes the following steps:

[0012] S1, Image Acquisition

[0013] The static gastroscopy images acquired by the hospital's endoscopy system are used as input image I;

[0014] S2, Preprocessing and Data Augmentation

[0015] Preprocessing and data augmentation are performed on the input image I;

[0016] S3. Data quality screening to construct a dual-axis, multi-task hierarchical model.

[0017] The input image I is subjected to quality screening to remove low-quality images, and the input image I is divided into a training set and a validation set in a 7:3 ratio. A dual-axis multi-task hierarchical model is trained using the training set and the validation set. The dual-axis multi-task hierarchical model includes a shared feature extraction module, a gastric mucosal atrophy branch, an intestinal metaplasia branch, and a bidirectional feature interaction module set between the two branches. The bidirectional feature interaction module is used to perform bidirectional weighted fusion of the atrophy features extracted from the gastric mucosal atrophy branch and the intestinal metaplasia features extracted from the intestinal metaplasia branch.

[0018] S4. Selection of target anatomical sites during the reasoning stage

[0019] The anatomical location recognition module is used to identify the gastric anatomical location of the input image I to be reasoned, and the target location image category P(I) is obtained. The images to be graded are selected according to the preset target location set, wherein the target location set includes at least the gastric antrum. When P(I) belongs to the target location set, the subsequent grading steps are entered. When P(I) does not belong to the target location set, the grading process is not entered or a "non-target location" prompt is output.

[0020] S5, Dual-axis multi-tasking hierarchical output

[0021] The target region images belonging to the target region set are input into the trained biaxial multi-task hierarchical model, which outputs the gastric mucosal atrophy level and the intestinal metaplasia level, respectively:

[0022] The grade of gastric mucosal atrophy is A∈{A0,A1,A2,A3};

[0023] Intestinal metaplasia grade IM∈{IM0,IM1,IM2,IM3};

[0024] S6. Generation of salient regions and suggestion of candidate regions of interest

[0025] Based on the gastric mucosal atrophy grading result A and the intestinal metaplasia grading result IM output in step S5, a significant region map is generated to mark the suggested areas of interest in the display interface, so as to assist endoscopists in selecting mucosal sampling sites during the examination.

[0026] S7. Output Results

[0027] The results include at least the anatomical location identification result P(I), the gastric mucosal atrophy grading result A(A0~A3) and the intestinal metaplasia grading result IM(IM0~IM3), as well as the salient region information corresponding to the grading results.

[0028] Preferably, the grading method further includes structuring the salient region map to remove noise regions, thereby obtaining several candidate regions of interest, and outputting the Top-K candidate regions of interest and their ranking results. The candidate regions of interest are displayed on the original image in the form of borders or masks.

[0029] Preferably, the generation mechanism of the salient region map includes gradient attribution, attention weights, or class activation mapping; the candidate attention regions can be obtained through thresholding, connected component filtering, area threshold constraints, and morphological processing.

[0030] Preferably, the identification of gastric anatomical parts is implemented using a convolutional neural network (CNN). The CNN takes a preprocessed gastroscopy image as input, extracts convolutional features, and outputs a classification to obtain the predicted probability of each gastric anatomical part category. The category with the highest predicted probability is taken as the anatomical part category P(I), and the image is determined to enter the subsequent grading process based on whether P(I) belongs to the preset target part set Ω.

[0031] Preferably, the gastric anatomical location category includes at least one or more of the following: gastric antrum, gastric body, gastric angle, cardia, fundus, pylorus, and non-target locations.

[0032] Preferably, the preprocessing includes removing invalid parts from the original gastroscopy image to obtain an effective field of view image, and scaling the effective field of view image to 512×512 pixels; the data augmentation includes at least one or more of random rotation, random flipping, and color jitter.

[0033] Preferably, the low-quality image includes at least images that are obviously blurry, severely obscured by reflections, severely obscured by foam or mucus, and have an excessively small effective field of view.

[0034] Preferably, the quality screening is performed manually, or automatically or semi-automatically; the automatic method involves scoring the image quality based on indicators such as sharpness, reflectivity, and occlusion and then removing images according to a threshold; the semi-automatic method further includes manual review after automatic screening; the manual review refers to manually reviewing only suspected low-quality samples.

[0035] Preferably, the bidirectional feature interaction model is any one of ResNet-bidirectional model, ConvNeXT-bidirectional model, or EfficientNet-bidirectional model.

[0036] In summary, the present invention has the following beneficial effects:

[0037] Compared with existing technologies that directly classify / grade gastroscopy images using single labels and offer optional heatmap interpretation, this invention constrains input by selecting target anatomical sites (at least including the gastric antrum) and provides biaxial grading output (A0-A3, IM0-IM3) for gastric mucosal atrophy and intestinal metaplasia. It enhances generalization ability through quality screening during the training phase and data augmentation using random rotation, flipping, and color jitter. Simultaneously, it generates and structurally displays salient regions / candidate regions of interest to assist endoscopists in selecting mucosal sampling locations, thereby reducing grading fluctuations caused by differences in non-target sites and acquisition conditions, and improving grading stability, consistency, and clinical usability. These effects can be quantified and verified using indicators such as accuracy, F1 score, adjacent level confusion rate, and candidate region of interest hit rate. At the application level, it helps reduce repetitive interpretation and communication costs, improves endoscopic work efficiency, and possesses significant clinical promotion and commercial economic value. Attached Figure Description

[0038] Figure 1 The flowchart shows a method for grading the degree of gastric mucosal atrophy and intestinal metaplasia based on gastroscopy images.

[0039] Figure 2 Flowchart for running a dual-axis multi-task hierarchical model (f A atrophy characteristics; f M Characteristics of intestinal metaplasia; Gate A→M : Gating weights in the direction of atrophy towards intestinal metaplasia; Gate M←A : Interactive gating of intestinal metaplasia with atrophy; Characteristics of intestinal metaplasia after interaction; : Shrinkage characteristics after interaction; α: Fusion coefficient; Element-wise multiplication; : Shrinking branch output characteristics; : Characteristics of intestinal metaplasia branch output). Detailed Implementation

[0040] To facilitate understanding of the present invention by those skilled in the art, the technical solution of the present invention will be further described in detail below with reference to embodiments and accompanying drawings. Obviously, the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort should fall within the scope of protection of the present invention.

[0041] Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.

[0042] like Figure 1As shown, this invention provides a method for grading the degree of gastric mucosal atrophy and intestinal metaplasia based on gastroscopy images. Based on static gastroscopy images acquired by a hospital endoscopy system, the method performs biaxial grading on images of the target anatomical region, directly outputting the gastric mucosal atrophy grades A0 / A1 / A2 / A3 and the intestinal metaplasia grades IM0 / IM1 / IM2 / IM3, and generating salient regions to suggest areas of interest, thereby assisting endoscopists in selecting mucosal sampling sites. The method includes the following steps:

[0043] S1, Image Acquisition

[0044] The static gastroscopy images acquired by the hospital's endoscopy system are used as input image I.

[0045] S2, Preprocessing and Data Augmentation

[0046] The input image I undergoes preprocessing and data augmentation. Preprocessing includes removing invalid parts from the original gastroscopy image to obtain an effective field of view image, and scaling the effective field of view image to 512×512 pixels. During the training phase, data augmentation operations are performed on the preprocessed image. Data augmentation includes at least one or more of random rotation, random flipping, and color jitter to improve the model's generalization ability to different acquisition conditions.

[0047] S3. Data quality screening to construct a dual-axis, multi-task hierarchical model.

[0048] During the training data construction phase, training images undergo quality screening to remove low-quality images. Low-quality images include those that are significantly blurred, severely obscured by reflections, severely obscured by foam / slime, or have an excessively small effective field of view. Quality screening can be performed manually (human deletion) or automatically or semi-automatically.

[0049] The quality-screened training images are divided into a training set and a validation set according to a preset ratio of 7:3. A dual-axis, multi-task hierarchical model is then constructed using the training and validation sets.

[0050] The dual-axis multi-task hierarchical model includes a shared feature extraction module, a gastric mucosal atrophy branch, an intestinal metaplasia branch, and a bidirectional feature interaction module set between the two branches. The bidirectional feature interaction module is used to perform bidirectional weighted fusion of the atrophy features extracted from the gastric mucosal atrophy branch and the intestinal metaplasia features extracted from the intestinal metaplasia branch.

[0051] S4. Selection of target anatomical sites during the reasoning stage

[0052] An anatomical location recognition module is used to identify the input image I to be reasoned. This module is implemented using a convolutional neural network (CNN). The CNN takes a preprocessed gastroscopy image as input, performs convolutional feature extraction and classification on the input image I, and outputs the predicted probability of each gastric anatomical location category. The category with the highest predicted probability is taken as the location category P(I). The gastric anatomical location categories include one or more of the following: antrum, body, angle, cardia, fundus, pylorus, and non-target locations. The input image I is then entered into the subsequent grading process based on a preset target location set Ω, where the target location set Ω includes at least the antrum. When P(I)∈Ω, the input image I is input into the subsequent dual-axis multi-task grading model for grading the degree of gastric mucosal atrophy and intestinal metaplasia. When P(I)∉Ω, the grading process is not initiated, or a "non-target location" message is output.

[0053] S5, Dual-axis multi-tasking hierarchical output

[0054] Input the target region image into the dual-axis multi-task hierarchical model, and directly output:

[0055] The grade of gastric mucosal atrophy is A∈{A0,A1,A2,A3};

[0056] The intestinal metaplasia grade IM∈{IM0,IM1,IM2,IM3}.

[0057] Optionally, the dual-axis multi-task hierarchical model can simultaneously output confidence information (e.g., probability or score) of the corresponding level for result display or reliability reference (not a necessary step in this implementation).

[0058] S6. Generation of salient regions and suggestion of candidate regions of interest

[0059] Based on the gastric mucosal atrophy grading result A and the intestinal metaplasia grading result IM output in step S5, a saliency region map is generated to mark suggested areas of interest in the display interface to assist endoscopists in selecting mucosal sampling locations during the examination. Optionally, the saliency region map is structured by thresholding and connected component filtering to remove noise regions, thereby obtaining several candidate areas of interest (for biopsy areas of interest), and the Top-K candidate areas of interest and their ranking results can be output. The candidate areas of interest are displayed on the original image in the form of borders or masks.

[0060] S7. Structured Result Output

[0061] The dual-axis multi-task hierarchical model used in this invention is built upon existing public network architectures (ResNet, ConvNeXT, EfficientNet). Based on this, this invention proposes a bidirectional feature interaction mechanism to jointly predict gastric mucosal atrophy levels (A0~A3) and intestinal metaplasia levels (IM0~IM3). In the specific implementation, the input target site image first extracts image features for atrophy and intestinal metaplasia levels through two feature branches respectively. Each branch performs convolutional feature extraction based on the selected base network to obtain a high-dimensional semantic representation. To fully utilize the correlation between the two types of pathological features, this invention introduces an interaction module at the feature level to achieve information exchange. In this embodiment, the interaction module employs a cross-branch attention mechanism, enabling weighted integration of the two types of features at each level, thereby enhancing the accuracy and stability of the dual-task prediction. Bidirectional feature interaction allows the atrophy level branch features to influence the intestinal metaplasia branch, while the intestinal metaplasia features feed back to the atrophy branch, thus enhancing the model's sensitivity to subtle differences between levels. The models formed through this mechanism are called ResNet-bidirectional model, ConvNeXT-bidirectional model, and EfficientNet-bidirectional model, respectively. The base network is an existing public network. The innovation of this invention lies in the bidirectional feature interaction mechanism and its application in biaxial hierarchical tasks.

[0062] After feature interaction, the interacted features are simultaneously input into two output branches to predict the gastric mucosal atrophy grade and intestinal metaplasia grade, respectively, and can also output corresponding confidence information (probability or score) for clinical reference. Compared with basic single-task models or unidirectional feature transfer models, the bidirectional feature interaction model of this invention can significantly improve the accuracy of dual-task grading and the Macro-F1 index, especially in adjacent grade scenarios (such as A1 / A2 and IM1 / IM2), reducing the false positive rate, while enhancing the generalization ability of cross-center data, ensuring the grading stability of the external validation set. While maintaining inference efficiency similar to the basic network, the model also outputs structured saliency regions and candidate regions of interest to guide endoscopists in selecting mucosal sampling sites.

[0063] Ultimately, the structured results include anatomical location identification results P(I), gastric mucosal atrophy grade A (A0~A3), intestinal metaplasia grade IM (IM0~IM3), and information on salient regions or candidate regions of interest corresponding to the grading results, including heatmaps, region bounding box coordinates, and / or mask information. For example... Figure 2 As shown, the bidirectional feature interaction module is located between the feature extraction branches, enabling information exchange between the two axes of tasks. Through this mechanism, the model can fully utilize the pathological correlation between atrophy and intestinal metaplasia to achieve joint optimization of the two axes of tasks. Compared with existing single-task models or unidirectional transfer models, it significantly improves in terms of grading accuracy, adjacent grade confusion rate, clinical diagnostic efficacy, and generalization ability.

[0064] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments. It should be understood that the specific examples described herein are merely illustrative and not intended to limit the invention.

[0065] Example 1

[0066] Based on the method for grading the degree of gastric mucosal atrophy and intestinal metaplasia based on gastroscopy images provided by this invention, in this embodiment, both training and inference data are derived from static gastroscopy images acquired by a hospital endoscopy system. During the training data construction phase, quality screening is performed manually to remove images that are obviously blurry, severely reflective, or obstructed. Image preprocessing includes deleting invalid parts and scaling to 512×512 pixels. During the training phase, data augmentation strategies such as random rotation, random flipping, and color jitter are employed to improve the model's generalization ability. During the inference phase, anatomical location identification is performed on the input images. Only images identified as gastric antrum images are input into the dual-axis multi-task grading model, directly outputting atrophy levels A0~A3 and intestinal metaplasia levels IM0~IM3. Subsequently, a salient region map is generated and overlaid on the interface. Further thresholding and connected component filtering of the salient regions can be performed to output Top-K candidate regions of interest to guide endoscopists in selecting mucosal sampling locations. The final output is a structured result containing the grading results and candidate regions of interest.

[0067] Example 2

[0068] Building upon Example 1, the purpose of this example is to expand the target site set. In addition to the gastric antrum, the target site set in this example can be expanded to include other gastric anatomical sites such as the gastric body and gastric angle. When an image is identified as belonging to the target site set, it enters the grading process, and the output remains atrophy level A0~A3 and intestinal metaplasia level IM0~IM3. This variation can use a unified model to achieve multi-site grading, or introduce site information at the model input to achieve site-conditional grading.

[0069] Example 3

[0070] Based on Example 1, the anatomical part identification in this example can be implemented in different ways, including but not limited to: classifying the image into parts based on a classification network; determining the parts based on feature matching or attention mechanisms; and obtaining the part result by voting using multiple models on the same image. When the part identification result does not belong to the target part set, it is possible to choose not to output the classification result and prompt "non-target part", or record it as an invalid sample for re-acquisition / re-framing reference.

[0071] Example 4

[0072] Building upon Example 1, this example employs automatic or semi-automatic methods for quality screening during the training phase. For instance, image quality is scored based on metrics such as sharpness, reflectivity, and occlusion percentage, and images are removed according to thresholds. Automatic screening is followed by manual review; only suspected low-quality samples undergo manual review. These methods reduce the interference of low-quality samples on model learning and improve the stability of the grading process.

[0073] Example 5

[0074] Based on Example 1, the preprocessing in this example, in addition to cropping invalid parts and scaling to 512×512, can also include brightness / color normalization, noise reduction and other processing; in addition to random rotation, flipping and color jitter, data augmentation can also include random cropping, affine transformation and contrast adjustment to improve the model's adaptability to differences in equipment and changes in acquisition conditions.

[0075] Example 6

[0076] Based on Example 1, the saliency region map in this example can be generated by different mechanisms, including gradient attribution, attention weight, or class activation mapping; candidate regions of interest can be obtained through thresholding, connected component filtering, area threshold constraints, morphological processing, etc., and the bounding box coordinates / masks of the Top-K candidate regions and their ranking results can be output to assist endoscopists in selecting mucosal sampling locations during the examination.

[0077] Example 7

[0078] Based on Example 1, the hierarchical output of this example may only display the discrete levels of A and IM; or it may simultaneously display the corresponding confidence information (such as probability / score) for reference; the salient region may be superimposed on the original image, or displayed in the form of candidate region boxes / masks, all of which can achieve the purpose of this invention.

[0079] Example 8

[0080] To verify the effectiveness of the bidirectional feature interaction-based grading method for gastric mucosal atrophy and intestinal metaplasia proposed in Examples 1-7, this example systematically compares the grading performance (see Tables 1 and 4), clinical diagnostic efficacy (see Table 2), and fine-grained grading effect (see Table 3) of the single-task model, unidirectional feature transfer model, and bidirectional feature interaction model on the internal and external validation sets based on various mainstream network architectures (ResNet, ConvNeXT, and EfficientNet). The grading performance was evaluated using the macro-F1 score and the quadratic weighted kappa (QWK) score. The macro-F1 score is the arithmetic mean of the F1 scores of each grading category, which is not affected by the imbalance of class sample sizes and can comprehensively measure the model's ability to distinguish different severity levels. The quadratic weighted kappa (QWK) score is an evaluation index that considers the degree of inconsistency between ordered gradations. It is weighted according to the square of the deviation between the predicted gradation and the true gradation, and is more suitable for reflecting the consistency between the predicted gradation and the gold standard gradation in ordered multi-class classification tasks. The clinical diagnostic efficacy was measured using the Concordance Index (CI). The closer the CI value is to 1, the higher the consistency between the model's predicted gradation and the gold standard gradation.

[0081] Table 1. Performance evaluation results of different models on the overall grading of gastric mucosal atrophy and intestinal metaplasia (internal validation set)

[0082]

[0083] Table 2. Generalization and efficiency assessment of different models for grading gastric mucosal atrophy and intestinal metaplasia (external validation set)

[0084] In the gastric mucosal atrophy grading task, the ResNet-bidirectional model demonstrated stable overall performance on both internal and external validation sets: internal accuracy was 93.51%, Macro-F1 was 92.54%, and QWK was 91.86%; external accuracy was 93.11%, Macro-F1 was 87.15%, and QWK was 91.68%. Compared to the ResNet single-task model, the ResNet-bidirectional model improved external accuracy by 3.45 percentage points and external Macro-F1 by 4.70 percentage points. It should be noted that different backbone networks have varying degrees of adaptation to the bidirectional feature interaction module. Under some backbone networks, the bidirectional model does not outperform the corresponding single-task model in all metrics. Therefore, this embodiment describes the ResNet-bidirectional model as the preferred implementation.

[0085] In the IM (Instantaneous Mapping) grading task, the ResNet-bidirectional model achieved an internal accuracy of 86.30%, a Macro-F1 score of 86.58%, and a QWK score of 87.58%; its external accuracy was 85.89%, with a Macro-F1 score of 83.98% and a QWK score of 87.24%. Compared to the ResNet single-task model, the ResNet-bidirectional model improved external accuracy by 0.73 percentage points and external Macro-F1 accuracy by 0.42 percentage points. These results suggest that, with a well-optimized backbone network, the bidirectional feature interaction mechanism can provide stable gains in dual-axis grading tasks. However, for backbone networks such as ConvNeXT and EfficientNet, the benefits of the bidirectional interaction module may be affected by network structure, training strategy, and data distribution, requiring the selection of the optimal model based on specific metrics.

[0086] The above results indicate that the bidirectional feature interaction mechanism does not simply replace all single-task models. Rather, with optimized backbone networks and appropriate training strategies, it can improve biaxial hierarchical stability by utilizing the correlation between shrinkage and IM. This statement is more consistent with the data in the table and also helps to enhance the authenticity and examineability of patent texts.

[0087] On the external validation set, the ResNet-bidirectional model's shrinkage grading accuracy decreased by 0.40 percentage points compared to the internal validation set, and its IM grading accuracy decreased by 0.41 percentage points, demonstrating good cross-center stability. The external performance of other backbone networks varied, indicating that the bidirectional feature interaction module can serve as a transferable technical framework; however, the optimal backbone network should be determined based on the external validation results during specific deployment.

[0088] Table 3. Evaluation results of the clinical diagnostic efficacy of different models for the overall grading of gastric mucosal atrophy and intestinal metaplasia.

[0089]

[0090] Note: A represents the grade of gastric mucosal atrophy, and B represents the grade of intestinal metaplasia.

[0091] In terms of clinical diagnostic efficacy, the ResNet-bidirectional model achieved an AUC of 0.9866, a sensitivity of 90.49%, and a specificity of 96.98% in the atrophy grading task. Compared to the ResNet single-task model, its sensitivity improved by 0.53 percentage points, and its specificity improved by 0.39 percentage points. For other backbone networks, some indicators in the table show that the bidirectional model may not outperform the corresponding single-task model in all aspects. Therefore, this embodiment mainly emphasizes the stable performance of the ResNet-bidirectional model in terms of sensitivity and specificity when it is the preferred implementation method.

[0092] In the intestinal metaplasia grading task, the ResNet-bidirectional model achieved an AUC of 0.9742, a sensitivity of 86.64%, and a specificity of 95.37%. Compared to the ResNet single-task model, its sensitivity improved by 0.86 percentage points. These results indicate that the bidirectional feature interaction module, under the preferred implementation, helps improve the detection capability of positive cases; however, results under different backbone networks should be based on actual validation data.

[0093] The aforementioned clinical diagnostic indicators indicate that, in the preferred embodiment, the bidirectional model can improve sensitivity while maintaining high specificity, making it suitable for image-assisted analysis scenarios that require improved detection capabilities for positive cases.

[0094] Table 4. Evaluation results of fine-grained grading of gastric mucosal atrophy and intestinal metaplasia using different models

[0095]

[0096] In terms of fine-grained classification, the ResNet-bidirectional model achieved an accuracy of 93.56% in the shrinkage classification task, with a misclassification rate of 3.39% for adjacent levels and a severe misclassification rate of 3.05%. Compared to the ResNet single-task model, the accuracy improved by 0.82 percentage points, and the misclassification rate for adjacent levels decreased by 0.95 percentage points. These results suggest that bidirectional feature interaction helps improve the stability of identifying adjacent boundaries in shrinkage classification.

[0097] In the IM (Instantaneous Mapping) classification task, the ResNet-bidirectional model achieved an accuracy of 86.47%, a misclassification rate of 9.06% for adjacent levels, and a severe misclassification rate of 4.47%. Compared to the ResNet single-task model, the accuracy improved by 1.13 percentage points. For other backbone networks, the changes in accuracy and misclassification rates are not entirely consistent; therefore, the comprehensive indicators of the optimized model should be used as the basis for illustrating the examples.

[0098] The fine-grained grading results further illustrate that, under the preferred implementation method, bidirectional feature interaction can improve the clinical image grading pain point of confusion between adjacent grades; for different backbone networks and different data distributions, a comprehensive selection should be made by combining the accurate grading rate, the misclassification rate of adjacent grades, and the severe misclassification rate.

[0099] In terms of computational efficiency, the number of parameters and inference time of each bidirectional model are on the same order of magnitude as its infrastructure, which can meet the real-time or near-real-time inference requirements in clinical auxiliary analysis scenarios.

[0100] Table 5. Evaluation results of the computational efficiency of different models for grading gastric mucosal atrophy and intestinal metaplasia

[0101]

[0102] The ResNet bidirectional model has 12.36 million parameters, 1.825 G FLOPs of computation, a single-image inference time of 5.04 ms, and an inference frame rate of 198.5 FPS. The ConvNeXT bidirectional model has 31.028 million parameters, a 6.70 ms inference time, and a 149.16 FPS inference frame rate. The EfficientNet bidirectional model has 4.878 million parameters, a 7.09 ms inference time, and a 141.04 FPS inference frame rate. These results demonstrate that the bidirectional models, while maintaining high accuracy, can meet the requirements of real-time clinical inference and possess good feasibility for clinical deployment.

[0103] In summary, the bidirectional feature interaction model (bidirectional model under each network architecture) is superior to the single-task model and the unidirectional feature transfer model in terms of atrophy grading, intestinal metaplasia grading, fine-grained grading, clinical diagnostic efficacy and generalization, which fully demonstrates the technical superiority and clinical applicability of the bidirectional feature interaction mechanism proposed in this invention.

[0104] The above description is merely an embodiment of the present invention, and common knowledge such as specific technical solutions or characteristics in the solution is not described in detail here. It should be noted that those skilled in the art can make several modifications and improvements without departing from the technical solution of the present invention, and these should also be considered within the scope of protection of the present invention. These modifications and improvements will not affect the effectiveness of the implementation of the present invention or the practicality of the patent. The scope of protection claimed in this application shall be determined by the content of its claims, and the specific embodiments described in the specification can be used to interpret the content of the claims.

Claims

1. A method for grading the degree of gastric mucosal atrophy and intestinal metaplasia based on gastroscopy images, characterized in that, Includes the following steps: S1, Image Acquisition The static gastroscopy images acquired by the hospital's endoscopy system are used as input image I; S2, Preprocessing and Data Augmentation Preprocessing and data augmentation are performed on the input image I; S3. Data quality screening to construct a dual-axis, multi-task hierarchical model. The input image I is subjected to quality screening to remove low-quality images, and the input image I is divided into a training set and a validation set in a 7:3 ratio; a dual-axis multi-task hierarchical model is constructed using the training set and the validation set; the dual-axis multi-task hierarchical model is a bidirectional feature interaction model based on the mainstream network architecture. The mainstream network architecture is any one of ResNet, ConvNeXT, and EfficientNet; S4. Selection of target anatomical sites during the reasoning stage The anatomical location recognition module is used to identify the gastric anatomical location in the input image I to be reasoned, and the target location image category P(I) is obtained; images are selected for grading according to a preset target location set, wherein the target location set includes at least the gastric antrum; When P(I) belongs to the target part set, proceed to the subsequent classification steps; when P(I) does not belong to the target part set, do not proceed to the classification process or output a "non-target part" prompt. S5, Dual-axis multi-tasking hierarchical output Input the target region image belonging to the target region set into the pre-trained dual-axis multi-task hierarchical model, and output directly: The grade of gastric mucosal atrophy is A∈{A0,A1,A2,A3}; Intestinal metaplasia grade IM∈{IM0,IM1,IM2,IM3}; S6. Generation of salient regions and suggestion of candidate regions of interest Based on the gastric mucosal atrophy grading result A and the intestinal metaplasia grading result IM output in step S5, a significant region map is generated to mark the suggested areas of interest in the display interface, so as to assist endoscopists in selecting mucosal sampling sites during the examination. S7. Output Results The results include at least the anatomical location identification result P(I), the gastric mucosal atrophy grading result A(A0~A3) and the intestinal metaplasia grading result IM(IM0~IM3), as well as the salient region information corresponding to the grading results.

2. The method for grading the degree of gastric mucosal atrophy and intestinal metaplasia based on gastroscopy images according to claim 1, characterized in that, The grading method further includes structuring the salient region map to remove noise regions, thereby obtaining several candidate regions of interest, and outputting the Top-K candidate regions of interest and their ranking results. The candidate regions of interest are displayed on the original image in the form of borders or masks.

3. The method for grading the degree of gastric mucosal atrophy and intestinal metaplasia based on gastroscopy images according to claim 2, characterized in that, The generation mechanism of the salient region map includes gradient attribution, attention weights, or class activation mapping; the candidate attention regions can be obtained through thresholding, connected component filtering, area threshold constraints, and morphological processing.

4. The method for grading the degree of gastric mucosal atrophy and intestinal metaplasia based on gastroscopy images according to claim 2, characterized in that, The results also include candidate interest region information and confidence information corresponding to the grading results. The confidence information includes probability or score, and the candidate interest region information includes heat map, region bounding box coordinates and / or mask information of the candidate region.

5. The method for grading the degree of gastric mucosal atrophy and intestinal metaplasia based on gastroscopy images according to claim 1, characterized in that, The identification of gastric anatomical parts is implemented using a convolutional neural network (CNN). The CNN takes a preprocessed gastroscopy image as input, extracts convolutional features, and outputs a classification to obtain the predicted probability of each gastric anatomical part category. The category with the highest predicted probability is taken as the anatomical part category P(I), and the image is determined to enter the subsequent classification process based on whether P(I) belongs to the preset target part set Ω.

6. The method for grading the degree of gastric mucosal atrophy and intestinal metaplasia based on gastroscopy images according to claim 1, characterized in that, The categories of gastric anatomical locations include at least one or more of the following: antrum, body, angle, cardia, fundus, pylorus, and non-target locations.

7. The method for grading the degree of gastric mucosal atrophy and intestinal metaplasia based on gastroscopy images according to claim 1, characterized in that, The preprocessing includes removing invalid parts from the original gastroscopy image to obtain an effective field of view image, and scaling the effective field of view image to 512×512 pixels; the data augmentation includes at least one or more of random rotation, random flipping, and color jitter.

8. The method for grading the degree of gastric mucosal atrophy and intestinal metaplasia based on gastroscopy images according to claim 1, characterized in that, The low-quality images include at least those that are obviously blurry, severely obscured by reflections, severely obscured by foam or mucus, or have an excessively small effective field of view.

9. The method for grading the degree of gastric mucosal atrophy and intestinal metaplasia based on gastroscopy images according to claim 1, characterized in that, The quality screening is performed manually, or automatically or semi-automatically. The automatic method involves scoring the image quality based on indicators such as sharpness, reflectivity, and occlusion and then removing images according to a threshold. The semi-automatic method also includes manual review after automatic screening. The manual review refers to manually reviewing only suspected low-quality samples.

10. The method for grading the degree of gastric mucosal atrophy and intestinal metaplasia based on gastroscopy images according to claim 1, characterized in that, The bidirectional feature interaction model is any one of ResNet-bidirectional model, ConvNeXT-bidirectional model, or EfficientNet-bidirectional model.