| With the in-depth application of the new generation of information technology,the traditional image style migration technology has been unable to meet the technical requirements of emerging industries represented by the metauniverse and online animation.The proposal of generating confrontation network has greatly expanded the development thinking of image style migration technology and has excellent performance in generating image authenticity and clarity.However,most of the comics on the Internet have similar faces and single facial features,but if they are more detailed,the production cost is very high.Based on the analysis,research and experiments of the classic unsupervised style conversion CycleGAN model,this thesis proposes a CycleGAN face cartoon style conversion model based on the self-attention mechanism,which has excellent effects in face cartoon style conversion.The work of this thesis is mainly reflected in the following aspects:(1)For the CycleGAN model,the structure and salient areas of the content image are distorted and lost during the stylization process.This thesis uses the SAGAN network to combine the self-attention mechanism with the CycleGAN network.The feature map with self-attention is used to replace the traditional convolution feature map,and the global information of the image is obtained through the self-attention mechanism,which solves the problem that the generated image will lack the integrity of structural features.(2)In order to highlight the face information and reduce the interference of the background elements of the picture,a series of preprocessing operations are performed on the picture,including detecting the face and key points,correcting the face according to the key points,cropping the face information,and blanking Operations such as background information have improved the effect of style conversion.At the same time,label smoothing is added to increase the generalization ability of the network and predict the generated images more accurately.(3)This thesis improves the loss function and adds a total variation loss function to achieve denoising of real images,transforming the broad spectrum of color changes they display,and replacing this spectrum with simpler color changes.Essentially replacing the complex colors of large surfaces with a single color,reducing image noise and making the resulting image more realistic.The main work of this thesis is to improve and optimize the original CycleGAN network,and construct a cycle-consistency generative confrontation network based on the self-attention mechanism.Through the comparison of group experiments,the improved network in this thesis has more realistic and delicate conversion results in the experiment of transforming real faces and comic-style faces. |