As a branch in the field of image processing,image style transfer is the process of stylizing images.It is widely used in real life and is of great significance to the study of images and image processing.However,most of the traditional style transfer is carried out for the whole image,even in recent years,the research on the transfer of image parts has shown the head,but the research in this area is always incomplete.Therefore,this paper introduces a deep matting network to extract the foreground part of the image,the foreground part is the main body of the picture,the people partand,adds an attention mechanism and an improved adaptive layer instance normalization method to perform intensive migration of the face part in the foreground image,which solves the problem that the traditional method can only The disadvantage of migrating the overall image is to generate an image that meets the expectations.First,the origin of the image style transfer problem is briefly introduced,and the advantages of deep learning-based transfer methods over traditional methods are explained.Then,the principles of CNN and GAN are introduced respectively,explaining the reason why this paper chooses the generative adversarial network to migrate the network model,and selects the more popular Cycle GAN in the generative adversarial network.The generative adversarial network of the discriminator and the cycle consistency loss are introduced to solve the problem that the data of the general generative adversarial network must be matched;then the attention mechanism and the deep matting network are introduced to extract the foreground part of the picture;finally,the attention mechanism is combined with Combined with the Ada LIN normalization method,the experiment proves that the normalization method can help the attention mechanism to know where to transfer.In this paper,the face part is intensively transferred.Using the above method to transfer the style of foreground pictures,experiments show that,it is proved that the method adopted in this paper has obvious improvement compared with the ordinary Cycle GAN,and has obvious advantages in both subjective evaluation method and objective evaluation method.Among them,IS and FID in the objective evaluation indicators have 8.8% increase and5.2% decrease respectively.In this paper,on the basis of previous work,a deep matting network is introduced to preprocess the image,and by introducing the attention mechanism and the improved Ada LIN normalization method,the style transfer of the foreground part of the image can be realized.It not only solves the problem that the traditional method can only transfer the style of the whole picture,but also realizes the centralized transfer of the faces of the characters,which produces a satisfactory effect.Figure 39 Table 6 Reference 80... |