Exploiting Diffusion Prior for Task-driven Image Restoration

Jaeha Kim, Junghun Oh, Kyoung Mu Lee

TL;DR

This paper introduces EDTR, a novel Task-driven Image Restoration (TDIR) method that effectively leverages the powerful prior knowledge of pre-trained diffusion models. By carefully adapting the diffusion process and introducing tailored training losses, EDTR significantly improves performance on high-level vision tasks like classification, segmentation, and detection, even under severe, complex degradations, while also producing visually pleasing results.

What Problem Does This Paper Address?

High-level vision tasks (e.g., object detection, image classification) often suffer performance degradation when applied to low-quality (LQ) images. While image restoration (IR) can help, simply using standard IR as a preprocessing step isn't always effective for these tasks. Task-driven Image Restoration (TDIR) aims to improve IR specifically for these downstream tasks. However, existing TDIR methods struggle with real-world images that have multiple complex degradations, and they often fail to restore crucial task-relevant details. This paper addresses the challenge of effectively utilizing powerful natural image priors, like those from diffusion models, to restore these vital details for TDIR.

Methods

The core of EDTR lies in its novel adaptation of diffusion models for TDIR:

  • Pre-restoration and Partial Diffusion: Instead of starting the diffusion process from pure noise, EDTR first applies a pixel-error-based IR method (Rpix) to the LQ image. This "pre-restored" image is then used as the starting point for the diffusion process, with only mild noise added. This approach ensures that useful clues from the original LQ image are preserved and directly incorporated into the diffusion, rather than being lost in a pure noise generation.
  • Short-Step Denoising: Conventional diffusion models often use many denoising steps (e.g., 50) during inference. EDTR argues that for TDIR, this can introduce redundant details that dilute crucial task-relevant information. Therefore, EDTR employs a significantly reduced number of denoising steps (e.g., 1 or 4) during inference.
  • Tailored Training Losses: To guide the diffusion prior towards restoring task-relevant details and achieving visually appealing results even with short-step denoising, EDTR introduces two key losses:
  • High-Level Feature (HLF) Loss: This loss measures the feature distance between the EDTR-restored image and the ground truth high-quality (HQ) image, using features from both the trained task network and a pre-trained task network. This encourages the restored image to contain features that are important for the task.
  • Task Loss and Feature Matching (FM) Loss: The task loss directly optimizes the downstream task network using the EDTR-restored images. The FM loss further aligns the feature space of the trained task network with a pre-trained HQ network, acting as a form of cross-quality knowledge distillation.
  • Alternating Training: To mitigate training instability caused by backpropagating task losses through the diffusion model, EDTR trains the diffusion model and the task network in an alternating manner.

Datasets

The paper evaluates EDTR on standard datasets for three high-level vision tasks:

  • Image Classification: CUB200 [51]
  • Semantic Segmentation: PASCAL VOC2012 [12]
  • Object Detection: PASCAL VOC2012 [12]

Degradation types used include mixtures of downsampling, JPEG compression, blur, and noise, referred to as "Mixture-A" and "Mixture-B." The paper also tests generalization on unseen datasets like Tiny-ImageNet [23], CUB200 [51], and StanfordCars [22].

Key Insights and Ideas

  • Diffusion Priors Need Adaptation for TDIR: The paper strongly demonstrates that simply applying diffusion models (even with conditioning) to image restoration for downstream tasks is insufficient. The "pure generation" nature of diffusion, when not carefully controlled, can lead to visually plausible but task-irrelevant details.
  • Preserving LQ Clues is Crucial: Starting diffusion from pre-restored LQ images (rather than pure noise) is key to preserving essential information that might be lost in a standard diffusion process. This is a departure from typical diffusion-based IR.
  • Fewer Denoising Steps Can Be Better for TDIR: Counter-intuitively, reducing the number of denoising steps can improve task performance by preventing the introduction of distracting, redundant details. This highlights a trade-off between visual fidelity and task relevance.
  • Task-Specific Losses are Essential: Tailored losses like HLF and FM are critical for guiding the diffusion model to generate details that are specifically beneficial for the downstream vision task, rather than just general visual quality.

Key Results

  • Significant Task Performance Gains: EDTR achieves substantial improvements across all tested tasks. For object detection, it shows an approximate 50% increase in mAP (from 22.3% to 33.4% on Mixture-A). For classification, it improves accuracy by +2.9% and +5.4% over the previous state-of-the-art TDIR method (SR4IR [20]) on Mixture-A and Mixture-B, respectively. Semantic segmentation sees mIoU gains of +9.1% and +11.9%.
  • Superior Visual Quality: EDTR consistently achieves high scores on visual quality metrics like Q-Align, indicating perceptually pleasing results, even with short-step denoising.
  • Robustness to Complex Degradations: The method performs well on challenging "Mixture-B" degradations (downsampling, blur, noise, JPEG compression), outperforming previous methods.
  • Generalization: EDTR shows good generalization to unseen datasets and can be trained as an "All-in-One" model to handle multiple tasks simultaneously.

Limitations and Future Work

  • PSNR is Not the Best Metric for TDIR: The paper notes that EDTR does not always achieve the highest PSNR scores, suggesting that PSNR is a less relevant metric for TDIR compared to task-specific performance and visual quality metrics like Q-Align.
  • Training Instability: While addressed by alternating training, the paper acknowledges that backpropagating task losses through diffusion models can still pose training challenges.
  • Future Work: The authors anticipate that their approach will provide new insights into leveraging diffusion priors to enhance task performance, suggesting further exploration of diffusion model adaptations for TDIR. The success of the "All-in-One" model also points towards future work in developing more generalizable TDIR solutions.

Summary updated

BibTeX
@inproceedings{kim2025exploiting,
  author = {Jaeha Kim and Junghun Oh and Kyoung Mu Lee},
  title = {{Exploiting Diffusion Prior for Task-driven Image Restoration}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2025},
}
Figure