Arbitrary style migration of images based on channel and spatial attention
Xinke Gou, Yan Chen, Yung-Yuan Lan · 2024
With the rapid advancements in the realm of artificial intelligence and machine learning, image style migration has emerged as a pivotal and intriguing area of research, presenting both formidable challenges and immense potential for innovation. Aiming at the existing methods that fails to effectively accommodate both overarching and local styles concurrently, an image arbitrary migration network based on channel and spatial attention is proposed, which integrates the cross-attention mechanism on the basis of the style migration algorithm network, and effectively integrates overarching and local style features through the mechanism of cross-attention. For the problem of distortion of the content structure of the generated image, the attention mechanism network is added before style migration, which is capable of retaining intricate details of the content structure with precision; in addition, for the problem of eliminating the artefacts produced by the generated image, a new loss function is used. This loss function can well preserve the content and style overarching structure while eliminating artefacts. The experimental results show that the algorithm can achieve an arbitrary style migration of the image, retain the detailed features of the content image and eliminate the artefacts of the generated image.