| Images are an essential means of conveying information,and with the continuous innovation of digital technology,digital images have been widely used in various fields of real life.Image inpainting,as an important branch of image processing,has significant practical significance and application value.Image inpainting algorithms use feature extraction of effective information from the background to repair damaged areas.Many scholars at home and abroad have made significant research contributions in this technology.In recent years,the application of deep learning methods in image inpainting tasks has resulted in improved repair results and improved the ability of models to restore image content.When dealing with different damaged areas of images,these deep learning-based image inpainting algorithms have significantly improved repair results in objective evaluation indicators and subjective effects.This article studies the theory of deep learning-based image inpainting` and proposes two phased-based image restoration algorithm models that can effectively handle irregular masks of damaged images.This paper proposes a two-stage image inpainting model based on contour information guidance to effectively improve inpainting ability when dealing with complex semantic and large irregular missing areas that may cause blurring or structural confusion.The contour restoration network uses residual blocks with dilated convolutions to restore missing information of the image contour as a whole and uses the predicted contour as input for the next network.The image generation network adopts the U-Net structure,using partial convolution as the area recognition module and recursively repairing the damaged image from the outside to the inside through a recursive mechanism.Each generated feature map is adaptively merged using a feature fusion module and finally decoded to obtain the restored image.In addition,a spectral normalization Markov discriminator,adversarial loss,and total variation loss are added to generate high-quality image features.The model is evaluated end-to-end on public datasets and verified through qualitative and quantitative experiments,and the results show higher consistency in the visual effects of the restoration results.Secondly,a progressive image inpainting method based on gated convolution optimization is proposed to make up for the shortcomings of the single-stage image inpainting method.In this algorithm,coarse restoration network is added to complete the preliminary prediction of image structure and semantic,gated convolution is used to compensate for the loss of information continuity caused by empty convolution,and semantic feature loss is added to improve the semantic correctness of the initial restoration content.The refinement repair network retains the recurrent feature reasoning module to generate the final output results.The attention mechanism is applied in the feature reasoning module to make full use of the effective information of the known areas of the image to realize the progressive restoration of the image.The model with stronger ability of image content reconstruction is obtained,and the restored image is clearer in details.The algorithm model has been effectively improved in the repair of damaged images,and its effectiveness has been verified by experiments.The two methods proposed in this paper are based on the phased image inpainting model,one is the two-stage image inpainting based on contour information guidance,and the other is the progressive image inpainting based on gated convolution optimization.Both methods effectively improve the image inpainting ability by processing the repair task in stages.In the first method,the image contour is restored first,and then the contour information is used to guide the network to further repair and obtain the repair results.The structural deviation of the generated image results can be effectively prevented by means of structural constraints.Contour repair focuses on structural information,and there is no redundant information affecting the structure of the image.The generated black and white contour map contains simple information.Therefore,the second method is proposed to increase the rough repair network’s initial prediction of the image,so as to provide the support of color and texture information for the network to better fill the image content in the next stage.In this paper,both of the two inpainting methods based on phases can obtain better quality images and improve visual effects and evaluation indexes. |