NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

PromptIR: Prompting for All-in-One Image Restoration

Vaishnav Potlapalli, Syed Waqas Zamir, Salman Khan, Fahad KhanNeurIPS 2023

TL;DR

PromptIR is a novel "all-in-one" framework that uses learnable prompts to restore images affected by various unknown degradations like noise, rain, or haze. By integrating a lightweight, plug-and-play prompt module into a standard restoration network, it achieves state-of-the-art results without needing to know the specific type of corruption beforehand.

The Challenge of Real-World Image Restoration

Traditional image restoration models are "specialists"—you train one model for denoising, another for deraining, and a third for dehazing. In the real world, this is highly impractical. A smartphone camera, for instance, doesn't know which "specialist" to call unless it can perfectly identify the corruption first.

Existing "all-in-one" attempts often rely on complex two-stage training or contrastive learning (like the previous state-of-the-art, AirNet) to distinguish between degradations. However, these methods often struggle to fully disentangle different types of corruption and carry a heavy computational burden. The challenge is to create a single, unified model that is "blind" (requires no prior knowledge of the corruption) yet "adaptive" (adjusts its behavior based on the specific input).

PromptIR Overview

Introducing PromptIR

To address this, the authors introduce PromptIR (Prompting for Image Restoration). The core idea is to use prompts—a set of small, tunable parameters—to encode discriminative information about various degradations.

Key Architectural Components

PromptIR uses a 4-level hierarchical UNet-style encoder-decoder architecture. The prompt blocks are strategically placed in the decoding stages to enrich the features with degradation-specific knowledge during the reconstruction process.

PromptIR Architecture

The core innovation is the Prompt Block, a plug-in module consisting of two main parts:

  • Prompt Generation Module (PGM): This dynamically predicts weights based on the input image features. It uses these weights to combine a set of "Prompt Components" (learnable vectors) into a single, input-conditioned prompt. This allows the model to dynamically "recognize" the context of the degradation.
  • Prompt Interaction Module (PIM): This takes the generated prompt and uses it to guide the main restoration network. It uses a Transformer-based architecture to allow the prompt to interact with the image features, effectively telling the network how to adjust its weights for the specific task at hand.

Datasets and Evaluation

The model was evaluated on several standard benchmarks for three primary tasks:

  • Denoising: BSD400 and WED for training; BSD68 and Urban100 for testing (with Gaussian noise levels $\sigma \in \{15, 25, 50\}$).
  • Deraining: Rain100L (200 training pairs, 100 testing pairs).
  • Dehazing: SOTS dataset (part of the RESIDE benchmark), containing over 72,000 training images.

For the "All-in-One" setting, the authors combined these datasets to train a single unified model.

Key Insights and Results

  • Superior Performance: In the All-in-One setting, PromptIR outperformed AirNet by an average of 0.86 dB across all tasks.
  • Massive Dehazing Gains: The most significant improvement was in dehazing, where PromptIR achieved a 2.64 dB PSNR boost over the previous best method.
  • Robust Generalization: When tested on "unseen" noise levels (e.g., training on $\sigma=50$ but testing on $\sigma=100$), PromptIR maintained a massive ~7 dB lead over AirNet. This demonstrates that it truly learns the underlying physics of restoration rather than just memorizing noise patterns.
  • Implicit Recognition: Unlike models that explicitly try to classify the degradation, PromptIR learns an implicit "context." Visualizations of the prompt embeddings in the paper show that they naturally cluster by degradation type, proving the model learns to distinguish tasks without explicit supervision.
  • Plug-and-Play Versatility: The prompt block is architecture-agnostic. While the authors used Restormer as their backbone, the module can theoretically be dropped into any existing restoration network.
  • Decoder-Side Guidance: A key finding in their ablation studies was that placing prompt blocks in the decoder is more effective than the encoder. This suggests that providing "hints" during the high-level reconstruction phase is more valuable than during the initial feature extraction.

Limitations and Future Work

While highly effective, the current study focuses primarily on three main degradations (noise, rain, haze). The authors express intent to extend this to a broader set of real-world corruptions, such as motion blur or compression artifacts. Furthermore, like many papers in this field, much of the training relies on synthetic degradations. Testing on "in-the-wild" images with unknown, non-linear sensor noise remains an important frontier. Finally, while the prompts are lightweight, the underlying Restormer backbone is computationally intensive. Future work might explore combining PromptIR with more mobile-friendly, lightweight backbones for edge device deployment.

Summary updated

BibTeX
@inproceedings{potlapalli2023promptir,
  author = {Vaishnav Potlapalli and Syed Waqas Zamir and Salman Khan and Fahad Khan},
  title = {{PromptIR: Prompting for All-in-One Image Restoration}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=KAlSIL4tXU},
}
Figure