Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization(ICCV17)

1. Introduction

Perceptual Losses for Real-Time Style Transfer and Super-Resolution(ECCV16)

给定输入图像 x x x,经过一个网络得到 y y y,同时有一幅style image s s s,使用一个VGG19来计算loss,令 y y y的content与 x x x相似,同时令 y y y的style与 s s s相似

局限性在于训练得到一个网络,只能迁移style image s s s的风格,如果要换一幅style image,需要再训练一个网络

作者说IN是解决style transfer的一大利器,可能需要看一看文献[52,11]

作者对IN的作用提出了一种船新的解释,IN performs style normalization by normalizing feature statistics,而feature statistics被文献[16,30,33]证实包含了style信息

Given a content input and a style input, AdaIN simply adjusts the mean and variance of the content input to match those of the style input.
一句话总结AdaIN所做的事情

2. Related Work

之前的方法[19]采用histogram matching来做style transfer,不知道是不是和BeautyGAN中的一样,可以去看看

之前的工作研究了style loss如何设计,Gatys等人采用二阶统计量Gram matrix,其它的loss还有很多,见[30, 31, 54, 41, 33]

Note that all the above loss functions aim to match some feature statistics between the style image and the synthesized image.

3. Background

3.1. Batch Normalization

BN设计的目的是加速网络训练,但是[42]指出对于图像生成也有效,具体BN为图像生成带来了什么增益,可能要去读一读文献[42]

BN的计算方式

x: (N, C, H, W)
beta:(C,)
gamma:(C,)
mean_val = np.mean(x, axis=(0, 2, 3))	# C维向量
std_val = np.std(x, axis=(0, 2, 3))
result = gamma * (x - mean_val / std_val) + beta

文中指出了BN的一个缺点,训练时使用mini-batch的statistics,inference时使用popular statistics,这两个statistics之间必然存在着差异
Q:既然有缺点,那为什么大家还喜欢用?是因为没有比BN更好的Norm方式可用了,所以只能用BN了吗?

3.2. Instance Normalization

IN的计算方式

x: (N, C, H, W)
beta:(N, C)
gamma:(N, C)
mean_val = np.mean(x, axis=(2, 3))	# (N, C)
std_val = np.std(x, axis=(2, 3))
result = gamma * (x - mean_val / std_val) + beta

没有对N这个维度求平均,意味着保留了instance每个个体各自的statistics

因为IN与batch无关了,所以train和test时没有差别

3.3. Conditional Instance Normalization

CIN来自ICLR17

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值