Attention Mechanism Guided SE + ResNet-H Model for Gastrointestinal Endoscopy Image Classification
Bo Ye, Zhi Shu, Bo Wang, Shufang Wang, Yingbing Fu, L Zhang, Bowen Qi, Amit Krishna Dwivedi, Sheng Liu
Abstract
Wireless Capsule Endoscopy (WCE) allows the screening and diagnosis of a patient’s gastrointestinal tract, including the areas inaccessible to traditional endoscopy, safely and painlessly. However, a large number of images produced in WCE examination require significant time and expertise to process the information and the achieved accuracy is limited due to manual examination by experts. To solve these problems, a novel SE + ResNet-H gastrointestinal lesion recognition model is proposed to automate the screening and detection process. An attention mechanism is added to the original ResNet50 model to form a new attention mechanism + ResNet50 model. Then, transfer learning is integrated with the new attention mechanism + ResNet50 model to classify WCE images. The achieved results in experiment settings involving different combinations of positions and types of added attention mechanisms demonstrate that the average detection accuracy of the optimized improved model can reach up to 97.84% for all types of gastrointestinal images. Subsequently, large-margin cosine loss was used to replace the cross-entropy loss function. Based on the comparative analysis, the improved loss function enhanced the detection accuracy to 98.47% for different types of gastrointestinal images. Furthermore, the results achieved using the Gradient-weighted Class Activation Mapping illustrate that the improved model can capture the focal area well, and promising performance was achieved compared to the original ResNet50 model. The suggested approach can potentially assist endoscopists in the detection and examination of gastrointestinal diseases during endoscopy.