To address the problem of accurately inferring the content of missing regions in an image when they are closely related to the surrounding textures and structures, we propose a single-stage image inpainting model. The model first compresses, reconstructs, and enhances features through convolutional layers and the FastStage module, while self-attention and multi-layer perceptron are incorporated to capture contextual relationships among features. Furthermore, in order to enhance the attention and importance perception on features, we propose EMMA in the models, which avoids the shaking and oscillation during updating the model parameters, thereby improving the performance of the generator and the quality of the generated results. Lastly, we introduce a discriminator to evaluate the consistency between the inpainted image and the original image. The end-to-end experimental results conducted on CelebA, Places2, and Paris StreetView datasets demonstrate that, compared with classical methods, the inpainting results of this model exhibit better visual semantics, and it is capable of finely inpainting details, textures, and local features of images.
ZHANGH Y, PENGQ C .A survey on digital image inpainting[J].Journal of Image and Graphics,2007,12(1):1-10.(in Chinese)
[3]
CRIMINISIA, PEREZP, TOYAMAK .Region filling and object removal by exemplar-based image inpainting[J].IEEE Transactions on Image Processing,2004,13(9):1200-1212.
[4]
BARNESC, SHECHTMANE, FINKELSTEINA,et al .PatchMatch:a randomized correspondence algorithm for structural image editing[C]//Seminal Graphics Papers:Pushing the Boundaries.August 3-7,2009,New York,NY,USA:ACM,2023:619-629.
[5]
SUNJ, JIAJ, TANGC K. Efficient patch-based inpainting for large-scale image editing[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 34(6): 1038-1050.
[6]
YOUY L, XUW Y, TANNENBAUMA,et al .Behavioral analysis of anisotropic diffusion in image processing[J].IEEE Transactions on Image Processing,1996,5(11):1539-1553.
[7]
LIUG L, REDAF A, SHIHK J,et al .Image inpainting for irregular holes using partial convolutions[M]//Lecture Notes in Computer Science.Cham:Springer International Publishing,2018:89-105.
[8]
ZENGY H, FUJ L, CHAOH Y,et al .Learning pyramid-context encoder network for high-quality image inpainting[C]//2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).June 15-20,2019,Long Beach,CA,USA:IEEE,2019:1486-1494.
[9]
LIJ Y, WANGN, ZHANGL F,et al .Recurrent feature reasoning for image inpainting[C]//2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).June 13-19,2020,Seattle,WA,USA.IEEE,2020:7757-7765.
[10]
PATHAKD, KRÄHENBÜHLP, DONAHUEJ,et al .Context encoders:feature learning by inpainting[C]//2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR).June 27-30,2016,Las Vegas,NV,USA:IEEE,2016:2536-2544.
[11]
IIZUKAS, SIMO-SERRAE, ISHIKAWAH .Globally and locally consistent image completion[J].ACM Transactions on Graphics,2017,36(4):1-14.
[12]
YIZ L, TANGQ, AZIZIS,et al .Contextual residual aggregation for ultra high-resolution image inpainting[C]//2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).June 13-19,2020,Seattle,WA,USA.IEEE,2020:7505-7514.
[13]
WANGY, TAOX, QIX J,et al .Image inpainting via generative multi-column convolutional neural networks[EB/OL]. 2018:1810.08771.
MAOX D, LIQ, XIEH R,et al .Least squares generative adversarial networks[C]//2017 IEEE International Conference on Computer Vision (ICCV).October 22-29,2017,Venice,Italy.IEEE,2017:2813-2821.
[16]
MEHRALIANM, KARASFIB .RDCGAN:unsupervised representation learning with regularized deep convolutional generative adversarial networks[C]//2018 9th Conference on Artificial Intelligence and Robotics and 2nd Asia-Pacific International Symposium.December 10-10,2018,Kish Island,Iran.IEEE,2018:31-38.
[17]
HATAMIZADEHA, HEINRICHG, YINH X,et al .FasterViT:fast vision transformers with hierarchical attention[EB/OL].2023:2306.06189.
ZHENGC X, CHAMT J, CAIJ F,et al .Bridging global context interactions for high-fidelity image completion[C]//2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).June 18-24,2022,New Orleans,LA,USA:IEEE,2022: 11502-11512.
[20]
ZHOUY, ZHUZ, BAIX,et al .Non-stationary texture synthesis by adversarial expansion[J].ACM Transactions on Graphics,2018,37(4): 1-13.
[21]
OUYANGD L, HES, ZHANGG Z,et al .Efficient multi-scale attention module with cross-spatial learning[C]//ICASSP 2023-2023 IEEE International Conference on Acoustics,Speech and Signal Processing (ICASSP).June 4-10,2023,Rhodes Island,Greece: IEEE, 2023: 1-5.
[22]
YANZ Y, LIX M, LIM,et al .Shift-net:image inpainting via deep feature rearrangement[M]//Lecture Notes in Computer Science.Cham:Springer International Publishing,2018:3-19.
[23]
LIUH Y, JIANGB, XIAOY, et al .Coherent semantic attention for image inpainting[C]//2019 IEEE/CVF International Conference on Computer Vision (ICCV).October 27-November 2,2019, Seoul, Korea (South). IEEE, 2019: 4169-4178.
基金资助
甘肃省自然科学基金项目(23JRRA913)
Natural ScienceFoundation of Gansu Province(23JRRA913)
全国高等院校计算机基础教育研究会项目(2023-AFCEC-039)
Association of Fundamental Computing Education in Chinese Universities(2023-AFCEC-039)