Abstract
This paper introduces Deep Generative Prior (DGP), a novel framework that leverages the rich semantic knowledge embedded within pre-trained Generative Adversarial Networks (GANs) for diverse image restoration and manipulation tasks. By allowing the generator to be fine-tuned on-the-fly through a discriminator-guided, progressive strategy, DGP overcomes the limitations of traditional fixed-generator inversion. This approach enables state-of-the-art performance in tasks such as colorization, inpainting, and complex semantic morphing on real-world images, even those outside the original training domain.
Introduction
Image restoration tasks, such as super-resolution or colorization, fundamentally require an "image prior"—a model of natural image statistics. Traditional methods often rely on hand-crafted priors (e.g., Total Variation) which fail to capture complex textures, or Deep Image Priors (DIP) which capture low-level statistics but lack high-level semantic understanding. While GAN inversion attempts to use pre-trained generators as priors, fixed generators often fail to reconstruct the fine details of complex, real-world images due to the inherent gap between the GAN's learned manifold and reality.
The authors propose DGP to bridge this gap, asking how the massive knowledge within a pre-trained GAN (like BigGAN) can be utilized to restore real images without being constrained by the generator's original fixed weights.
Methodology
The core innovation of DGP is a "relaxed" approach to GAN inversion. Instead of keeping the generator fixed, the model fine-tunes the generator for every specific input image. To prevent the generator from "forgetting" natural image manifolds during this process, two key techniques are employed:
- Discriminator-Guided Fine-tuning: Rather than relying solely on pixel-wise loss (MSE), DGP utilizes a feature matching loss derived from the GAN’s own discriminator. Since the discriminator was trained to distinguish real from fake, its internal features serve as an ideal regularizer to keep the fine-tuned output realistic.
- Progressive Reconstruction: To avoid "information lingering"—where the model prioritizes low-level textures over global structure—the generator is fine-tuned progressively. Optimization begins at the shallowest layers (responsible for global structure) and moves toward the deepest layers (responsible for fine details).
To solve specific tasks, a degradation transform $\phi$ is defined (e.g., downsampling for super-resolution). The system then optimizes both the latent code $z$ and the generator parameters $\theta$ to minimize the difference between the degraded output $\phi(G(z; \theta))$ and the input image.
Experimental Evaluation
The authors primarily utilize BigGAN pre-trained on ImageNet. Evaluation is conducted on the 1k ImageNet validation set to ensure the model handles unseen data. To test generalization, the prior is also applied to images from the Places dataset and miscellaneous internet images (e.g., raccoons, windows) that fall outside the original ImageNet categories.
Key Results and Insights
- Superior Reconstruction: DGP significantly outperforms previous GAN inversion methods, achieving a PSNR of 32.89 on ImageNet, compared to 22.49 for previous state-of-the-art methods.
- Robust Restoration: In inpainting tasks with large missing regions, DGP maintains spatial coherence far better than DIP (SSIM of 45.89 vs. 29.37). In colorization, it produces semantically accurate results that improve downstream ResNet-50 classification accuracy to 62.8%.
- Semantic Manipulation: Because the generator retains its GAN properties, users can perform "Category Transfer." For instance, a reconstructed dog can be morphed into a "Red Panda" by changing the class input, resulting in a realistic transformation that preserves the original pose and background.
- Adversarial Defense: DGP can "purify" images by reconstructing them through the generative prior, filtering out adversarial perturbations and restoring classification accuracy from 1.4% to 41.3%.
Conclusion and Future Work
DGP demonstrates that the discriminator is an underutilized resource that can act as a specialized teacher for image restoration. While highly effective and task-agnostic, the method's primary limitation is computational cost, as it requires per-image fine-tuning. Future work will focus on optimizing these paths to speed up the on-the-fly adaptation process. Additionally, while DGP generalizes well, its performance remains somewhat dependent on the diversity of the underlying GAN's training data.
Summary updated