Given the complexity of oral mucosal disease diagnosis and the limitations in the precision of traditional object detection methods, this study aims to develop a high-accuracy artificial intelligence-assisted diagnostic approach based on the SegFormer semantic segmentation model. This method is designed to automatically segment lesion areas in white-light images of oral mucosal diseases, providing objective and quantifiable evidence for clinical diagnosis. This study utilized a dataset of oral mucosal diseases provided by the Affiliated Stomatological Hospital of Zhejiang University School of Medicine, comprising 838 high-resolution images of three diseases: oral lichen planus, oral leukoplakia, and oral submucous fibrosis. These images were annotated at the pixel level by oral specialists using Labelme software (v5.5.0) to construct a semantic segmentation dataset. This study designed a SegFormer model based on the Transformer architecture, employed cross-validation to divide training and testing sets, and compared SegFormer models of different capacities with classical segmentation models such as UNet and DeepLabV3. Quantitative metrics including the Dice coefficient and mIoU were evaluated, and a qualitative visual analysis of the segmentation results was performed to comprehensively assess model performance. The SegFormer-B2 model achieved optimal performance on the test set, with a Dice coefficient of 0.710 and mIoU of 0.786, significantly outperforming other comparative algorithms. The visual results demonstrate that this model could accurately segment the lesion areas of three common oral mucosal diseases. The SegFormer model proposed in this study effectively achieves the precise automatic segmentation of three common oral mucosal diseases, providing a reliable auxiliary tool for clinical diagnosis. It shows promising prospects in improving the efficiency and accuracy of oral mucosal disease diagnosis and has potential clinical application value.
Autoimmune gastritis (AIG) has a strong correlation with gastric neuroendocrine tumors (NETs) and gastric cancer, making its timely and accurate diagnosis crucial for tumor prevention. The endoscopic manifestations of AIG differ from those of gastritis caused by Helicobacter pylori (H. pylori) infection in terms of the affected gastric anatomical regions and the pathological characteristics observed in biopsy samples. Therefore, when diagnosing AIG based on endoscopic images, it is essential not only to distinguish between normal and atrophic gastric mucosa but also to accurately identify the anatomical region in which the atrophic mucosa is located. In this study, we propose a patient-based multitask gastroscopy image classification network that analyzes all images obtained during the endoscopic procedure. First, we employ the Scale-Invariant Feature Transform (SIFT) algorithm for image registration, generating an image similarity matrix. Next, we use a hierarchical clustering algorithm to group images based on this matrix. Finally, we apply the RepLKNet model, which utilizes large-kernel convolution, to each image group to perform two tasks: anatomical region classification and lesion recognition. Our method achieves an accuracy of 93.4 ± 0.5% (95% CI) and a precision of 92.6 ± 0.4% (95% CI) in the anatomical region classification task, which categorizes images into the fundus, body, and antrum. Additionally, it attains an accuracy of 90.2 ± 1.0% (95% CI) and a precision of 90.5 ± 0.8% (95% CI) in the lesion recognition task, which identifies the presence of gastric mucosal atrophic lesions in gastroscopy images. These results demonstrate that the proposed multitask patient-based gastroscopy image analysis method holds significant practical value for advancing computer-aided diagnosis systems for atrophic gastritis and enhancing the diagnostic accuracy and efficiency of AIG.