3. Proposed Method
3.1 Limitation of Skip Connections in AttGAN
StarGAN and AttGAN adopt encoder-decoder structure, where spatial pooling or downsampling are essential to obtain high level abstract representation for attribute manipulation. Unfortunately, downsampling irreversibly diminishes spatial resolution and fine details of feature map, which cannot be completely recovered by transposed convolutions and the results are prone to blurring or missing details.
StarGAN和AttGAN使用encoder-decoder结构,其中downsampling操作会损失空间上的细节信息,并且无法通过反卷积来恢复,因此生成图像往往会模糊
AttGAN在encoder和decoder之间增加skip connection,但作用仍然有限,作者并没有从理论上进行分析,而是通过实验验证了skip connection的局限性
考虑AttGAN的4个版本
- AttGAN-ED:不使用skip connection
- AttGAN:官方版本,使用1个skip connection
- AttGAN-2s:使用2个skip connection
- AttGAN-UNet:所有层都使用skip connection,相当于UNet
在某个人脸图像数据集上,令target attribute vector等于source attribute vector,进行人脸重构的任务,Table 1列举了重构的2个指标(PSNR/SSIM),Figure 3展示了重构的结果,可以看到skip connection确实使得人脸重构的效果变好了
现在进行另一个任务,首先在CelebA数据集上训练了一个识别13种attribute的分类器,平均正确率为94.5%,然后生成带有新的attribute的图像,将图像交给attribute分类器去识别,看能不能识别出新加的attribute,从而计算出attribute generate accuracy
Figure 3展示了4个模型的attribute generation accuracy,可以看到skip connection加得越多,attribute generation accuracy越低
综合以上的结论,增加skip connection,重构的图像质量确实会变好,但生成attribure的能力却变差了
3.2 Taking Difference Attribute Vector as Input
定义为source attribute vector,为target attribute vector
仅考虑source attribute vector和target attribute vector之间的差值,有3点好处
- 差值表示更简单,使得网络更容易训练
- 差值包含了哪些attribute需要/不需要编辑,attribute编辑的direction信息
- 差值更容易被用户提供,用户只需要指定改变哪些属性,以及改变的方向即可
3.3 Selective Transfer Units
作者提出一种更高级的skip connection,称为Selective Transfer Units,模型框架图如Figure 5所示
STU是在GRU的基础上进行改进
公式(2)~(7)
3.4 Network Architecture
STGAN包含2个网络:generator 、discriminator
其中包括encoder 和decoder ,包括判别网络和属性分类网络