SAPD
Sociedad Andaluza
de
Patología Digestiva
Iniciar sesión
Buscar en la RAPD Online
This work is licensed under

CC BY-NC-ND 4.0
RAPD 2025
VOL 48
N2 Marzo - Abril 2025

N2 March - April 2025
Diego Martínez , Cano de la Cruz, Sánchez Sánchez, and Jiménez Pérez: Development and training of a convolutional neural network for the detection of esophagitis in endoscopic images

Datos de la publicación


Development and training of a convolutional neural network for the detection of esophagitis in endoscopic images


Abstract

Introduction and Objectives: digestive endoscopy provides a direct evaluation of the gastrointestinal tract, although inter-operator variability can limit its precision. This study aimed to develop a convolutional neural network (CNN) based on InceptionResNetV2, tailored for the automated detection of esophagitis in endoscopic images, with the objective of improving diagnostic accuracy and optimizing clinical workflow.

Materials and Methods: the model was implemented using Python, Keras, and TensorFlow on Google Colab Pro with an Nvidia A100 GPU. Starting from the InceptionResNetV2 architecture pretrained on ImageNet, dense layers were added to perform binary classification (normal Z-line vs. esophagitis). Training was conducted using 2000 images from the KVASIR dataset (80% for training and 20% for validation). Evaluation was extended to 1164 images from the HyperKVASIR dataset, excluding mild cases, and to 203 images from the Hospital Regional Universitario de Málaga.

Results: the model demonstrated high accuracy, as evidenced by confusion matrices and ROC curves, with an AUC of 0.884 for the KVASIR dataset and 0.970 for HyperKVASIR. Greater precision was observed in the detection of advanced esophagitis, correlating the severity of the lesion with increased diagnostic accuracy.

Conclusions: the study highlights the potential of CNNs in AI-assisted diagnosis in endoscopy. Although the model shows high sensitivity in advanced lesions, additional research is required to improve detection in early stages and to validate its application in heterogeneous clinical contexts.

Keywords: digestive endoscopy, convolutional neural networks, esophagitis, deep learning, artificial intelligence.