Lightweight Frame Compensation for Real-Time Polyp Segmentation under Frame Skipping
Organizations: School of Computer Science and Artificial Intelligence, Guangdong University of Education, Guangzhou 510303, China
Abstract
Real-time polyp segmentation in computer-assisted colonoscopy is hampered by the difficulty of deploying high-accuracy models under strict latency budgets. Frame skipping, which performs inference every K frames and reuses or interpolates the rest, improves throughput but introduces motion blur and lesion misalignment that degrade temporal consistency. To close this gap, we propose the Lightweight Frame Compensator (LFC), a 77K-parameter plug-and-play module inserted before a frozen segmentation backbone. Operating on a three-frame window, LFC fuses consecutive frames via spatio-temporal attention into a single compensated frame, and is trained only on pseudo-labels generated by a differently seeded model, without any expert annotation. Experiments on three polyp video benchmarks show that LFC recovers most of the accuracy degraded by direct frame skipping and, in several settings, reaches the accuracy of frame-by-frame inference, while retaining a 2.05X--2.55X throughput gain. We further evaluate the temporal stability of three backbones spanning CNN, pyramid Transformer, and global-attention Transformer architectures, revealing a spectrum of sensitivity to frame skipping that arises from how locally or globally each architecture aggregates misaligned input. The compensation gain of LFC follows this spectrum: it is largest for high-capacity Transformer backbones, which achieve the best static accuracy but suffer the most under skip-frame inference. LFC thus offers a lightweight, pluggable, and deployment-friendly route to real-time polyp segmentation.
Figures & tables
| Dataset | Data Source | Task | Num. of Images / Videos | Usage |
|---|---|---|---|---|
| CVC-ClinicDB | Single-center, single-device | Polyp segmentation | 612 images | Development |
| Kvasir-SEG | Single-center, single-device | Polyp segmentation | 1,000 images | Development |
| PolypGen | Multi-center (6 institutions) | Polyp segmentation | 1,537 images | Development |
| PolypDB | Multi-modality (5 modalities) | Polyp segmentation | 3,934 images | Development |
| BKAI-IGH | Single-center, single-device | Polyp segmentation | 1,000 images | Development |
| VIM-Polyp | Single-center, video | Video-level pseudo-labeling | 133 videos (79/13/41) | Training / Val / Test |
| Model | Params (M) | Mixed Dataset | BKAI-IGH External | ||||
|---|---|---|---|---|---|---|---|
| DICE | IOU | HD95 | DICE | IOU | HD95 | ||
| Polyp-PVT | 25 | 0.9538 | 0.9189 | 25.27 | 0.9258 | 0.8735 | 24.40 |
| ResNet-UNet | 86 | 0.8730 | 0.7882 | 36.65 | 0.8260 | 0.7189 | 32.57 |
| TransUNet | 105 | 0.8896 | 0.8151 | 31.44 | 0.8484 | 0.7474 | 26.87 |
| Difficulty Breakdown | ||||||
|---|---|---|---|---|---|---|
| Dataset | Method | Easy | Medium | Hard | Overall | F |
| VIM-Polyp | FBF | 0.9666 | 0.8381 | 0.5195 | 0.6923 | — |
| DSF | 0.9317 | 0.7559 | 0.4565 | 0.6296 | -6.27 | |
| Linear | 0.9331 | 0.7573 | 0.4624 | 0.6334 | -5.89 | |
| EMA | 0.9194 | 0.7465 | 0.4653 | 0.6293 | -6.30 | |
| LFC | 0.9641 | 0.8430 | 0.5818 | 0.7265 | +3.42 | |
| Difficulty Breakdown | ||||||
|---|---|---|---|---|---|---|
| Dataset | Method | Easy | Medium | Hard | Overall | F |
| VIM-Polyp | FBF | 0.9516 | 0.8272 | 0.6303 | 0.7994 | — |
| DSF | 0.8964 | 0.7565 | 0.5478 | 0.7296 | -6.98 | |
| LFC | 0.9436 | 0.7953 | 0.5769 | 0.7677 | -3.17 | |
| HyperKvasir | FBF | 0.9640 | 0.8183 | 0.5616 | 0.7671 | — |
| DSF | 0.8741 | 0.7109 | 0.4911 | 0.6834 | -8.37 | |
| Difficulty Breakdown | ||||||
|---|---|---|---|---|---|---|
| Dataset | Method | Easy | Medium | Hard | Overall | F |
| VIM-Polyp | FBF | 0.9604 | 0.8102 | 0.5297 | 0.6580 | — |
| DSF | 0.9259 | 0.7422 | 0.4937 | 0.6160 | -4.20 | |
| LFC | 0.9299 | 0.7682 | 0.5275 | 0.6431 | -1.49 | |
| HyperKvasir | FBF | 0.9572 | 0.8373 | 0.3879 | 0.6358 | — |
| DSF | 0.8674 | 0.6980 | 0.3443 | 0.5640 | -7.18 | |
| Backbone | Method | Params (M) | FrameFPS | Speedup |
|---|---|---|---|---|
| TransUNet | FBF | 105.50 | 114.9 | 1.00 |
| DSF | 105.50 | 344.4 | 3.00 | |
| Linear | 105.50 | 343.3 | 2.99 | |
| EMA | 105.50 | 341.9 | 2.97 | |
| LFC | 105.57 | 292.8 | 2.55 | |
| Polyp-PVT | FBF | 25.10 | 208.7 | 1.00 |
| Backbone | VIM-Polyp | HyperKvasir |
|---|---|---|
| TransUNet | 0.2886 | 0.2429 |
| Polyp-PVT | 0.2673 | 0.1953 |
| ResNet-UNet | 0.2582 | 0.2445 |
| Configuration | VIM-Polyp | HyperKvasir |
|---|---|---|
| LFC (Full) | 0.7265 | 0.7063 |
| w/o Spatial Attention | 0.7241 | 0.7022 |
| w/o Fusion Head | 0.7013 | 0.7170 |
| Light (w/o Both) | 0.6714 | 0.6185 |
Polyp Segmentation
Polyp segmentation uses computer vision to delineate colorectal polyps in colonoscopy images and video for detection and clinical assessment.
See all 23 papers