Endoscopic images of patients with AIG, type B gastritis, and CNAG were collected between January 1st, 2019 and March 1st, 2023. All endoscopic images were acquired by Olympus Evis Lucera 260/290 (Tokyo, Japan) and FUJIFILM EC-760RV/M (Tokyo, Japan). This dataset includes 3576 endoscopic images. Poor image quality, images of the pharynx, images of the esophageal region, and images of the duodenal region were excluded.