Attention-based arbitrary style transfer studies have shown promising performance in synthesizing vivid local style details. They typically use the all-to-all attention mechanism: each position of content features is fully matched to all positions of style features. However, all-to-all attention tends to generate distorted style patterns and has quadratic complexity. It virtually limits both the effectiveness and efficiency of arbitrary style transfer. In this paper, we rethink what kind of attention mechanism is more appropriate for arbitrary style transfer. Our answer is a novel all-to-key attention mechanism: each position of content features is matched to key positions of style features. Specifically, it integrates two newly proposed attention forms: distributed and progressive attention. Distributed attention assigns attention to multiple key positions; Progressive attention pays attention from coarse to fine. All-to-key attention promotes the matching of diverse and reasonable style patterns and has linear complexity. The resultant module, dubbed StyA2K, has fine properties in rendering reasonable style textures and maintaining consistent local structure. Qualitative and quantitative experiments demonstrate that our method achieves superior results than state-of-the-art approaches.
翻译:以专注为基础的任意风格转移研究在综合生动的当地风格细节方面表现出了很有希望的业绩,它们通常使用全对全注意机制:每个内容特征的位置都与所有风格特征的位置完全匹配;然而,所有关注都往往产生扭曲的样式模式,具有四面形的复杂性,实际上限制了任意风格转移的效力和效率。在本文件中,我们重新思考哪种关注机制更适合任意风格转移。我们的答案是一个全对称关注机制:每个内容特征的位置都与风格特征的关键位置相匹配。具体地说,它融合了两种新提出的关注形式:分布式和渐进式关注。分散关注对多个关键位置的关注;逐渐关注从粗略到细微。全对关注促进了不同和合理风格模式的匹配,并且具有线性复杂性。由此形成的模块,即所谓的StyA2K,在提供合理风格文本和保持地方结构一致性方面,具有良好的特性。定性和定量实验表明,我们的方法取得了优于州式方法的结果。