| Capable of generating new art forms and enhancing the visual appeal of images and videos,style transfer is becoming increasingly important due to its widespread applications in various fields such as art,design,and photography.Style transfer can be divided into artistic style transfer tasks and photo style transfer tasks according to the type of target style.The former is mainly based on artistic abstraction,abstracting the style of the input image into an artistic style,and the structural details are often lost in the generated image;the latter is based on artistic abstraction.It is required to preserve the structural details of the original image as much as possible,so that the generated image looks authentic and credible.Existing style transfer methods can achieve good results on individual artistic style transfer or photorealistic style transfer tasks,but there is rarely a unified framework that can adapt to both tasks at the same time.This topic aims to study a unified style transfer framework,which can not only improve the structural details of artistic style transfer,but also further realize photorealistic style transfer,so as to break the barrier between artistic style transfer and real photo style transfer tasks.Realize any style transfer effect in the true sense.Existing attention-based style transfer methods only fuse deep style features into deep content features due to the limitation of computing power,ignoring the use of shallow features,resulting in serious local distortion in the transfer results.In order to enable detailed shallow features to participate in attention calculations,this project designs a structural detail preservation plug-in on the existing attention-based artistic style transfer network.Specifically,this project adopts a divide-and-conquer mechanism.Layer features are non-destructively divided into multiple small blocks,and then the segmentation results are sent to the style transformation module with attention mechanism to calculate the features after style transformation,and then the output is re-merged back to the original scale size and sent to the subsequent In the decoder,the stylized image with enhanced details is output.In order to further complete the task of photorealistic style transfer and make the above artistic style transfer network capable of photorealistic transfer,this topic proposes a general photorealistic smoothing plug-in.By aligning local statistics of artistic stylized image features with content image features and preserving hierarchical feature statistics,the smoothing plug-in can better convert artistic style transfer results into images with photorealistic style,which is achieved on one model The effect of completing the two transfer tasks greatly improves the practicability of the style transfer network in multiple scenarios.The experimental results show that the detail preservation plug-in proposed in this topic can well preserve the structural details of the original content graph.While improving the detail expressiveness of the style transfer results,the photorealistic smoothing plug-in proposed in this topic makes the artistic style transfer network have photo Ability for photorealistic style transfer.In addition,in order to verify the effectiveness and versatility of the detail preservation plug-in and photorealistic smoothing plug-in,this subject conducted comparative experiments on multiple models,and the experimental results showed that these two plug-ins have good applicability. |