← All work

Research project

AI-Driven Capsule Endoscopy

YOLOv11Computer VisionPyTorchMedical Imaging

A single Wireless Capsule Endoscopy procedure produces somewhere between 50,000 and 60,000 frames, and someone has to look at nearly all of them. That review currently takes about eight days per patient. This project asks a narrower question: how much of that eight days is actually necessary, and how much is just the bottleneck of human eyes on frames that are mostly unremarkable.

The answer, or at least an attempt at one, is a YOLOv11 pipeline trained on WCEBleedGen — 2,618 frames split evenly between bleeding and non-bleeding — that classifies, detects, and segments bleeding regions in a single pass. YOLOv11's architecture does the heavy lifting: a C3k2 backbone for efficient feature extraction, SPPF for multi-scale pooling, and a C2PSA attention block in the neck that learns to look where the bleeding actually is rather than scanning the whole frame uniformly. Preprocessing — adaptive histogram equalization for contrast, Gaussian filtering for the noise WCE images are notorious for — matters almost as much as the model itself.

The numbers hold up: 97.4% average precision with 98.6% recall on classification, a 0.678 mAP@0.5 on bounding-box detection, and a 0.798 mask mAP@0.5 on segmentation — the number I actually care about most, since a bounding box tells a clinician "something's here" while a mask tells them where to look first. Paired with real-time triaging that surfaces the clinically significant frames instead of the routine ones, the goal is to take that eight-day reporting window down to hours — not by replacing the review, but by pointing it at the right 2% of frames.

Frame triage dial

Adjust the sensitivity threshold for bleeding detection and see how it changes review load and precision.

62%
Frames flagged 13.4%
Precision 85.6%