Skip to main content
QUICK REVIEW

[论文解读] AdaAttN: Revisit Attention Mechanism in Arbitrary Neural Style Transfer

Songhua Liu, Tianwei Lin|arXiv (Cornell University)|Aug 8, 2021
Generative Adversarial Networks and Image SynthesisComputer Science参考文献 40被引用 26
一句话总结

AdaAttN 在任意风格迁移中引入自适应的逐点注意力归一化,结合浅层和深层特征来计算带注意力权重的风格统计量,并引入局部特征损失以提升局部质量。

ABSTRACT

Fast arbitrary neural style transfer has attracted widespread attention from academic, industrial and art communities due to its flexibility in enabling various applications. Existing solutions either attentively fuse deep style feature into deep content feature without considering feature distributions, or adaptively normalize deep content feature according to the style such that their global statistics are matched. Although effective, leaving shallow feature unexplored and without locally considering feature statistics, they are prone to unnatural output with unpleasing local distortions. To alleviate this problem, in this paper, we propose a novel attention and normalization module, named Adaptive Attention Normalization (AdaAttN), to adaptively perform attentive normalization on per-point basis. Specifically, spatial attention score is learnt from both shallow and deep features of content and style images. Then per-point weighted statistics are calculated by regarding a style feature point as a distribution of attention-weighted output of all style feature points. Finally, the content feature is normalized so that they demonstrate the same local feature statistics as the calculated per-point weighted style feature statistics. Besides, a novel local feature loss is derived based on AdaAttN to enhance local visual quality. We also extend AdaAttN to be ready for video style transfer with slight modifications. Experiments demonstrate that our method achieves state-of-the-art arbitrary image/video style transfer. Codes and models are available.

研究动机与目标

  • 推动对更具局部感知能力的任意风格迁移的需求,即在保留内容的同时捕捉局部风格模式。
  • 提出 AdaAttN,从浅层和深层特征中计算逐点带注意力权重的风格统计量。
  • 使用逐点统计量对内容特征进行归一化,以对齐带注意力权重的风格统计量。
  • 引入局部特征损失,以提升局部视觉质量并将该框架扩展到视频风格迁移。

提出的方法

  • 引入 AdaAttN 模块,它从拼接的浅层和深层内容/风格特征中学习注意力图。
  • 利用注意力分数计算风格特征的带注意力权重的均值和方差图。
  • 使用逐点的注意力加权统计量对内容特征进行归一化,以实现局部分布对齐。
  • 定义一个局部特征损失,用于监督逐点风格变换以提升局部保真度。
  • 通过引入基于余弦的注意力和图像级相似性损失将框架扩展到视频,以稳定时间一致性。

实验结果

研究问题

  • RQ1如何在保持内容结构的前提下,使用逐点、局部感知的统计量来改进任意风格迁移?
  • RQ2能否通过同时融合浅层和深层特征的注意力机制,比基于全局统计的方法更好地捕捉局部风格模式?
  • RQ3基于注意力的归一化结合局部特征损失,是否在视频风格迁移中实现更优的视觉质量和时序稳定性?

主要发现

  • AdaAttN 通过将内容特征与风格特征的带注意力权重的逐点统计量对齐,在任意图像风格迁移中实现了最先进的结果。
  • 该方法在转移局部风格模式的同时保持了内容结构,在定性评估中优于基线方法。
  • 局部特征损失提升了局部视觉质量,并与全局风格损失互补,带来更好的风格化效果。
  • 将框架扩展到视频风格迁移时,使用基于余弦的注意力能在不过度依赖光流的情况下提升时间稳定性。
  • 消融研究显示浅层特征的使用和局部特征损失对最终质量的重要性。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。