TL;DR
EndoIR is a new "all-in-one" diffusion-based framework designed to restore endoscopic images plagued by smoke, blood, and poor lighting without needing to know the degradation type in advance. By combining spatial-frequency feature extraction with a clever "noise-aware" routing system, it achieves state-of-the-art restoration quality while reaching speeds (up to 11 FPS) suitable for clinical use.
What Problem Does This Paper Address?
In the high-stakes environment of gastrointestinal diagnosis and surgery, clear visibility is non-negotiable. However, real-world endoscopic feeds are often a mess: surgical smoke obscures the view, bleeding creates "red-outs," and low-light conditions hide critical anatomical details.
Existing AI restoration methods usually suffer from three flaws:
- Task-Specificity: Most models are "one-trick ponies" (e.g., they only remove smoke) and fail when faced with multiple types of degradation.
- Feature Confusion: Many diffusion models simply "stack" the degraded image and the noisy input, which confuses the network and leads to unstable results.
- Computational Cost: Diffusion models are notoriously slow, making them difficult to deploy in real-time surgical settings where every millisecond counts.
Methods
The authors introduce EndoIR, which moves away from rigid, task-specific architectures toward a flexible, "degradation-agnostic" approach. Key innovations include:
- Dual-Domain Prompter (DDP): Instead of looking only at pixels (spatial domain), it uses Fast Fourier Transforms (FFT) to analyze the frequency domain. This helps the model identify "spectral signatures"—for example, smoke attenuates high frequencies, while blood creates localized low-frequency dominance.
- Task-Adaptive Embedding (TAE): This module uses a "soft voting" mechanism to disentangle shared anatomical structures from specific degradation cues, ensuring the model doesn't "hallucinate" or distort fine medical details.
- Dual-Stream Encoder & Rectified Fusion: Rather than merging inputs early, the model processes the clean and degraded features in separate streams, fusing them later via a modulated cross-attention mechanism to prevent feature confusion.
- Noise-Aware Routing Block (NARB): To boost speed, this block dynamically selects only the "top-k" most relevant feature channels at each denoising step. By ignoring redundant or noise-irrelevant data, the model saves significant computation time.
Datasets
The model was evaluated on two primary benchmarks:
- SegSTRONG-C: A dataset featuring three major endoscopic degradations: blood, low-brightness, and smoke.
- CEC (Capsule Endoscopy): A dataset focused on illumination correction, containing both underexposed and overexposed images.
- Downstream Validation: The restored images were also tested on surgical tool segmentation tasks to prove their clinical utility.
Key Insights and Ideas
- Frequency is a Cheat Code: The paper highlights that global structural integrity is often better captured in the frequency domain. Fusing FFT data with spatial data allows the model to "understand" the type of corruption without needing an explicit label (like "this is smoke").
- Sparsity for Speed: The "Noise-Aware Routing" proves that you don't need the full power of the neural network at every stage of the diffusion process. By selectively refining channels, they created a "lite" version ($\gamma=0.5$) that maintains high accuracy with a much higher frame rate.
- Stability through Separation: By treating the degraded image as a separate stream of information rather than just a "hint" tacked onto the noise, the model preserves fine textures (like lesion borders) much better than standard conditional diffusion models.
Key Results
- Superior Accuracy: EndoIR outperformed strong baselines like AMIR and PromptIR across all metrics. On the SegSTRONG-C dataset, it achieved a peak PSNR of 32.82 dB for low-light enhancement.
- Real-Time Potential: The optimized variant ($\gamma=0.5$) reached 11.18 FPS, nearly double the speed of other high-performing diffusion models like PyDiff (5.86 FPS), while using fewer parameters (21.3M vs 97.9M).
- Clinical Impact: Using EndoIR as a pre-processing step improved downstream surgical tool segmentation (Dice score) from roughly 91% to over 96%, demonstrating that better restoration leads to more reliable AI-assisted surgery.
Limitations and Future Work
While EndoIR is a major step forward, the authors acknowledge a few hurdles:
- Temporal Coherence: The current model processes images frame-by-frame. In a real surgery, the video feed needs to be smooth and consistent over time; future versions will likely incorporate temporal constraints.
- Complex Compounds: While it handles multiple degradations, the authors aim to further explore "multi-source compound" scenarios where smoke, blood, and low light all occur simultaneously in extreme ways.
Summary updated