Polyp Matching Using Deep Learning

Kristian Dalsbø Hindberg, Puneet Sharma, Benedicte Schelde-Olesen, Ulrik Deding, Jakob Frederik Frøkjær Justsen, Jan-Matthias Braun, Esmaeil S. NadimiarXiv 2026

This paper introduces a deep learning framework designed to solve a specific, high-stakes problem in medical imaging: polyp matching in colon capsule endoscopy (CCE). By using a Siamese neural network, the researchers have developed a way to determine if two different images depict the same polyp, a task that is surprisingly difficult for both humans and machines.

TL;DR

Researchers developed a Siamese neural network that identifies whether two colon capsule endoscopy images show the same polyp with up to 92% accuracy. This automated matching system could significantly reduce patient anxiety and healthcare costs by preventing the "over-counting" of polyps that leads to unnecessary follow-up procedures.

What Problem Does This Paper Address?

Unlike a traditional colonoscopy, where a doctor manually controls a camera, a colon capsule endoscopy (CCE) involves a patient swallowing a pill-sized camera. This capsule moves passively and often bidirectionally through the digestive tract. Because the capsule can tumble or drift backward, it frequently captures multiple images of the same polyp from different angles, distances, and lighting conditions.

The clinical challenge is "over-counting." If a clinician (or an AI detection algorithm) identifies the same polyp three times in a video, the patient might be scheduled for a follow-up surgical colonoscopy to remove three polyps that don't actually exist. This leads to wasted surgical time, increased risk for the patient, and unnecessary healthcare costs. Traditional tracking methods used in video (like optical flow) fail here because the capsule might revisit a polyp hours after the first sighting.

Methods

The authors propose a Siamese neural network architecture optimized via contrastive learning.

Figure 2: Network architecture of the proposed Siamese neural network with ResNet backbone and contrastive loss. Each input image (256x256 pixels, resized to 224x224 before processing) is independently fed through a shared backbone, producing a 128-dimensional embedding vector. During training, the cosine distance between the two embedding vectors is used to compute the contrastive loss, which pulls same-polyp pairs together and pushes different-polyp pairs apart. During inference, the cosine distance is compared against a learned threshold, where pairs below the threshold are classified as the same polyp and pairs above as different polyps.

Key technical components include:

  • Siamese Architecture: The model uses two identical "arms" (CNN backbones) with shared weights. Each arm processes one image into a 128-dimensional embedding vector.
  • Contrastive Loss: Instead of standard classification, the model is trained to minimize the distance between embeddings of the "same" polyp and maximize the distance (up to a defined margin) between "different" polyps.
  • Backbones: The researchers tested six different architectures: ResNet (18, 34, 50), DenseNet121, and EfficientNet (B0, B3).
  • Distance Metric: They utilized cosine distance to compare the embedding vectors, which is robust to variations in image intensity.

Datasets

The study utilized data from the Danish CareForColon2015 trial, involving 1,701 polyps from 722 patients.

  • Same-Polyp Pairs: 5,103 pairs were created using different views of the same polyp captured during a single passage.
  • Different-Polyp Pairs: 5,103 pairs were created by pairing images from different patients. This was a deliberate choice to ensure the "different" labels were ground-truth certain, as clinicians can sometimes misidentify different polyps within the same patient.
  • Splitting: Data was split at the patient level to ensure no images from the same patient appeared in both the training and testing sets, preventing data leakage.

Key Insights and Ideas

  • Architecture Agnosticism: One of the most striking findings was that performance was remarkably consistent across all six CNN backbones. This suggests that the contrastive learning framework itself—learning the relationship between images—is more critical than the specific depth or complexity of the feature extractor.
  • Visual Complexity: As shown in Figure 1, polyps can look vastly different due to "snow" (bubbles), varying degrees of bowel cleanliness, and extreme changes in perspective. The model's ability to maintain high accuracy despite these artifacts is a significant step forward.
  • Efficiency for Clinical Use: The model takes roughly 40 milliseconds to compare a pair of images on a standard laptop GPU. This speed makes it highly feasible to integrate into existing clinical workflows where thousands of image pairs might need checking.

Key Results

The experimental results were strong across the board:

  • Accuracy: Reached up to 92.25% (using ResNet34).
  • AUC (Area Under Curve): Reached up to 0.9804 (using ResNet50), indicating excellent discriminative power between same and different polyps.
  • Robustness: Even the smallest model (ResNet18) achieved over 91% accuracy, suggesting that high performance doesn't require massive computational overhead.
Training and validation loss curves showing early stopping.

As seen in the training curves (Figure 3), the models converged quickly, with early stopping (marked in red) effectively preventing overfitting.

Limitations and Future Work

The authors identify several areas for improvement:

  • Temporal Gap: In this study, "same-polyp" images were taken relatively close together in time. In a real clinical setting, a capsule might see a polyp, travel further down the colon, and then drift back hours later. Future work needs to test the model on pairs with much larger time separations.
  • Image Quality Bias: The current dataset only included polyps where clinicians were able to export five clear images. This might exclude the "messiest" or most difficult-to-see polyps found in practice.
  • From Pairs to Sets: The current model compares two images. A more advanced system might compare a new image against a "gallery" of all previously seen polyps in that patient's procedure.

Summary updated

Abstract

A key challenge in colon capsule endoscopy (CCE) analysis is accurately identifying whether multiple images depict the same polyp, which is critical to avoid over-counting and unnecessary clinical interventions. Additionally, this prevents prolonged follow-up colonoscopies where endoscopists search for duplicate polyps without precise localization. This study presents a novel contrastive learning-based approach to polyp matching using a Siamese neural network architecture. The model was trained on a dataset from the Danish CareForColon2015 trial. The dataset comprises 5,103 image pairs of confirmed same polyp and 5,103 pairs of different polyps, annotated by experienced clinicians. The proposed model employs ResNet variants (ResNet18, ResNet34, ResNet50), DenseNet121 and EfficientNet B0/B3 as backbones and utilizes contrastive learning with cosine vector distance metric for classification. Experimental results demonstrate high classification accuracies of up to 92% and AUC values close to 0.98. These results suggest that automated polyp matching has the potential to reduce polyp over-counting, improve patient risk stratification, and reduce unnecessary follow-up colonoscopies.
BibTeX
@misc{hindberg2026polyp,
  author = {Kristian Dalsbø Hindberg and Puneet Sharma and Benedicte Schelde-Olesen and Ulrik Deding and Jakob Frederik Frøkjær Justsen and Jan-Matthias Braun and Esmaeil S. Nadimi},
  title = {{Polyp Matching Using Deep Learning}},
  year = {2026},
  eprint = {2611.04624},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.04624},
}
Figure