| Inpainting refers to the process of reconstructing or repairing damaged,missing or destroyed images through algorithms or technical means.Common inpainting applications include removing noise,filling missing parts,correcting distortion and distortion,etc.,aiming to improve image quality and information reliability.Inpainting technology has a wide range of applications.For example,it can also be used in security monitoring to restore blurred or blocked images to obtain more information and help solve case investigation and evidence collection problems.However,the current inpainting technology still has some problems to be solved in some cases.For example,when repairing an image with a large area of dirt,due to the inability to associate multi-level dimensional image information,information at different scales cannot be extracted and improved,resulting in the loss of a large amount of feature information,resulting in chaotic image structure and visual blur after the repair is completed;During inpainting,the connection between the image to be repaired and the effective pixel points cannot be well correlated,and the effective information of deep features cannot be captured,resulting in insufficient extraction of image depth information,overlapping artifacts,color distortion,and unclear structure.In order to solve these problems,this paper conducts in-depth research on inpainting methods based on deep learning technology,aiming to repair the corrupted images through algorithm fusion and further improve the quality of repair.This paper proposes two methods of inpainting.One method uses U-Net network,multi-scale pyramid network feature fusion and Trans Former attention mechanism technology.The other method uses feature pyramid network,gated convolution,and attention mechanism technology.Both methods are based on the generative adversarial networks model.The main research content and contributions of this article include:1)A repair algorithm model based on Trans Former and Multi scale Feature Fusion Network based Image Painting(TMFF-Net)has been proposed,aiming to solve the problems of structural chaos and visual blur in images with large fouling areas.The generator of the TMFF-Net model consists of a pre completion generation network and an enhanced completion generation network.Among them,the pre completion generator uses a U-Net structure and a shift connection layer to achieve rough repair of stained images,while the enhanced completion model uses Trans Former attention mechanism and multi-scale feature fusion network to achieve fine repair of stained images.The U-Net structure can extract high-level features at different scales,while the shift connection layer relies on its "copy paste" feature to exchange and reuse feature information at local locations.The enhanced completion model can combine the convolutional kernels of different scales of the image to generate different levels of feature images.The feature images are fused in pairs through the Trans Former module,combined with deep information to complete image inpainting.The discriminator of the TMFF-Net model adopts two methods: global discriminator and local discriminator.Among them,the global discriminator judges the entire image through convolution and fully connected layers to determine its authenticity.The local discriminator uses the Patch GAN method to judge each pixel block in the image and evaluate their overall consistency with the real image.TMFF-Net’s loss function adopts the combination of multiple loss function,including style loss,perception loss,confrontation loss and guidance loss.After experimental verification,the TMFF-Net model proposed in this article shows good repair performance on a universal dataset.2)The TMFF-Net model can repair images with good visual quality when the structure is not too complex,but when the image is slightly complex and has a large smear area,problems such as color distortion and unclear structure can occur in the repaired image,A gate convolution and feature pyramid network based image inpainting(GCFP-Net)model based on the TMFF-Net model is proposed.The generator of the GCFP-Net model adopts a two-stage generation network.The first generator uses gated convolution to improve the extraction of effective feature information,while the second generator uses a feature pyramid network,attention mechanism,and gated convolution to associate deep information,and combines the two generators to complete the repair of dirty images.The discriminator of the GCFP-Net model uses the SN Patch GAN discriminator,which divides the image into several small domains for discrimination,and outputs the probability that each small domain is a real image.These two methods were tested on datasets Celeb A,Places2,and Paris Street,and compared quantitatively and qualitatively with other mainstream algorithms.The experimental results show that the average absolute error of the GCFP-Net algorithm proposed in this paper is more than 10% higher than that of PEN-NET,Edge Connect and LBAM algorithms in terms of the average absolute error of the data after repairing the corrupted image,the structure similarity index is more than 5% higher,and the peak signal to noise ratio is more than 8% higher.These experimental data show that the algorithm model proposed in this paper has significant advantages in the aspect of dirty inpainting,which can better repair the structure and details of the dirty image,and effectively improve the visual quality of the dirty image. |