paper: Huang, Xun, and Serge Belongie. “Arbitrary style transfer in real-time with adaptive instance normalization.” ICCV 2017.
论文首先回顾了Batch Normalization和Instance Normalization
1. Batch Normalization
NHW
对每个channel (或者hidden unit),对输入的一个minibatch求这个channel (或者hidden unit)上的均值和方差。
每个channel上都需要学习两个参数:gain和bias用于进行仿射变换。
2. Instance Normalization
IN
对每个channel (或者hidden unit),对输入的一个样本求这个channel (或者hidden unit)上的均值和方差。
每个channel上都需要学习两个参数:gain和bias用于进行仿射变换。
3. Adain Normalization
AdaIN receives a content input x and a style input y, and simply aligns the channelwise mean and variance of x to match those of y.
x
x
x为内容输入,
y
y
y为风格输入。对于每个channel,将
x
x
x的均值和方差与
y
y
y对齐。
归一化方式与instance norm一样,仿射变换与instance也一样,只不过weight和bias是赋值过来而不是学习过来的。
Instance、Adain、Layer、Batch Normalization中只有Batch Normalization需要维护running_mean作为模型参数。
4. overall diagram
f f f是encoder, g g g是decoder
5. 训练损失函数
5.1 content loss L c L_c Lc
5.2 style loss L s L_s Ls
其中 u u u和 σ \sigma σ代表均值和标准差, ϕ i \phi_i ϕi是指经过预训练的VGG-19网络的某一层提取的特征。
AdaIN normalization的作用:
文章对norm和batch norm进行了对比,发现就style loss而言,图(a) (b) 中使用IN norm 明显优于使用batch norm (style loss较低)。但是图像经过了style normalization之后再来对比( 图(c)),IN和batch的差距变得微乎其微。文章想通过这个实验证明instance normalization的作用是对特征的统计特性进行normalization。文章还解释了微小的差异是由于训练之前对图像进行的style normalization实施的不够完美。
Our results indicate that IN does perform a kind of style normalization.
我们的实验表明了IN normalization 实施了一种style normalization。
we argue that instance normalization performs a form of style normalization by normalizing feature statistics, namely the mean and variance.
感觉文章这一段挺重要的,简略翻译一遍:
众所周知,深度神经网络卷积特征的统计特性可以反映出一幅图像的风格特征。
Gatys使用二阶统计量作为他们的优化目标(我们知道是格拉姆矩阵)。Li 最近证明了匹配一些其它的统计量也能对风格迁移起效,例如:逐通道均值和方差。受到这些观察结果的启发,我们认为IN norm通过对特征统计量的normalization起到了一个风格normlization的效果。虽然深度神经网络起到了一个图像描述符的作用,我们相信生成网络的特征的统计量仍然可以控制生成图像的风格。