Image Style Transfer Method Based on Multi-Scale Coordinate Attention and Contrastive Learning
Abstract
While attention-based arbitrary style transfer networks like AdaAttN show promise, they suffer from texture misalignment due to spatial flattening and severe contour distortion under strong stylization. To address these issues, we propose an enhanced network built upon the AdaAttN baseline. First, we introduce a Multi-scale Coordinate Attention Feature Enhancement Module (MCAM) that aggregates spatial coordinates via a three-branch pyramid structure, fundamentally compensating for spatial information loss. Second, a Structure-Preserving Projection Module (SPPM) employs PatchNCE contrastive loss to enforce rigid geometric constraints on object contours via unidirectional mapping, eliminating the overhead of bidirectional cycle consistency. Extensive experiments on MS-COCO+WikiArt, Places365, and BDD100K datasets validate our method's superiority, particularly for complex real-world scenes like autonomous driving visual perception. Compared to the AdaAttN baseline, our model improves SSIM to 0.493 (from 0.461) and lowers FID to 63.45 (from 77.23) on the MS-COCO+WikiArt dataset. Furthermore, on the geometrically complex Places365 dataset, it achieves a 7.2% enhancement in SSIM (to 0.534) and an 11.6% reduction in FID (to 71.45) while maintaining highly efficient single-forward inference speed.