Recent advances in deep generative adversarial networks (GAN) and self-attention mechanism have led to significant improvements in the challenging task of inpainting large missing regions in an image. These methods integrate self-attention mechanism in neural networks to utilize surrounding neural elements based on their correlation and help the networks capture long-range dependencies. Temperature is a parameter in the Softmax function used in the self-attention, and it enables biasing the distribution of attention scores towards a handful of similar patches. Most existing self-attention mechanisms in image inpainting are convolution-based and set the temperature as a constant, performing patch matching in a limited feature space. In this work, we analyze the artifacts and training problems in previous self-attention mechanisms, and redesign the temperature learning network as well as the self-attention mechanism to address them. We present an image inpainting framework with a multi-head temperature masked self-attention mechanism, which provides stable and efficient temperature learning and uses multiple distant contextual information for high quality image inpainting. In addition to improving image quality of inpainting results, we generalize the proposed model to user-guided image editing by introducing a new sketch generation method. Extensive experiments on various datasets such as Paris StreetView, CelebA-HQ and Places2 clearly demonstrate that our method not only generates more natural inpainting results than previous works both in terms of perception image quality and quantitative metrics, but also enables to help users to generate more flexible results that are related to their sketch guidance.
翻译:深层基因对抗网络(GAN)和自留机制的最近进步导致在以图像绘制大缺失区域图的艰巨任务方面有了重大改进。这些方法将神经网络的自留机制结合到神经网络中,以利用基于相关性的神经元素,帮助网络获得远程依赖性。温度是自留中使用的Softmax函数中的一个参数,它使注意力分数分布偏向于少数相似的补丁。图像涂料中的大多数现有自留机制都是基于动态的,并将温度定为恒定的,在有限的功能空间中进行补齐。在这项工作中,我们分析先前自留机制中的文物和培训问题,并重新设计温度学习网络以及用于解决这些问题的自留机制。我们展示了一个涂料框架,其多头温度遮掩蔽的自留机制提供稳定和高效的温度学习,并使用多种远程背景信息来绘制高品质的图像。除了改进图像质量外,在有限的功能空间空间空间空间空间里,我们还分析先前自留的自留物和训练机制中的自留置问题和培训问题,此外,我们还在制作更清晰的自动的自定义的图像格式上,我们所建的自定义的自定义方法上,我们还提议了各种自留式的自留图的自留图。