Abstract:ObjectiveTo develop a deep convolutional neural network (CNN) to automatically detect gastric lesions in endoscopic images. MethodsA CNN-based diagnostic system was constructed based on ResNet-34 residual network structure and DeepLabv3 structure, and trained by using 17 217 routine gastroscopy images.These images were from 1 121 gastric lesions of five types acquired in Peking University People's Hospital between 2012 and 2018, namely peptic ulcer (PU), early gastric cancer (EGC) and high-grade intraepithelial neoplasia (HGIN), advanced gastric cancer (AGC), gastric submucosal tumors (SMTs), and normal gastric mucosa without lesions. The trained CNN was evaluated through a test dataset that contained 1 091 routine gastroscopy images of 237 gastric lesions. The accuracy, sensitivity, specificity, positive predictive value, and negative predictive value of the CNN were calculated. ResultsThe accuracy, sensitivity, specificity, positive predictive value, and negative predictive value of the CNN-assisted diagnosis of EGC and HGIN were 78.6% (33/42), 84.4% (27/32), 60.0% (6/10), 87.1% (27/31), and 54.5% (6/11), respectively. The accuracy, sensitivity, and specificity of CNN-assisted diagnosis of PU were 90.4% (47/52), 92.7% (38/41), and 81.8% (9/11), respectively, the outcomes of AGC were 88.1% (52/59), 91.8% (45/49), and 70.0% (7/10), respectively, and those of gastric SMTs were 86.0% (43/50), 89.7% (35/39), and 72.7% (8/11), respectively. The CNN's recognition time for all images of the test set was 42 seconds. ConclusionThe constructed CNN system, as a rapid and accurate auxiliary diagnostic instrument, can detect not only EGC and HGIN but also other gastric lesions.