Design and implementation of deep learning algorithm for image discrimination of light field confocal endoscopy for esophageal cancer and gastric cancer

Yanyan Tang, Tong Liu, Shigang Ding, Ye Wang, S. Y. Liu Yue, Xuefang Yang, Xiaohui Liu, Lu LiITM 2022

Abstract

The survival rate of early gastric cancer and esophageal cancer is more than 90%. Confocal endoscopy can detect cell morphology and mucosal glandular structure (depth about 500 μm), presenting a cross-sectional microscopic image unfamiliar to both endoscopists and pathologists. Therefore, using computer-aided diagnosis technology to complete real-time artificial intelligence diagnosis of early esophageal and gastric cancer is of great significance for early detection and early treatment of cancer patients. This study utilizes a ResNet convolutional neural network-based image classification model, incorporating a Convolutional Block Attention Module (CBAM) to improve performance, achieving intelligent diagnosis of confocal endoscopy images.

Introduction

Early detection is critical in gastrointestinal oncology; when gastric and esophageal cancers are caught in their early stages, the five-year survival rate exceeds 90%. Traditional endoscopy, while effective for surface-level inspection, often misses subtle cellular changes indicative of early malignancy. 3D confocal endoscopy has emerged as a powerful diagnostic tool, capable of imaging up to 500 μm deep into tissue to reveal cell morphology and glandular structures in real-time.

However, the adoption of this technology is hindered by a significant learning curve. The resulting images resemble cross-sectional microscopic slices, a format vastly different from the surface-level views endoscopists are trained to interpret. Consequently, beginners often require years of collaborative training with pathologists to master these scans. This research addresses this bottleneck by developing an AI-assisted diagnostic system designed to automatically discriminate between normal and cancerous tissue, providing a "second pair of eyes" for clinicians.

Methodology

The proposed diagnostic system is built upon a ResNet50 backbone. ResNet (Residual Network) is utilized for its "shortcut connections," which facilitate the training of deep networks by mitigating the vanishing gradient problem. To enhance the model's discriminative power, a Convolutional Block Attention Module (CBAM) was integrated. The CBAM operates as a dual-stage filter:

  1. Channel Attention Module: Identifies critical features (e.g., specific textures or shapes) across the entire image.
  2. Spatial Attention Module: Pinpoints the location of critical information within the frame, such as clusters of abnormal cells.
System workflow from data preprocessing and model training to clinical application.

The training process employed the Adam optimizer and a Cross-Entropy loss function. To ensure robustness against variations in lighting and imaging conditions, heavy data augmentation—including random flips, contrast adjustments, and illumination changes—was applied.

Dataset and Preprocessing

The study utilized a dataset of 10,000 endoscopic images provided by The Third Hospital of Peking University and Beihang University. The data was split into a training set (8,000 images) and a test set (2,000 images). Images were normalized and randomly clipped to a uniform size of 256×256 pixels to eliminate feature correlation and accelerate convergence.

Results and Discussion

The implementation achieved high quantitative performance, reaching a classification accuracy of 90.9563%. Notably, the system is optimized for real-time clinical use, with an average prediction time of just 0.0035 seconds per image.

The graphical user interface (GUI) displaying real-time diagnosis and probability distribution for a confocal image.

A key insight from this work is that while standard deep learning architectures are powerful, medical imaging often contains significant noise. The addition of the CBAM module forces the network to focus on critical pathological areas, significantly boosting recognition accuracy. Furthermore, the development of a visual graphical user interface (GUI) allows for the display of probability distributions (e.g., "Normal: 0.999, Tumor: 0.0006") alongside the final diagnosis, facilitating experimental clinical integration.

Conclusion and Future Work

This study demonstrates the feasibility of using deep learning to bridge the cognitive gap in interpreting confocal endoscopy images. By providing rapid, accurate diagnostic assistance, the system reduces the reliance on specialized pathological expertise for real-time decisions.

Future work will focus on expanding the system from binary classification (Normal vs. Tumor) to multiclass identification of various cancer stages and lesion types. Additionally, further testing across diverse patient populations and different confocal hardware brands is necessary to ensure the model's generalizability. Finally, "human-in-the-loop" clinical trials will be essential to evaluate the system's impact on diagnostic speed and accuracy in live hospital environments.

Summary updated

BibTeX
@inproceedings{tang2022design,
  author = {Yanyan Tang and Tong Liu and Shigang Ding and Ye Wang and S. Y. Liu Yue and Xuefang Yang and Xiaohui Liu and Lu Li},
  title = {{Design and implementation of deep learning algorithm for image discrimination of light field confocal endoscopy for esophageal cancer and gastric cancer}},
  booktitle = {ITM},
  year = {2022},
  doi = {10.1051/itmconf/20224501035},
}
Figure