Image generation technology is a hot topic in the field of computer vision.In recent years,Generative Adversarial networks have achieved great success in the field of image generation.This is because GAN continuously improves its modeling ability through the competitive game between generators and discriminators,resulting in the realization of a faker-to-real image generation capability.GAN has been widely used in the field of image generation,but one of the main problems GAN models often face is pattern collapse.The model collapse problem of GAN model is mainly divided into two categories:one is lack of diversity,that is,the image distribution generated by GAN tends to be of a certain class or a few classes;the other is lack of authenticity,that is,there is serious distortion between the image generated by GAN and the original image.In view of the above two types of model collapse problems,the design and optimization of GAN model’s generator and discriminator network structure and its loss function are studied in depth.The main research contents of this paper are as follows:(1)Patches based self-supervised generative adversarial modelIn order to solve the problem of model collapse due to the lack of diversity in GAN models,the traditional method is to use the self-supervised information in large-scale unsupervised data,that is,to expand the limited training real image samples by affine transformation(such as rotation,translation,etc.)image enhancement technology,so as to increase the number and diversity of training samples.This method can solve the problem of insufficient sample diversity well,but there are still some problems such as inconsistency between local detail texture and global structure.Therefore,a self-supervised generation adversarial model based on image block contrast is proposed in this paper.The model firstly performs rotation transformation on the initial training image,then blocks each image after transformation,and finally implements adversarial learning on all small image blocks.Therefore,the model can not only learn the global structure of the image,but also obtain the local detail representation of the image.Extensive experiments on several public data sets demonstrate that the proposed model has better image generation capability.(2)Generative adversarial model based on self-attention noise methodIn order to solve the problem of the lack of authenticity in GAN model,the existing methods usually use the back-propagated gradient information of the optimization discriminator,but the gradient information is still indirect,which fails to make the generator obtain enough real infomation.In this paper,a self-attentional noise antagonistic generation model is proposed by optimizing the input noise at the generator side.Firstly,the distributed weight graph of the real training image is extracted by the channel self-attention mechanism and the spatial self-attention mechanism respectively,and then the distributed weight graph is fused with the input noise.At the same time,the loss of the distributed weight graph between the real image and the generated image is increased in the anti-loss function of the generator side,so as to effectively improve the sense of reality of the image generated by the generator.Experimental results on various open data sets verify that the image generated by the proposed model has a higher sense of reality.(3)Application of generative adversarial model based on self-attention mechanism in the restoration of severely damaged imagesAiming at the problem that the existing GAN model lacks the ability to repair severely missing images,the traditional method is to repair and compare the local image and the global image respectively.This method can obtain the global information and local information of the missing image,but ignores the connection between the global and local information,resulting in the generated image does not fit at the repair edge.In this paper,the generated adduction model based on the self-attention mechanism is applied to the restoration of severely damaged images.In this method,the real image and the missing image are firstly fused and input into the discriminator,and then the weight distribution map of the real image is extracted and fused with the input noise,and the weight error loss function is constructed to optimize the self-attention module.Thus,the image fit at the edge of the repaired image is effectively improved.The experimental results on several public face image data sets show that the proposed method improves the detail restoration and visual coherence.In conclusion,by optimizing the structure and transfer function of GAN,this paper uses attention mechanism to improve the diversity and real information of the images generated by the existing GAN model from the perspective of local and global information.Finally,the proposed method is applied to the restoration of severely missing images,effectively improving the quality of image restoration. |