P2-YOLO12: Small Polyp Detection in Colonoscopy via Endoscopic Image Preprocessing and a High-resolution Detection Head
Abstract
Accurate polyp detection during colonoscopy is crucial yet challenging because polyps are often small, lowcontrast, and irregularly shaped. This study proposes P2-YOLO12, a polyp-detection framework that couples an integrated endoscopic image preprocessing pipeline with an architecture tailored to small objects. The pipeline sequentially applies Zero-Reference Deep Curve Estimation (Zero-DCE) to correct low illumination, Specular-Aware Inpainting (SAI) to remove endoscopic light reflections, and Discrete Wavelet Transform (DWT) to suppress noise while preserving polyp edges. For detection, a P2 detection head was added to the standard YOLO12 heads (P3, P4, P5); its higher-resolution feature map (stride 4) better captured the fine details and boundaries of small polyps. The method was evaluated on a leakage-controlled split of 3,837 in-distribution images (3,322 polyp-containing and 515 polyp-free frames; 3,681 polyp boxes) drawn from Kvasir-SEG, CVC-ClinicDB, and PolypGen, grouped by sequence for CVC-ClinicDB and PolypGen and split at the image level for Kvasir-SEG, with the fully held-out ETIS-LaribPolypDB dataset (196 images, 208 boxes) reserved for out-of-distribution testing. Across twenty-eight scenario ablations over four YOLO generations, the proposed P2-YOLO12 achieved a precision of 95.80%, recall of 93.15%, F1-score of 94.46%, mAP50 of 97.25%, and mAP50-95 of 71.85%, outperforming the YOLO12 baseline (mAP50 of 87.76%). Size-stratified evaluation showed that the P2 head raised the small-polyp average precision (AP_small) from 35.12% to 55.40% relative to the baseline. On the fully held-out, out-of-distribution ETIS-LaribPolypDB dataset, P2-YOLO12 retained an mAP50 of 85.25%, a 12.3% relative drop from in-distribution performance compared with a 22.0% drop for the baseline, whereas AP_small more than doubled from 18.75% to 43.75% relative to the baseline. These results indicate that integrating image preprocessing with the P2 detection head improves detection sensitivity, localization accuracy, and generalization to an unseen dataset for small, low-contrast polyps that are most prone to being missed in clinical colonoscopy.
// Source
Authors: Samsul Arifin, Nanik Suciati, Daffa Muhamad Azhar
Institutions: Institut Teknologi Sepuluh Nopember