基于高效注意力的密集残差卷积修复算法
Dense Residual Convolution Inpainting Algorithm Based on Efficient Attention
摘要: 为解决修复人为破损图像大面积不规则缺失情况时,修复结果存在的结构不合理、伪影、失真等问题,提出了一种基于高效注意力的密集残差图像修复算法。首先,将破损图像进行下采样,捕获图像细节特征,将其传递至包含空洞卷积的密集残差网络,增大信息感受野,提升修复细节特征的细粒度。同时增加高效注意力机制,使用特征图加权聚合生成全局上下文向量,对输入特征进行全局描述。此外,引入超图卷积模块,用于捕捉全局信息并增强修复细节的完整性。然后进行上采样,还原图像的结构纹理信息。最后将生成的图像输入SN-Patch GAN鉴别器进行判别优化,进一步提升修复效果。在公开数据集上进行训练和测试,实验结果表明:本文算法可以实现大面积随机缺失图像的修复,有效捕捉全局上下文信息,修复结果具有平滑过渡边界和清晰细节,满足视觉连贯性及真实性,在修复的视觉效果、峰值信噪比、结构相似度和平均误差方面,均优于对比算法。
Abstract: In order to solve the problems of unreasonable structure, artifact and distortion of inpainting results in the case of irregular images and large-area missing, a dense residual image inpainting algorithm based on efficient attention is proposed. Firstly, the damaged image is downsampled to gradually reveal the detailed information of the image features, which is then passed to the dense residual network containing the dilated convolution to increase the information receptive field and captures more detailed texture information. At the same time, an efficient attention mechanism is added, and the weighted aggregation of feature maps is used to generate a global context vector, which is used to reflect the global description of the input features. Furthermore, a hypergraph convolution module is introduced to capture global information and enhance the inpainting fine-grainedness. Thereafter, upsampling is performed to restore the structural texture information of the image. Finally, the generated image is fed into the SN-Patch GAN discriminator for discriminant optimization to further improve the repaired effect. Training and testing are carried out on public datasets. The experimental results show that the proposed algorithm can achieve large-area missing image inpainting and effectively capture the global context information and enhance the fine-grained inpainting, which the inpainting results have smooth boundaries and clear details, satisfing visual coherence and authenticity, and are superior over the state of the art in terms of visual effects, peak signal-to-noise ratio, structural similarity and average error.
文章引用:李然, 钟杏苑, 陈泉, 李海燕. 基于高效注意力的密集残差卷积修复算法[J]. 计算机科学与应用, 2023, 13(5): 1148-1156. https://doi.org/10.12677/CSA.2023.135112

参考文献

[1] Bertalmio, M., Sapiro, G., Caselles, V., et al. (2000) Image Inpainting. Proceedings of the 27th Annual Conference on Computer Graphics and Interactive Techniques, New Orleans, 23-28 July 2000, 417-424. [Google Scholar] [CrossRef
[2] Ballester, C., Bertalmio, M., Caselles, V., Sapiro, G. and Verdera, J. (2001) Filling-In by Joint Interpolation of Vector Fields and Gray Levels. IEEE Transactions on Image Processing: A Publication of the IEEE Signal Processing Society, 10, 1200-1211. [Google Scholar] [CrossRef] [PubMed]
[3] Esedoglu, S. and Shen, J.H. (2002) Digital Inpainting Based on the Mum-ford-Shah-Euler Image Model. European Journal of Applied Mathematics, 13, 353-370. [Google Scholar] [CrossRef
[4] Criminisi, A., Pérez, P. and Toyama, K. (2004) Region Filling and Object Removal by Exemplar-Based Image Inpainting. IEEE Transactions on Image Processing: A Publication of the IEEE Signal Processing Society, 13, 1200-1212. [Google Scholar] [CrossRef
[5] Chen, Q., Zhang, Y.X. and Liu, Y.C. (2007) Image Inpainting with Improved Exemplar-Based Approach. International Workshop on Multimedia Content Analysis and Mining, Weihai, 30 June-1 July 2007, 242-251.
[6] Barnes, C., Shechtman, E., Finkelstein, A. and Goldman, D.B. (2009) PatchMatch: A Randomized Correspondence Algorithm for Structural Image Editing. ACM Transactions on Graphics, 28, Article No. 2. [Google Scholar] [CrossRef
[7] Pathak, D., Krähenbühl, P., Donahue, J., Darrell, T. and Efros, A.A. (2016) Context Encoders: Feature Learning by Inpainting. 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, 27-30 June 2016, 2536-2544. [Google Scholar] [CrossRef
[8] Li, Y., Liu, S., Yang, J. and Yang, M.-H. (2017) Generative Face Completion. 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, 21-26 July 2017, 5892-5900. [Google Scholar] [CrossRef
[9] Yu, J., Lin, Z., Yang, J., Shen, X., Lu, X. and Huang, T.S. (2018) Generative Image Inpainting with Contextual Attention. 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Salt Lake City, 18-23 June 2018, 5505-5514. [Google Scholar] [CrossRef
[10] Liu, G., Reda, F., Shih, K., et al. (2018) Image Inpainting for Ir-regular Holes Using Partial Convolutions. Proceedings of the European Conference on Computer Vision (ECCV), Mu-nich, 8-14 September 2018, 85-100. [Google Scholar] [CrossRef
[11] Nazeri, K., Ng, E., Joseph, T., Qureshi, F.Z. and Ebrahimi, M. (2019) EdgeConnect: Generative Image Inpainting with Adversarial Edge Learning.
[12] Zheng, C.X., Cham, T.-J. and Cai, J.F. (2019) Pluralistic Image Completion. 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, 15-20 June 2019, 1438-1447. [Google Scholar] [CrossRef
[13] Peng, J., Liu, D., Xu, S., et al. (2021) Generating Diverse Struc-ture for Image Inpainting with Hierarchical VQ-VAE. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Nashville, 20-25 June 2021, 10775-10784. [Google Scholar] [CrossRef
[14] Jam, J., Kendrick, C., Drouard, V., et al. (2021) R-MNet: A Perceptual Adversarial Network for Image Inpainting. 2021 IEEE Winter Conference on Applications of Computer Vision, Waikoloa, 5-9 January 2021, 2713-2722. [Google Scholar] [CrossRef
[15] Suvorov, R., et al. (2022) Resolution-Robust Large Mask Inpainting with Fourier Convolutions. 2022 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV), Waikoloa, 3-8 January 2022, 3172-3182. [Google Scholar] [CrossRef
[16] Liu, H.Y., Jiang, B., Xiao, Y. and Yang, C. (2019) Coher-ent Semantic Attention for Image Inpainting.
https://arxiv.org/abs/1905.12384
[17] Li, J., Wang, N., Zhang, L., Du, B. and Tao, D. (2020) Recurrent Feature Reasoning for Image Inpainting. Proceedings of the IEEE Computer Society Conference on Computer Vision and Pattern Recognition, Seattle, 13-19 June 2020, 7757-7765. [Google Scholar] [CrossRef
[18] Shen, Z.R., Zhang, M.Y., Zhao, H.Y., et al. (2021) Efficient Attention: Attention with Linear Complexities. 2021 IEEE Winter Conference on Applications of Computer Vision, Waikoloa, 5-9 January 2021, 3530-3538. [Google Scholar] [CrossRef
[19] Vaswani, A., Shazeer, N., Parmar, N., et al. (2017) Atten-tion Is All You Need. In: Proceedings of the 31st International Conference on Neural Information Processing Systems, Curran Associates Inc., Red Hook, 6000-6010.
[20] Johnson, J., Alahi, A. and Li, F.-F. (2016) Perceptual Losses for Real-Time Style Transfer and Super-Resolution. 14th European Conference Computer Vision—ECCV 2016, Amsterdam, 11-14 October 2016, 694-711. [Google Scholar] [CrossRef