Patch-Based Stochastic Attention for Image Editing

要約

近年、ディープラーニングにおいて注意メカニズムが非常に重要になってきています。
これらの非ローカル操作は、画像処理における従来のパッチベースの方法に似ており、ローカル畳み込みを補完します。
ただし、完全なアテンション行列を計算することは、メモリと計算負荷が高くつく高価なステップです。
これらの制限により、特に高解像度画像の場合、ネットワーク アーキテクチャとパフォーマンスが制限されます。
我々は、近似最近傍を決定するために使用される確率的アルゴリズム 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

arxiv情報

著者 Nicolas Cherel,Andrés Almansa,Yann Gousseau,Alasdair Newson
発行日 2023-11-01 09:35:34+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CV パーマリンク