CapsuleNet: A Deep Learning Model To Classify GI Diseases Using EfficientNet-b7

Aniket Das, Ayushman Singh, Nishant, Sharad PrakasharXiv 2024 · DOI

Introduction

Capsule Endoscopy (CE) represents a significant advancement in non-invasive gastrointestinal (GI) diagnostics, allowing for the recording of the entire GI tract via a swallowable camera. However, the procedure generates thousands of frames, creating a massive data bottleneck for manual clinical review. To address this, researchers from IIIT Ranchi developed CapsuleNet, a deep learning pipeline designed to automatically classify 10 types of GI abnormalities. By leveraging a pretrained EfficientNet-b7 backbone and a specialized data augmentation strategy, the model achieved a micro-accuracy of 84.5%, significantly outperforming standard baselines like VGG16.

Methodology

The CapsuleNet architecture is built upon a Convolutional Neural Network (CNN) framework rather than traditional "Capsule Networks." The core of the model is a pretrained EfficientNet-b7 backbone sourced from the MONAI framework, chosen for its effective compound scaling of depth, width, and resolution.

The CapsuleNet architecture utilizes an EfficientNet-b7 backbone followed by custom linear layers and PReLU activations.

As illustrated in the architecture diagram, the backbone is extended with a custom head consisting of:

  • Adaptive Average Pooling: To reduce spatial dimensions.
  • Linear Layers: For feature transformation.
  • Parametric ReLU (PReLU): Used as the activation function, which the authors found marginally superior to standard ReLU.
  • Dropout: Integrated for regularization to prevent overfitting.

During training, the team utilized standard Cross-Entropy loss. While Focal Loss was initially considered to handle class imbalance, it led to instability in later epochs. Similarly, preprocessing techniques like CLAHE were tested but ultimately discarded as they induced overfitting.

Data Strategy and the "Long-Tail" Problem

The model was trained on the Capsule Vision 2024 Challenge dataset, which features 10 distinct categories ranging from common "Normal" images to rare abnormalities like "Worms" and "Angioectasia." The dataset exhibits a severe "long-tail" distribution: the "Normal" class contains approximately 28,000 instances, whereas the "Worms" class contains fewer than 200.

To combat this imbalance, the researchers identified a "Goldilocks" zone for data augmentation. While initial attempts to oversample all classes to 5,000 images failed due to lack of variance, scaling back to 1,500 images per class provided the necessary balance between data volume and feature diversity.

Results and Performance Analysis

CapsuleNet achieved a micro-accuracy of 84.5% and a macro-accuracy of 0.643, a substantial improvement over the 71% accuracy of the VGG16 baseline. The model demonstrated exceptional performance in identifying "Normal" cases (0.94 F1-score) and "Ulcer" cases (0.85 F1-score).

Confusion matrix and support data showing the model's performance across 10 GI classes and the inherent data imbalance.

Despite these successes, the model faced significant challenges with the Erythema class. As shown in the confusion matrix, Erythema was frequently misclassified as "Erosion" due to their visual similarities (redness vs. tissue breakdown), resulting in a low F1-score of 0.06 for that specific category. Conversely, the model achieved perfect recall (1.00) for the rarest class, "Worms," ensuring no instances of this critical abnormality were missed, albeit with lower precision.

Conclusion

CapsuleNet demonstrates that well-tuned CNN architectures like EfficientNet remain highly effective for medical image classification, particularly when dealing with imbalanced clinical datasets. While the model excels at identifying most abnormalities, the confusion between Erythema and Erosion suggests that future work should explore advanced attention mechanisms to distinguish subtle textural differences. Further validation on real-time video streams will be essential to confirm the model's utility in a live clinical setting.

Summary updated

BibTeX
@misc{das2024capsulenet,
  author = {Aniket Das and Ayushman Singh and Nishant and Sharad Prakash},
  title = {{CapsuleNet: A Deep Learning Model To Classify GI Diseases Using EfficientNet-b7}},
  year = {2024},
  eprint = {2410.19151},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.19151},
}
Figure