Introduction
Gastric ulcers can be categorized into malignant (ulcerative gastric cancer) and benign types. Although endoscopy with biopsy remains the gold standard for diagnosis and differentiation, it has limitations. Studies report a sensitivity of 92% and specificity of 84% for detecting malignant ulcers via endoscopy, yet approximately 5% of endoscopically diagnosed malignant ulcers are histologically confirmed as benign. Furthermore, biopsy rates among endoscopists vary widely (22.4%–52.9%), and increased biopsies often yield unnecessary negative results, burdening both patients and clinicians. While artificial intelligence (AI) has shown promise in assisting diagnosis, existing studies primarily focus on single-center, static image classification (normal mucosa, benign/malignant ulcers), which diverges from real-world clinical practice requiring dynamic, holistic lesion analysis.
Aims & Methods
We aimed to develop a deep learning-based model using multicenter data to enable real-time detection and classification of gastric ulcers during endoscopy, thereby improving diagnostic accuracy and guiding biopsy decisions. A total of 21,592 endoscopic images were retrospectively collected from three tertiary hospitals in China, including 1,424 images from 263 histologically confirmed malignant ulcers, 7,767 images from 1,470 benign ulcers, 1,490 normal mucosa images, and 10,911 frames extracted from 11 endoscopy videos. These were split into training, validation, and test sets (8:1:1 ratio). A real-time instance segmentation model was developed using the YOLOv8 architecture, with performance evaluated on the test set.
Results
For benign ulcers, the model achieved a precision, sensitivity, and specificity of 99.25% (95% CI: 98.70%–99.61%), 99.25% (95% CI: 98.70%–99.61%), and 94.07% (95% CI: 89.20%–97.27%), respectively. For malignant ulcers, precision, sensitivity, and specificity were 94.07% (95% CI: 89.20%–97.27%), 94.07% (95% CI: 89.20%–97.27%), and 99.25% (95% CI: 98.70%–99.61%), respectively. The overall precision for differentiating benign and malignant ulcers was 96.66% (95% CI: 97.91%–99.21%).
Conclusion
This multicenter study successfully developed an AI model based on an enhanced YOLOv8 architecture for real-time differentiation of benign and malignant gastric ulcers. The model demonstrates high diagnostic accuracy, offering potential to optimize endoscopic evaluations and biopsy protocols in clinical practice.
References
1.Dooley CP, Larson AW, Stace NH, et al. Double-contrast barium meal and upper gastrointestinal endoscopy. A comparative study. Ann Intern Med. 1984;101(4):538-545. doi:10.7326/0003-4819-101-4-538
2.Lv SX, Gan JH, Ma XG, et al. Biopsy from the base and edge of gastric ulcer healing or complete healing may lead to detection of gastric cancer earlier: an 8 years endoscopic follow-up study. Hepatogastroenterology. 2012;59(115):947-950. doi:10.5754/hge10692
3.Graham DY, Schwartz JT, Cain GD, Gyorkey F. Prospective evaluation of biopsy number in the diagnosis of esophageal and gastric carcinoma. Gastroenterology. 1982;82(2):228-231.
4.Januszewicz W, Wieszczy P, Bialek A, et al. Endoscopist biopsy rate as a quality indicator for outpatient gastroscopy: a multicenter cohort study with validation. Gastrointest Endosc. 2019;89(6):1141-1149. doi:10.1016/j.gie.2019.01.008
5.Namikawa K, Hirasawa T, Nakano K, et al. Artificial intelligence-based diagnostic system classifying gastric cancers and ulcers: comparison between the original and newly developed systems. Endoscopy. 2020;52(12):1077-1083. doi:10.1055/a-1194-8771
6.Liu Y, Zhang L, Hao Z, et al. An xception model based on residual attention mechanism for the classification of benign and malignant gastric ulcers. Sci Rep. 2022;12(1):15365. Published 2022 Sep 13. doi:10.1038/s41598-022-19639-x