Skip to main content
QUICK REVIEW

[论文解读] Anycost GANs for Interactive Image Synthesis and Editing

Ji Lin, Richard Zhang|arXiv (Cornell University)|Mar 4, 2021
Generative Adversarial Networks and Image Synthesis参考文献 79被引用 8
一句话总结

本文提出 Anycost GAN,一种单一生成器架构,支持可变分辨率和自适应通道推理,用于交互式图像生成与编辑。通过使用参数共享、分阶段优化以及生成器条件判别器进行统一训练,该方法在 CPU 上实现高达 11.9× 的加速,在边缘 GPU 上实现 8.5× 的加速,同时与完整模型相比质量损失极小,实现了感知一致的预览效果。

ABSTRACT

Generative adversarial networks (GANs) have enabled photorealistic image synthesis and editing. However, due to the high computational cost of large-scale generators (e.g., StyleGAN2), it usually takes seconds to see the results of a single edit on edge devices, prohibiting interactive user experience. In this paper, we take inspirations from modern rendering software and propose Anycost GAN for interactive natural image editing. We train the Anycost GAN to support elastic resolutions and channels for faster image generation at versatile speeds. Running subsets of the full generator produce outputs that are perceptually similar to the full generator, making them a good proxy for preview. By using sampling-based multi-resolution training, adaptive-channel training, and a generator-conditioned discriminator, the anycost generator can be evaluated at various configurations while achieving better image quality compared to separately trained models. Furthermore, we develop new encoder training and latent code optimization techniques to encourage consistency between the different sub-generators during image projection. Anycost GAN can be executed at various cost budgets (up to 10x computation reduction) and adapt to a wide range of hardware and latency requirements. When deployed on desktop CPUs and edge devices, our model can provide perceptually similar previews at 6-12x speedup, enabling interactive image editing. The code and demo are publicly available: https://github.com/mit-han-lab/anycost-gan.

研究动机与目标

  • 通过降低高保真 GAN 的推理延迟,实现在资源受限设备上的交互式图像编辑。
  • 训练单一生成器,使其在无需微调或重新训练的情况下支持多种计算预算。
  • 在图像投影与编辑过程中,保持不同分辨率和通道数的子生成器之间的感知一致性。
  • 在共享权重和多样化子架构的多玩家 GAN 设置中稳定训练过程。
  • 开发编码器与优化技术,确保在不同生成器配置下潜在代码映射的一致性。

提出的方法

  • 训练一个统一的生成器,其子生成器在不同分辨率和通道数下共享权重,从而实现在任意成本预算下的直接推理。
  • 采用分阶段训练:首先在全通道下训练多分辨率子生成器,然后自适应地减少通道数。
  • 引入基于生成器的条件判别器,使其监督策略根据子生成器的架构自适应调整。
  • 应用基于采样的多分辨率训练和自适应通道训练,以在多样化配置下稳定优化过程。
  • 开发感知一致性编码器训练方法,最小化全生成器与子生成器的重建损失。
  • 使用 L-BFGS 进行迭代潜在代码优化,初始化值来自编码器输出,以提升投影保真度。

实验结果

研究问题

  • RQ1是否可以训练单一 GAN 生成器,在支持多种推理成本的同时保持感知一致性?
  • RQ2当多个具有共享权重的子生成器共存于极小化-极大化优化框架中时,如何稳定对抗训练?
  • RQ3子生成器在交互式编辑过程中作为全生成器预览的代理,在多大程度上是准确的?
  • RQ4感知一致性编码器训练在多大程度上提升了不同生成器配置下的图像投影精度?
  • RQ5在 CPU 和边缘设备上,推理延迟可实现多大程度的加速,同时保持视觉质量?

主要发现

  • Anycost GAN 在 Intel Xeon CPU 上实现高达 11.9× 的实际运行时间加速,在 NVIDIA Jetson Nano GPU 上实现 8.5× 的加速,输出结果感知一致。
  • 该模型在 Xeon CPU 上实现 12.2× 的加速,在 Jetson Nano 上实现 8.5× 的加速,CPU 上的超线性加速得益于缓存效率。
  • 感知一致性编码器训练将全生成器与子生成器重建结果之间的 LPIPS 差距从 0.07 降低至 0.02,显著提升了投影一致性。
  • 图像编辑结果表明,全生成器与子生成器在属性变化(如微笑、发色)方面保持一致,验证了跨配置的可靠性。
  • 该方法在图像质量和一致性方面均优于知识蒸馏压缩和独立小生成器训练方法。
  • 进化式搜索在不同计算预算下识别出最优子生成器,在保持高保真度的同时实现超过 10× 的计算量变化。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。