Patch-based stochastic attention for image editing

被引:0
|
作者
Cherel, Nicolas [1 ]
Almansa, Andres [2 ,3 ]
Gousseau, Yann [1 ]
Newson, Alasdair [1 ]
机构
[1] Inst Polytech Paris, LTCI, Telecom Paris, Paris, France
[2] CNRS, MAP5, Paris, France
[3] Univ Paris Cite, Paris, France
关键词
Attention; Patch;
D O I
10.1016/j.cviu.2023.103866
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
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.
引用
收藏
页数:10
相关论文
共 50 条
  • [1] Fast Exact Nearest Patch Matching for Patch-Based Image Editing and Processing
    Xiao, Chunxia
    Liu, Meng
    Nie, Yongwei
    Dong, Zhao
    [J]. IEEE TRANSACTIONS ON VISUALIZATION AND COMPUTER GRAPHICS, 2011, 17 (08) : 1122 - 1134
  • [2] Geometrically Consistent Stereoscopic Image Editing Using Patch-Based Synthesis
    Luo, Sheng-Jie
    Sun, Ying-Tse
    Shen, I-Chao
    Chen, Bing-Yu
    Chuang, Yung-Yu
    [J]. IEEE TRANSACTIONS ON VISUALIZATION AND COMPUTER GRAPHICS, 2015, 21 (01) : 56 - 67
  • [3] PatchNet: A Patch-based Image Representation for Interactive Library-driven Image Editing
    Hu, Shi-Min
    Zhang, Fang-Lue
    Wang, Miao
    Martin, Ralph R.
    Wang, Jue
    [J]. ACM TRANSACTIONS ON GRAPHICS, 2013, 32 (06):
  • [4] Patch-based Image Colorization
    Bugeau, Aurelie
    Ta, Vinh-Thong
    [J]. 2012 21ST INTERNATIONAL CONFERENCE ON PATTERN RECOGNITION (ICPR 2012), 2012, : 3058 - 3061
  • [5] A patch-based measure for image dissimilarity
    Amelio, A.
    [J]. NEUROCOMPUTING, 2016, 171 : 362 - 378
  • [6] Patch-based variational image approximation
    Hao XIE
    Ruofeng TONG
    [J]. Science China(Information Sciences), 2017, 60 (03) : 78 - 87
  • [7] Laplacian Patch-Based Image Synthesis
    Lee, Joo Ho
    Choi, Inchang
    Kim, Min H.
    [J]. 2016 IEEE CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION (CVPR), 2016, : 2727 - 2735
  • [8] Patch-based variational image approximation
    Xie, Hao
    Tong, Ruofeng
    [J]. SCIENCE CHINA-INFORMATION SCIENCES, 2017, 60 (03)
  • [9] A MODEL FOR IMAGE PATCH-BASED ALGORITHMS
    Ni, Karl S.
    Nguyen, Truong Q.
    [J]. 2008 15TH IEEE INTERNATIONAL CONFERENCE ON IMAGE PROCESSING, VOLS 1-5, 2008, : 2588 - 2591
  • [10] Patch-Based Holographic Image Sensing
    Bruckstein, Alfred Marcel
    Ezerman, Martianus Frederic
    Fahreza, Adamas Aqsa
    Ling, San
    [J]. SIAM JOURNAL ON IMAGING SCIENCES, 2021, 14 (01): : 198 - 223