Background: The operative link for the gastritis assessment (OLGA) system can objectively reflect the stratification of gastric cancer risk in patients with chronic atrophic gastritis (CAG). Objectives: We developed a real-time video monitoring model for the endoscopic diagnosis of CAG and OLGA staging based on U-Net deep learning (DL). To further validate and improve its performance, we designed a study to evaluate the diagnostic evaluation indices. Design: A prospective nested case–control study Methods: Our cohort consisted of 1306 patients from 31 July 2021 to 31 January 2022. According to the pathological results, patients in the cohort were divided into the CAG group and the chronic non-atrophic gastritis group to evaluate the diagnostic evaluation indices. Each atrophy lesion was automatically labeled and the atrophy severity was assessed by the model. Propensity score matching was used to minimize selection bias. Results: The diagnostic evaluation indices and the consistency between OLGA staging and pathological diagnosis of the model were superior to those of endoscopists [sensitivity (89.31% versus 67.56%), specificity (90.46% versus 70.23%), positive predictive value (90.35% versus 69.41%), negative predictive value (89.43% versus 68.40%), accuracy rate (89.89% versus 68.89%), Youden index (79.77% versus 37.79%), odd product (79.23 versus 4.91), positive likelihood ratio (9.36 versus 2.27), negative likelihood ratio (0.12 versus 0.46)], areas under the curves (AUC) (95% CI) (0.919 (0.893–0.945) versus 0.749 (0.707–0.792), p < 0.001) and kappa (0.816 versus 0.291)]. Conclusion: Our study demonstrated that the DL model can assist endoscopists in real-time diagnosis of CAG during gastroscopy and synchronous identification of high-risk OLGA stage (OLGA stages III and IV) patients. Trial registration: ChiCTR2100044458.