journal article·2024Open access

Image Inpainting Technique Incorporating Edge Prior and Attention Mechanism

Jinxian Bai, Yao Fan, Zhiwei Zhao, Lizhi Zheng

Computers, Materials & Continua· Volume 78· Issue 1

Abstract

Recently, deep learning-based image inpainting methods have made great strides in reconstructing damaged regions. However, these methods often struggle to produce satisfactory results when dealing with missing images with large holes, leading to distortions in the structure and blurring of textures. To address these problems, we combine the advantages of transformers and convolutions to propose an image inpainting method that incorporates edge priors and attention mechanisms. The proposed method aims to improve the results of inpainting large holes in images by enhancing the accuracy of structure restoration and the ability to recover texture details. This method divides the inpainting task into two phases: edge prediction and image inpainting. Specifically, in the edge prediction phase, a transformer architecture is designed to combine axial attention with standard self-attention. This design enhances the extraction capability of global structural features and location awareness. It also balances the complexity of self-attention operations, resulting in accurate prediction of the edge structure in the defective region. In the image inpainting phase, a multi-scale fusion attention module is introduced. This module makes full use of multi-level distant features and enhances local pixel continuity, thereby significantly improving the quality of image inpainting. To evaluate the performance of our method, comparative experiments are conducted on several datasets, including CelebA, Places2, and Facade. Quantitative experiments show that our method outperforms the other mainstream methods. Specifically, it improves Peak Signal-to-Noise Ratio (PSNR) and Structure Similarity Index Measure (SSIM) by 1.141~3.234 db and 0.083~0.235, respectively. Moreover, it reduces Learning Perceptual Image Patch Similarity (LPIPS) and Mean Absolute Error (MAE) by 0.0347~0.1753 and 0.0104~0.0402, respectively. Qualitative experiments reveal that our method excels at reconstructing images with complete structural information and clear texture details. Furthermore, our model exhibits impressive performance in terms of the number of parameters, memory cost, and testing time.
Source: openalex_inverted_index · Quality: baseline

Research context

OpenAlex topics: Generative Adversarial Networks and Image Synthesis · Advanced Image Processing Techniques · Digital Media Forensic Detection

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

References (47)

Show source-provided references
1. Bringing old photos back to life
2. PatchMatch: A randomized correspondence algorithm for structural image editing10.1145/1531326.1531330 ↗
3. Learning texture transformer network for image super-resolution
4. Image inpainting
5. Nontexture inpainting by curvature-driven diffusions10.1006/jvci.2001.0487 ↗
6. Image completion using efficient belief propagation via priority scheduling and dynamic pruning10.1109/TIP.2007.906269 ↗
7. Region filling and object removal by exemplar-based image inpainting10.1109/TIP.2004.833105 ↗
8. Context encoders: Feature learning by inpainting
9. Globally and locally consistent image completion10.1145/3072959.3073659 ↗
10. Image inpainting via generative multi-column convolutional neural networks
11. Generative adversarial nets
12. Generative image inpainting with contextual attention
13. PEPSI: Fast image inpainting with parallel decoding network
14. High-fidelity pluralistic image completion with transformers
15. Diverse image inpainting with bidirectional and autoregressive transformers
16. Image inpainting via conditional texture and structure dual generation
17. Learning to incorporate structure knowledge for image inpainting
18. Y. Song, C. Yang, Y. Shen, P. Wang, Q. Huang et al., “SPG-Net: Segmentation prediction and guidance network for image inpainting,” 2016. [Online]. Available: https://arxiv.org/abs/1805.03356 (accessed on 05/08/2023)
19. Guidance and evaluation: Semantic-aware image inpainting for mixed scenes
20. K. Nazeri, E. Ng, T. Joseph, F. Z. Qureshi and M. Ebrahimi, “EdgeConnect: Generative image inpainting with adversarial edge learning,” 2019. [Online]. Available: http://arxiv.org/abs/1901.00212 (accessed on 05/08/2023)
21. Foreground-aware image inpainting
22. Deep learning face attributes in the wild
23. Spatial pattern templates for recognition of objects with regular structure
24. Places: A 10 million image database for scene recognition10.1109/TPAMI.2017.2723009 ↗
25. Edge-aware context encoder for image inpainting
26. Learning a sketch tensor space for image inpainting of man-made scenes
27. Attention is all you need
28. Pre-trained image processing transformer
29. J. Devlin, M. W. Chang, K. Lee and K. Toutanova, “BERT: Pre-training of deep bidirectional transformers for language understanding,” 2018. [Online]. Available: https://arxiv.org/abs/1810.04805 (accessed on 05/08/2023)
30. Bridging global context interactions for high-fidelity image completion
31. Exploring the limits of transfer learning with a unified text-to-text transformer
32. J. Ho, N. Kalchbrenner, D. Weissenborn and T. Salimans, “Axial attention in multidimensional transformers,” 2019. [Online]. Available: https://arxiv.org/abs/1912.12180 (accessed on 05/08/2023)
33. Learning pyramid-context encoder network for high-quality image inpainting
34. A. Dosovitskiy, L. Beyer, A. Kolesnikov, D. Weissenborn, X. Zhai et al., “An image is worth 16×16 words: Transformers for image recognition at scale,” 2020. [Online]. Available: https://arxiv.org/abs/2010.11929 (accessed on 05/08/2023)
35. J. L. Ba, J. R. Kiros and G. E. Hinton, “Layer normalization,” 2016. [Online]. Available: https://arxiv.org/abs/1607.06450 (accessed on 05/08/2023)
36. Image-to-image translation with conditional adversarial networks
37. EnhanceNet: Single image super-resolution through automated texture synthesis
38. ECA-Net: Efficient channel attention for deep convolutional neural networks
39. RFA-Net: Residual feature attention network for fine-grained image inpainting10.1016/j.engappai.2022.105814 ↗
40. High-resolution image synthesis and semantic manipulation with conditional GANs
41. Perceptual losses for real-time style transfer and super-resolution
42. Image style transfer using convolutional neural networks
43. K. Simonyan and A. Zisserman, “Very deep convolutional networks for large-scale image recognition,” 2014. [Online]. Available: https://arxiv.org/abs/1409.1556 (accessed on 05/08/2023)
44. Image inpainting for irregular holes using partial convolutions
45. MAT: Mask-aware transformer for large hole image inpainting
46. Reduce information loss in transformers for pluralistic image inpainting
47. The unreasonable effectiveness of deep features as a perceptual metric