For an image of large irregular missing regions, recent deep learning-based image inpainting approaches often generate content with blurred textures and distorted structures. To solve these problems, a three-stage model that separates the inpainting problem into contextual feature-based structure prediction and image completion is proposed. In the first stage, our model utilizes surrounding image features to predict missing regions during a dilated convolutional encoder-decoder network training. In the second stage, an encoder-decoder network based on the self-attention mechanism takes edge features extracted from the first stage predictions as inputs and recovers the texture structure of the missing regions. In the third stage, the outputs of the first two stages are passed to a refined inpainting network using the improved U-net architecture to guide the repair process. The proposed algorithm is compared with the existing classic algorithm on the public datasets. Experiments show that our method outperforms existing methods in terms of subjective vision and objective evaluation.
本文使用峰值信噪比(Peak Signal to Noise Ratio,PSNR)和结构相似性(Structural Similarity,SSIM)定量评估5种模型的修复结果。PSNR值越大,代表图像的失真越少;SSIM指标值越大,代表和原始图像的差距越小,即修复结果图像质量越好。在相同破损程度的情况下,本文提出的修复算法的性能优于其他 4 种图像修复算法,如表 4 所示。
BERTALMIOM, SAPIROG, CASELLESV,et al.Image inpainting[C]//Conference on Computer Graphics and Interactive Techniques,New Orleans,LA:ACM Press/Addison-Wesley Publishing Company,2000:417-424.
[2]
BARNESC, SHECHTMANE, FINKELSTEINA,et al.PatchMatch:a randomized correspondence algorithm for structural image editing[J].ACM Transactions on Graphics,2009,28(3):1-11.
[3]
CRIMINISIA, PATRICKP, TOYAMAK.Region filling and object removal by exemplar-based image inpainting[J].IEEE Transactions on Image Processing,2004,13(9):1200-1212.
[4]
IIZUKAS, SIMO-SERRAE, ISHIKAWAH.Globally and locally consistent image completion[J].ACM Transactions on Graphics,2017,36(4):1-14.
[5]
LIUG L, REDAF A, SHIHK,et al.Image inpainting for irregular holes using partial convolutions[C]//European Conference on Computer Vision,Munich:ECCV,2018:89-105.
[6]
ZHOUX, LIJ, WANGZ,et al.Image inpainting with contrastive relation network[C]//25th International Conference on Pattern Recognition(ICPR),2021:4420-4427.
[7]
PATHAKD, DONAHUEJ, DARRELLT,et al.Context encoders:feature learning by iInpainting[C]//IEEE Computer Society Conference on Computer Vision and Pattern Recognition(CVPR),Las Vegas:IEEE,2016:2536-2544.
[8]
YUJ, LINZ, YANGJ,et al.Generative image inpainting with contextual attention[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition(CVPR),2018:5505-5514.
GUOX, YANGH, HUANGD.Image inpainting via conditional texture and structure dual generation[C]//IEEE/CVF International Conference on Computer Vision (ICCV),2021:14114-14123.
WANGHe, HANLei. Image dehazing algorithm based on Res2net and pyramid pooling[J]. Journal of Test and Measurement Technology, 2023, 37(5): 455-460. (in Chinese)
[13]
GOODFELLOWI J, POUGETABADIEJ, MIRZAM,et al.Generative adversarial nets[J].Advances in Neural Information Processing Systems,2014,3(2):2672-2680.
[14]
ZHUJ Y, PARKT, ISOLAP,et al.Unpaired image-to-image translation using cycle-consistent adversarial networks[C]// IEEE International Conference on Computer Vision (ICCV),IEEE,2017:1-9.
[15]
ZHANGH, GOODFELLOWI, METAXASD,et al.Self-attention generative adversarial networks[C]//Proceedings of International Conference on Machine Learning,2019,97:7354-7363.
[16]
GAOS, CHENGM M, ZHAOK,et al.Res2Net:a new multi-scale backbone architecture[J].IEEE Transactions on Pattern Analysis and Machine Intelligence,2019,43(2):652-662.
[17]
WANGZ, WUY, XUJ,et al.Res2Fusion:infrared and visible image fusion based on dense Res2Net and double nonlocal attention models[J].IEEE Transactions on Instrumentation and Measurement.2022,71:1-12.
[18]
RONNEBERGERO, FISCHERP, BROXT.U-net:convolutional networks for biomedical image segmentation[C]//International Conference on Medical Image Computing and Computer Assisted Intervention,2015:234-241.