Transformer for Polyp Detection

Shijie Liu, Hongyu Zhou, Xiaozhou Shi, Junwen PanarXiv 2021

Abstract

In recent years, as the Transformer has performed increasingly well on NLP tasks, many researchers have ported the Transformer structure to vision tasks, bridging the gap between NLP and CV tasks. In this work, we evaluate some deep learning network for the detection track. Because the ground truth is mask, so we can try both the current detection and segmentation method. We select the DETR as our baseline through experiment. Besides, we modify the train strategy to fit the dataset.

Introduction

Early detection of polyps during colonoscopy is a critical step in preventing colorectal cancer. However, polyps are notoriously difficult to identify due to their wide variation in size, shape, and color, compounded by visual "noise" such as bubbles, fluid, and light reflections. Traditional computer vision models often struggle with this morphological diversity and the artifacts inherent in medical video.

This research explores the adaptation of the DEtection TRansformer (DETR) architecture for polyp detection. By moving away from traditional CNN-only approaches that rely on complex hand-crafted components like Non-Maximum Suppression (NMS) or anchor generation, the authors aim for a streamlined, end-to-end approach.

Methods

The proposed pipeline is based on the DETR architecture, which integrates a CNN backbone with a transformer encoder-decoder structure.

The DETR-based architecture for polyp detection, featuring a CNN backbone and a Transformer encoder-decoder.
  1. CNN Backbone: A ResNet50 extracts high-level features from input images, downsampling them by a factor of 32.
  2. Transformer Encoder-Decoder: The encoder reduces channel dimensions and flattens spatial dimensions, incorporating fixed positional encodings for spatial awareness. The decoder uses learned "object queries" to interact with the encoder's output, identifying potential polyps in parallel.
  3. Prediction Head: A Feed-Forward Network (FFN) with four fully connected layers decodes the output into bounding box coordinates and class labels.

Training involved multi-scale augmentation (resizing images from 288 to 416 pixels) and the Hungarian loss function for unique matching between predicted and ground-truth boxes. To handle clinical noise, the training suite included Gaussian blur, random sharpness, and color jittering.

Results and Insights

The model demonstrates resilience to common video artifacts like bubbles and specular highlights. By intentionally simulating noise during training, the transformer learns robust semantic features rather than relying on simple visual cues like high contrast.

Qualitative results showing successful polyp detection across various sizes and clinical conditions.

Key findings include:

  • Parallelism: The model predicts a fixed number of objects (100) in parallel, simplifying post-processing.
  • Qualitative Success: Detections were successful across small, medium, and large polyp categories.
  • Thresholding: A confidence score threshold of 0.3 was found to be effective for filtering final outputs, balancing sensitivity and precision.

Discussion

While the DETR-based approach shows promise, several areas remain for future exploration. The current study lacks a detailed quantitative comparison against other state-of-the-art polyp detectors like HarDNet. Additionally, the computational expense of transformers may pose challenges for real-time inference during live procedures. Future work should focus on testing the model's reliability across diverse, multi-center clinical datasets and optimizing for lower latency.

Summary updated

BibTeX
@misc{liu2021transformer,
  author = {Shijie Liu and Hongyu Zhou and Xiaozhou Shi and Junwen Pan},
  title = {{Transformer for Polyp Detection}},
  year = {2021},
  eprint = {2111.07918},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2111.07918},
}
Figure