A HYBRID deep learning model improved gastrointestinal image classification by addressing visual similarity between classes and imbalanced data, achieving a macro F1 score of 0.718 and a micro F1 score of 0.897 in testing across 22 classes.
Researchers investigated a framework combining two established neural network architectures with a Coordinate Attention mechanism and focal loss. The approach aimed to improve the representation of distinguishing features in gastrointestinal endoscopic images, potentially supporting more accurate classification of gastrointestinal diseases.
Addressing Challenges in Gastrointestinal Image Classification
Deep learning has shown promise in endoscopic image analysis, but classification performance can be undermined by imbalanced class distributions and visual similarities between different categories. These challenges can make it more difficult for models to distinguish between image classes reliably.
To address these limitations, the researchers developed a hybrid framework combining ResNet50 and VGG16. Each architecture was individually optimised using Coordinate Attention before their extracted features were concatenated into a single hybrid model.
This feature level integration was designed to strengthen image representation by combining information from both architectures. The resulting framework was further refined using focal loss to address class imbalance and improve the model’s handling of difficult and underrepresented samples.
Hybrid Model Demonstrates Improved Performance
The researchers evaluated the approach using the 22 class GastroVision dataset. The hybrid model incorporating Coordinate Attention achieved a macro F1 score of 0.718, a micro F1 score of 0.897, and a Matthews correlation coefficient of 0.886.
By comparison, the hybrid model without Coordinate Attention, also using focal loss, recorded a macro F1 score of 0.657, a micro F1 score of 0.835, and a Matthews correlation coefficient of 0.816.
These results indicated stronger classification performance when Coordinate Attention was incorporated into the hybrid architecture. The findings also highlighted the potential value of combining feature level integration with a loss function designed to address imbalanced datasets.
Implications for Endoscopic Image Analysis
The researchers did not use synthetic techniques to correct class imbalance. Instead, standard data augmentation was applied uniformly to increase dataset diversity, without introducing a specific strategy to artificially balance class distributions.
This approach may offer flexibility when working with datasets that have different class distributions. However, the findings relate to the reported dataset and classification task, and further evidence would be needed to establish how the framework performs in other settings.
Overall, the results suggest that combining Coordinate Attention, hybrid deep learning, and focal loss could help address two important challenges in gastrointestinal endoscopic image classification. The framework represents a potential avenue for further investigation into more reliable automated image analysis for gastrointestinal disease assessment.
Reference
Akram S et al. A hybrid CoordAttention model with focal loss for handling visual similarity in gastrointestinal endoscopic images. Sci Rep. 2026;DOI:10.1038/s41598-026-77341-8.