arXiv:2610.31228cs.CVOct 2026

Manuscript Offprint

arXiv:2610.31228

Lightweight Frame Compensation for Real-Time Polyp Segmentation under Frame Skipping

Weihao Gao

Weihao Gao

School of Computer Science and Artificial Intelligence, Guangdong University of Education, Guangzhou 510303, China

weihaomeva@163.com

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 ∼\sim77K-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.05×−2.55×2.05\times-2.55\times 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.

Keywords: Polyp Segmentation · Frame Skipping · Temporal Compensation · Transformer · Real-Time Inference.

1 Introduction

Colorectal cancer remains one of the most prevalent and lethal malignancies worldwide, with a substantial proportion of cases arising from the malignant transformation of colorectal polyps [18]. Colonoscopy serves as the primary screening modality for these polyps, enabling direct visualization of lesion morphology and facilitating resection during the same procedure [20, 5]. However, the intricate anatomy of the colon, characterized by complex fold patterns and frequent luminal occlusion, contributes to non-negligible miss rates even in expert

Weihao Gao

hands. While recent work has explored image classification and object detection techniques to assist real-time video interpretation [1, 16, 22, 17], polyp segmentation offers a more granular level of assistance: it supplies pixel-level location and contour information, provides richer visual cues for intra-operative resection, and enables models to learn deeper pixel-wise representations that can benefit downstream diagnostic tasks [10]. Accurate and timely polyp segmentation is therefore essential for the early detection and management of colorectal cancer.

Nevertheless, polyp segmentation remains a challenging task. Polyps frequently exhibit indistinct boundaries and highly variable size, shape, and color distribution, endowing them with strong camouflage characteristics [15]. Traditional manual segmentation depends on the clinician's subjective experience and sustained attention, resulting in limited inter-observer consistency. Early computer-assisted methods predominantly exploited low-level features such as shape, texture, or color; although computationally efficient, their accuracy and robustness proved insufficient when the contrast between polyps and surrounding mucosa is low [3].

In recent years, convolutional neural networks (CNNs) have become the dominant paradigm in polyp segmentation, with U-Net standing out as the most representative architecture [19]. More recently, Transformer-based backbones have been introduced to this field and quickly became a strong alternative: TransUNet, which integrates self-attention into a U-shaped encoder-decoder framework, consistently outperforms its CNN counterparts on multiple polyp benchmarks [7], and task-specific designs such as Polyp-PVT [9] further push the accuracy frontier. However, the accuracy advantage of Transformer-based models comes with markedly higher computational overhead and latency, which poses a severe challenge for real-time deployment, where high frame-rate processing is required.

Meanwhile, real-time surgical video segmentation is not confined to colonoscopy polyp segmentation; it represents a broader clinical and engineering domain encompassing laparoscopic surgery, robotic-assisted intervention, and other video-guided procedures. At the system deployment level, a widely adopted strategy to improve GPU throughput, whether for multi-channel video streams or high-frame-rate processing, is frame skipping: rather than executing the full segmentation model on every frame, inference is performed every K frames, with the remaining frames filled by reuse or interpolation. This strategy can substantially increase throughput, but it introduces motion blur and lesion misalignment in segments involving rapid motion, instrument occlusion, or abrupt morphological changes, degrading temporal consistency and compromising real-time performance.

This problem is particularly pronounced for Transformer-based architectures. Unlike CNNs, whose convolution kernels inherently provide local spatial smoothing, Transformer models rely on self-attention with a global receptive field. Patch-level misalignments introduced by frame skipping propagate globally through attention, causing more severe frame-to-frame prediction jitter. Despite this, to our knowledge, no prior work has systematically quantified the temporal stability of different architectural families, from CNNs to pyramid and global-attention Transformers, under frame-skipping inference, nor has any lightweight compensation scheme been proposed to address the resulting accuracy loss.

To tackle these issues, this paper makes the following contributions:

– We propose the Lightweight Frame Compensator (LFC). LFC is a plug-and-play module with only ∼\sim77K parameters, inserted before a frozen segmentation backbone. Taking a window of three consecutive frames as input, it fuses them into a single compensated frame via spatio-temporal attention. Under a one-inference-per-three-frames regime, LFC recovers most of the accuracy loss caused by frame skipping and, in several settings, matches the accuracy of frame-by-frame inference, while being trained solely on pseudo-labels from a differently seeded model without any expert annotation.

– We achieve a better efficiency–accuracy trade-off. With a negligible increase of 0.07M parameters, LFC retains a 2.05×−2.55×2.05 \times -2.55 \times throughput gain over per-frame inference while substantially improving segmentation accuracy under frame skipping, providing a lightweight, pluggable, and deployment-friendly solution for real-time colonoscopy polyp segmentation.

– We systematically evaluate the temporal stability of three backbones under frame skipping. Spanning a CNN, a pyramid Transformer, and a global-attention Transformer, our analysis shows that the compensation gain of LFC is governed by two factors: the sensitivity of the backbone to frame-to-frame jitter artifacts, measured by the per-video standard deviation of frame-wise predictions, and the accuracy of the backbone itself. This spectrum explains why high-capacity Transformer models, despite their superior static accuracy, benefit from LFC the most.

References (22)