BACKGROUNDThe automated classification of Helicobacter pylori infection status is gaining attention, distinguishing among uninfected (no history of H. pylori infection), current infection, and post-eradication. However, this classification has relatively low performance, primarily due to the intricate nature of the task. This study aims to develop a new multistage deep learning method for automatically classifying H. pylori infection status.METHODSThe proposed multistage deep learning method was developed using a training set of 538 subjects, then tested on a validation set of 146 subjects. The classification performance of this new method was compared with the findings of four physicians.RESULTSThe accuracy of our method was 87.7%, 83.6%, and 95.9% for uninfected, post-eradication, and currently infected cases, respectively, whereas that of the physicians was 81.7%, 76.5%, and 90.3%, respectively. When including the patient's H. pylori eradication history information, the classification accuracy of the method was 92.5%, 91.1%, and 98.6% for uninfected, post-eradication, and currently infected cases, respectively, whereas that of the physicians was 85.6%, 85.1%, and 97.4%, respectively.CONCLUSIONThe new multistage deep learning method shows potential for an innovative approach to gastric cancer screening. It can evaluate individual subjects' cancer risk based on endoscopic images and reduce the burden of physicians.