EndoIR: Degradation-Agnostic All-in-One Endoscopic Image Restoration via Noise-Aware Routing Diffusion

Tong Chen, Xinyu Ma, Long Bai, Wenyang Wang, Yue Sun, Luping Zhou · DOI

Abstract

Endoscopic imaging is frequently compromised by environmental factors such as surgical smoke, bleeding, and poor illumination, which hinder clinical diagnosis and surgical precision. Existing restoration methods often struggle with task-specificity, feature confusion in diffusion models, and high computational overhead. We present EndoIR, a degradation-agnostic "all-in-one" diffusion framework. EndoIR leverages a Dual-Domain Prompter to capture spatial-frequency signatures and a Noise-Aware Routing Block to optimize inference speed. Our framework achieves state-of-the-art restoration quality while maintaining clinical-grade frame rates (up to 11 FPS), significantly improving downstream tasks like surgical tool segmentation.

Introduction

In gastrointestinal diagnosis and surgery, clear visibility is paramount. However, real-world endoscopic feeds are often obscured by surgical smoke, "red-outs" from bleeding, and low-light conditions. Current AI solutions typically face three major challenges: they are often limited to a single degradation type (task-specificity), they suffer from feature confusion when integrating degraded inputs into diffusion processes, and they are computationally expensive, preventing real-time application. EndoIR addresses these issues by providing a flexible, efficient, and robust restoration pipeline.

Methods

EndoIR moves away from rigid architectures toward a flexible, degradation-agnostic approach. The architecture consists of several key innovations:

  • Dual-Domain Prompter (DDP): Utilizes Fast Fourier Transforms (FFT) to analyze frequency domains alongside spatial pixels, identifying "spectral signatures" (e.g., smoke attenuating high frequencies) without explicit labels.
  • Task-Adaptive Embedding (TAE): Employs a soft voting mechanism to disentangle shared anatomical structures from specific degradation cues, preventing hallucinations.
  • Dual-Stream Encoder & Rectified Fusion: Processes clean and degraded features in separate streams to avoid early-stage feature confusion, fusing them later via modulated cross-attention.
  • Noise-Aware Routing Block (NARB): Dynamically selects the most relevant feature channels during denoising to reduce computational load and boost speed.
The overall architecture of EndoIR, featuring the Dual-Stream Encoder, Rectified Fusion Block, and specialized modules like the Dual-Domain Prompter and Noise-Aware Routing Block.

Results and Clinical Impact

EndoIR was evaluated on benchmarks including SegSTRONG-C and CEC. It consistently outperformed baselines like AMIR and PromptIR. Notably, on SegSTRONG-C, it achieved a peak PSNR of 32.82 dB for low-light enhancement.

Efficiency is a core strength of the framework. As shown in the performance analysis, the optimized EndoIR ((\gamma=0.5)) variant reached 11.18 FPS, nearly doubling the speed of comparable diffusion models like PyDiff (5.86 FPS) while using significantly fewer parameters (21.3M vs 97.9M).

Performance comparison of EndoIR against other state-of-the-art methods, showing the trade-off between Average SSIM, Average PSNR, FPS, and model parameters.

Beyond visual metrics, the clinical utility was validated through downstream tasks. Using EndoIR as a pre-processing step for surgical tool segmentation increased the Dice score from approximately 91% to over 96%, demonstrating that better restoration leads to more reliable AI-assisted surgery.

Conclusion

EndoIR represents a significant advancement in endoscopic image restoration by combining frequency-aware feature extraction with efficient routing mechanisms. While the current model operates frame-by-frame, future work will focus on incorporating temporal coherence for video streams and handling complex compound degradations where multiple artifacts occur simultaneously.

Summary updated

BibTeX
@inproceedings{chen2026endoir,
  author = {Tong Chen and Xinyu Ma and Long Bai and Wenyang Wang and Yue Sun and Luping Zhou},
  title = {{EndoIR: Degradation-Agnostic All-in-One Endoscopic Image Restoration via Noise-Aware Routing Diffusion}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2026},
  doi = {10.1609/aaai.v40i4.37297},
}
Figure