TL;DR
This paper introduces DiffI2I, a novel diffusion model (DM) specifically designed for image-to-image translation (I2I) tasks. By focusing the diffusion process on a compact "Image-to-Image Prior Representation" (IPR) instead of the entire image, DiffI2I achieves state-of-the-art results with significantly reduced computational cost and fewer iterations compared to existing DM-based methods.
What Problem Does This Paper Address?
Diffusion Models (DMs) have shown remarkable success in image synthesis. However, their direct application to image-to-image translation (I2I) tasks, such as super-resolution or inpainting, faces challenges. Unlike pure synthesis, I2I often requires generating outputs that strictly adhere to ground truth (GT) images. Traditional DMs, by diffusing over entire images or feature maps, require extensive iterations and large models, leading to inefficiencies, artifacts, and high computational burdens, making them less suitable for these constrained I2I scenarios.
Methods
DiffI2I tackles this by introducing a three-component framework:
- Compact I2I Prior Extraction Network (CPEN): This network learns to extract a compressed "Image-to-Image Prior Representation" (IPR) from input and GT images. This IPR acts as a concise guide for the translation process.
- Dynamic I2I Transformer (DI2Iformer): A transformer-based architecture that leverages the extracted IPR as dynamic modulation parameters to effectively guide the image translation. It incorporates dynamic attention (DA) and dynamic feed-forward networks (DFFN) for this purpose.
- Denoising Network: A standard component for diffusion models, used here to estimate the IPR.
DiffI2I is trained in two stages:
- Stage 1 (Pretraining): CPEN and DI2Iformer are jointly trained. CPEN takes concatenated GT and input images to learn an effective IPR that guides DI2Iformer.
- Stage 2 (DM Training): The diffusion model is trained to estimate the IPR solely from the input image, using the pretrained CPEN. This stage focuses on efficient IPR estimation.
A key innovation is the joint optimization of the DM and the DI2Iformer. Unlike previous methods that separate these, DiffI2I allows for all diffusion iterations to be performed on the compact IPR, enabling tighter integration and improved accuracy, especially when dealing with minor estimation errors from the DM.
Datasets
The paper evaluates DiffI2I on a variety of I2I tasks, using the following datasets:
- Inpainting: Places [69] and CelebA-HQ [70]
- Real-world Super-Resolution: NTIRE2020 Track1 & Track2 [75], AIM2019 Track2 [76], and RealSRSet [77]
- Image Super-Resolution: DIV2K [84] and Flickr2K [90]
- Image Motion Deblurring: GoPro [93]
- Semantic Segmentation: ADE20K [108]
- Depth Estimation: NYU-Depth-v2 [116]
Key Insights and Ideas
- IPR as a Bottleneck for Efficiency: The core idea is that for I2I tasks requiring strict adherence to GT, a compressed representation (IPR) is sufficient to guide the translation, rather than processing the entire image. This significantly reduces computational load.
- Joint Optimization is Crucial: Separating the DM and the translation network (decoder) leads to performance degradation if the DM's output has minor errors. Jointly training them, especially on the compact IPR, allows for mutual refinement and better overall results.
- Diffusion on Latent Space for I2I: DiffI2I effectively applies diffusion principles to a learned latent space (the IPR) for I2I, rather than the pixel space, leading to efficiency gains.
- Transformer for Dynamic Guidance: The DI2Iformer, with its dynamic attention and feed-forward components, effectively utilizes the IPR to modulate its feature processing, enabling context-aware translation.
Key Results
- State-of-the-Art Performance: DiffI2I achieves SOTA performance across multiple I2I tasks, including inpainting, super-resolution, motion deblurring, semantic segmentation, and depth estimation.
- Massive Efficiency Gains: The paper reports an astonishing 3500x efficiency improvement over RePaint for inpainting. For real-world super-resolution, DiffI2I achieves significant PSNR and LPIPS improvements over LDM while using only 3.6% of the runtime.
- Reduced Computational Burden: DiffI2I uses significantly fewer parameters and runtime compared to other DM-based methods and even competitive GAN-based methods. For example, in inpainting, it uses only 4.5% of the parameters and 0.03% of the runtime of RePaint.
- Qualitative Improvements: Visual comparisons show DiffI2I generating more realistic and coherent structures with intricate details, outperforming existing methods.
Limitations and Future Work
- Two-Stage Training: The method involves a two-stage training process (pretraining CPEN/DI2Iformer, then training DM), which adds complexity.
- IPR Extraction Dependency: The performance of the DI2Iformer is dependent on the quality of the IPR extracted by CPEN.
- Future Work: The paper suggests extending the method to other I2I tasks and exploring further optimizations for efficiency. The ablation studies also hint at potential improvements by exploring different loss functions and iteration counts. The authors also mention that their work builds upon a preliminary version presented at ICCV 2023, indicating ongoing research in this area.
Summary updated