Latent Diffusion(CVPR2022 oral)-论文阅读


论文: 《High-Resolution Image Synthesis with Latent Diffusion Models》
github: https://github.com/CompVis/latent-diffusion

摘要

为了使得DM在有限计算资源下训练,同时保留其生成质量及灵活性,作者将其应用于预训练编解码器的隐空间。基于表征训练扩散模型达到降低计算量及细节保留的最优点。作者引入cross-attention层,增强DM生成能力,在图像修复、条件图像生成、文本图像生成、无条件图像生成、超分取得新SOTA。

背景

扩散模型 VS. GAN
优点:扩散模型不存在GAN中模式坍塌以及训练不稳定问题
缺点:扩散模型训练(150 - 1000 V100 days)及推理(50k samples 5 days a A100)成本大;
现有扩散模型训练分为两阶段:
1、感知压缩阶段:移除高频信息但仍学到语义变化
2、生成模型学习语义压缩过的数据的语义和概念组成
作者训练自编码器提供低维表征空间,其余数据空间感知上等价。隐空间复杂度降低使得可通过简单网络进行高效图像生成。

本文贡献如下:
1、跟纯Transformer方法相比,本文方法更适用于高维数据,因此可以在压缩维度上提供逼真的细节重构,可以生成高分辨率图片;
2、在无条件图像生成、图像修复、超分领域达到有竞争力的表现,同时显著降低计算成本;
3、不需要精细调整模型重构及生成权重;
4、对于超分、图像修复等密集任务,本模型可以生成1024*1024分辨率图片;
5、基于cross-attention设计条件机制,可用于跨模态训练,比如类别条件、文本到图像生成、layout到图像

算法

为了降低计算量,作者将压缩与生成训练阶段分离,具体的:使用autoencoding模型学习感知上等价于图像空间的隐空间,降低计算复杂性。
该方法有以下好处:
1、扩散模型在低维空间采样,计算更加高效;
2、使用扩散模型从UNet结构获得的归纳偏置,对于有空间结构数据格外有效;
3、通用压缩模型的隐空间可用于训练多种生成模型用于其他采样应用。

3.1. Perceptual Image Compression

通过感知损失及基于patch的对抗损失训练autoencoder;
具体而言,对于图像 x ∈ R H × W × 3 x \in R^{H×W×3} xRH×W×3,编码器 ε \varepsilon ε 将其编码进隐空间 z ∈ R h × w × c z \in R^{h×w×c} zRh×w×c,解码器基于隐空间重构图像为 x ~ \tilde x x~
为避免隐空间高方差,作者使用两种不同正则化方法:
KL-reg,在可学习隐空间对标准归一化增加KL惩罚;
VQ-reg,在decoder中使用量化层;
隐空间z为二维结构,具有相对温和压缩率,达到更好重构效果。

3.2. Latent Diffusion Models

去噪自编码器 ϵ θ ( x t , t ) \epsilon_θ(x_t, t) ϵθ(xt,t),用于预测step t去噪后变体或者说所增加噪声,扩散模型目标函数如式1.
在这里插入图片描述
与高维像素空间相比,隐空间更适合基于似然估计的生成模型,因为:
1、关注数据重要语义信息;
2、在低维、计算高效空间训练;
隐空间扩散目标函数如式2,
在这里插入图片描述

3.3. Conditioning Mechanisms

为了将DM转变为灵活有条件图像生成器,通过交叉注意力机制(高效学习各种各样输入模态)增强潜在UNet主干。为了预处理输入条件y,作者通过特定编码器 τ θ τ_θ τθ将y映射为中间表征 τ θ ( y ) τ_θ(y) τθ(y),通过cross-attention层将其映射到UNet中间层,其中 φ i ( z t ) \varphi_i(z_t) φi(zt)为UNet中间表征,
在这里插入图片描述
有条件LDMM如图3所示,
在这里插入图片描述
基于图像条件对,学习有条件LDM,如式3,
在这里插入图片描述

实验

4.1. On Perceptual Compression Tradeoffs

图6表明低降采样率导致训练慢;过高降采样率导致失真。LDM-{4-16}在效率及感知真实性达到较好平衡;
在这里插入图片描述
图7表明LDM-{4-8}提供最佳生成高质量结果的条件;
在这里插入图片描述

4.2. Image Generation with Latent Diffusion

对于无条件生成256*256分辨率图像,表1表明在CelebA-HQ数据集达到SOTA,5.11;
在这里插入图片描述
图4展示生成结果
在这里插入图片描述

4.3. Conditional Latent Diffusion

表2表明在MS-COCO数据集文本引导图像生成任务,LDM使用较少参数,但是与最近扩散模型及自回归方法达到相近性能。LDM-KL-8-G表示classifier-free diffusion guidance
在这里插入图片描述
表3表明在ImageNet数据集基于类别有条件的图像生成任务,LDM超越SOTA方法ADM
在这里插入图片描述
图9表明即使在输入为256*256分辨率,也可生成高分辨率图像;
在这里插入图片描述

4.4. Super-Resolution with Latent Diffusion

表4表明LDM在LDDM-SR领域取得更佳效果;
在这里插入图片描述
表5表明LDM在FID上超越SR3,但是在IS上SR3更佳;
在这里插入图片描述

4.5. Inpainting with Latent Diffusion

表6展示在分辨率 256 ∗ 256 256*256 256256 512 ∗ 512 512*512 512512训练及抽样的吞吐量;
在这里插入图片描述
表7表明LDM在FID上优于LAMA,LPIPS上略差与LAMA。
在这里插入图片描述

限制

1、虽然LDM与基于像素空间扩散方法相比,降低计算需求,但仍慢于GAN。
2、LDM在像素空间精度准确难以实现;

结论

作者提出的LDM在不降低质量情况下,大幅提升扩散模型训练及采样效率。在多个有条件图像生成领域,不需要特定任务结构基于cross-attention有条件机制即可达到SOTA或接近SOTA效果。

  • 1
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
CVPR2018的oral论文合集。 包含以下论文: A Certifiably Globally Optimal Solution to the Non-Minimal Relative Pose Problem.pdf Accurate and Diverse Sampling of Sequences based on a “Best of Many” Sample Objective .pdf Actor and Action Video Segmentation from a Sentence .pdf An Analysis of Scale Invariance in Object Detection - SNIP .pdf Analytic Expressions for Probabilistic Moments of PL-DNN with Gaussian Input.pdf Are You Talking to Me_ Reasoned Visual Dialog Generation through Adversarial Learning .pdf Augmented Skeleton Space Transfer for Depth-based Hand Pose Estimation .pdf Bottom-Up and Top-Down Attention for Image Captioning and Visual Question Answering .pdf CodeSLAM — Learning a Compact, Optimisable Representation for Dense Visual SLAM .pdf Context Contrasted Feature and Gated Multi-scale Aggregation for Scene Segmentation.pdf Context Encoding for Semantic Segmentation.pdf Convolutional Neural Networks with Alternately Updated Clique .pdf Deep Layer Aggregation.pdf Deep Learning of Graph Matching.pdf DensePose Multi-Person Dense Human Pose Estimation In The Wild.pdf Density Adaptive Point Set Registration.pdf Detail-Preserving Pooling in Deep Networks.pdf Direction-aware Spatial Context Features for Shadow Detection .pdf Discriminative Learning of Latent Features for Zero-Shot Recognition .pdf DoubleFusion_Real-time Capture of Human Performance with Inner Body Shape from a Single Depth Sensor.pdf Efficient Optimization for Rank-based Loss Functions .pdf Egocentric Activity Recognition on a Budget .pdf Fast and Furious_Real Time End-to-End 3D Detection, Tracking and Motion Forecasting with a Single Convolutional Net.pdf Feature Space Transfer for Data Augmentation.pdf Finding It”_ Weakly-Supervised Reference-Aware Visual Grounding in Instructional Video” .pdf Finding Tiny Faces in the Wild with Generative Adversarial Network.pdf FlipDial_A Generative Model for Two-Way Visual Dialogue .pdf Group Consistent Similarity Learning via Deep CRFs for Person Re-Identification .pdf High-Resolution Image Synthesis and Semantic Manipulation with Conditional GANs .pdf Hybrid Camera Pose Estimation .pdf Illuminant Spectra-based Source Separation Using Flash Photography .pdf Im2Flow_Motion Hallucination from Static Images for Action Recognition .pdf Im2Pano3D_Extrapolating 360 Structure and Semantics Beyond the Field of View .pdf Improved Fusion of Visual and Language Representations by Dense Symmetric Co-Attention for Visual Question Answering .pdf Learning Face Age Progression_A Pyramid Architecture of GANs .pdf Learning to Find Good Correspondences .pdf Left-Right Comparative Recurrent Model for Stereo Matching .pdf MapNet_An Allocentric Spatial Memory for Mapping Environments.pdf Maximum Classifier Discrepancy for Unsupervised Domain Adaptation .pdf Neural Kinematic Networks for Unsupervised Motion Retargetting.pdf

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值