arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2202.03163cs.CV
收藏

基于块随机注意力的图像编辑

Patch-Based Stochastic Attention for Image Editing

Télécom Paris, Institut Polytechnique de Paris(巴黎理工学院电信学院);Université Paris Cité(巴黎西岱大学);CNRS(法国国家科学研究中心)

Nicolas Cherel, Andrés Almansa, Yann Gousseau, Alasdair Newson

AI总结:

针对注意力机制计算开销大、难以处理高分辨率图像的问题,提出基于PatchMatch的随机注意力层PSAL,以低内存开销实现高效近似最近邻,支持端到端训练,并在图像修复、着色和超分辨率任务中验证了有效性。

摘要:

近年来,注意力机制在深度学习中变得至关重要。这些非局部操作类似于图像处理中的传统基于块的方法,补充了局部卷积。然而,计算完整的注意力矩阵是一个昂贵的步骤,具有沉重的内存和计算负担。这些限制制约了网络架构和性能,特别是在高分辨率图像的情况下。我们提出了一种基于随机算法PatchMatch的高效注意力层,该算法用于确定近似最近邻。我们将所提出的层称为“基于块的随机注意力层”(PSAL)。此外,我们提出了基于块聚合的不同方法,以确保PSAL的可微性,从而允许包含我们层的任何网络进行端到端训练。PSAL具有较小的内存占用,因此可以扩展到高分辨率图像。它在保持这种占用率的同时,不牺牲最近邻的空间精度和全局性,这意味着它可以轻松插入深度架构的任何级别,甚至较浅的级别。我们在多个图像编辑任务上展示了PSAL的实用性,如图像修复、引导图像着色和单图像超分辨率。我们的代码可在https://github.com/ncherel/psal获取。

英文摘要:

Attention mechanisms have become of crucial importance in deep learning in recent years. These non-local operations, which are similar to traditional patch-based methods in image processing, complement local convolutions. However, computing the full attention matrix is an expensive step with heavy memory and computational loads. These limitations curb network architectures and performances, in particular for the case of high resolution images. We propose an efficient attention layer based on the stochastic algorithm PatchMatch, which is used for determining approximate nearest neighbors. We refer to our proposed layer as a "Patch-based Stochastic Attention Layer" (PSAL). Furthermore, we propose different approaches, based on patch aggregation, to ensure the differentiability of PSAL, thus allowing end-to-end training of any network containing our layer. PSAL has a small memory footprint and can therefore scale to high resolution images. It maintains this footprint without sacrificing spatial precision and globality of the nearest neighbors, which means that it can be easily inserted in any level of a deep architecture, even in shallower levels. We demonstrate the usefulness of PSAL on several image editing tasks, such as image inpainting, guided image colorization, and single-image super-resolution. Our code is available at: https://github.com/ncherel/psal

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑