高级检索

基于混合结构编码与动态特征融合的印花图案风格迁移模型

A Style Transfer Model for Print Patterns Based on Hybrid Structure Coding and Dynamic Feature Fusion

  • 摘要: 印花图案内容丰富、纹理复杂、色彩多样, 是纺织行业布匹生产的基础之一. 对印花图案进行风格迁移配色, 既可以提高设计师的创作效率, 也可以为客户提供一花多色的选择, 提高印花图案的商业价值. 针对现有印花图案风格迁移模型存在伪影、缺乏层次感、细节丢失等问题, 提出一种基于混合结构编码与动态特征融合的印花图案风格迁移模型HSC-DFF. 首先设计卷积层与Transformer混合的编码器, 对印花图案和风格图像进行快速特征提取, 并利用分流注意力机制融合不同尺度的信息; 然后设计带有条件位置编码的注意力层动态融合内容特征与风格特征, 平衡语义信息与风格样式; 最后引入对比一致性保持损失函数, 通过优化内容图像与生成图像之间差值向量的特征差异, 增强解码器恢复完整的内容结构与纹理细节的能力. 在MSCOCO, WikiArt组成的任意图像风格迁移数据集和米绘印花图案数据集上进行实验, 结果表明, 与S2WAT, StyTr2, ArtFlow等现有风格迁移模型相比, HSC-DFF的SSIM指标平均提升20.2个百分点, MSE和LPIPS平均下降1.5和8.7个百分点, 可以有效地保留印花图案的内容结构, 融合风格样式以及保持局部细节.

     

    Abstract: The rich content, complex texture, and vibrant colors of print patterns are fundamental to fabric production in the textile industry. Style transfer for print patterns can not only enhance designers’ creative efficiency, but also offer clients a diverse range of color options for the same pattern, thereby increasing the commercial value of the print designs. To address the problems of artifacts, lack of hierarchy, and loss of details in existing style transfer models for print patterns, we propose a style transfer model for print patterns based on hybrid structure coding and dynamic feature fusion HSC-DFF. Firstly, a hybrid encoder combining convolutional layers and Transformers is designed for rapid feature extraction from print patterns and style images, utilizing a split attention mechanism to integrate multi-scale information; then the attention layer with conditional position encoding is introduced to dynamically merge content and style features, effectively balancing semantic information with style patterns; and finally, a contrastive consistency-preserving loss function is employed to enhance the decoder’s ability to recover complete content structures and texture details by optimizing the feature differences between content and generated images. Experiments are conducted on the arbitrary image style transfer dataset composed of MSCOCO, WikiArt, and the MiHui print patterns dataset, and the results show that compared to existing style transfer models such as S2WAT, StyTr2, ArtFlow, etc., HSC-DFF model achieves an average improvement of 20.2 percentage points in SSIM, with reductions of 1.5 percentage points and 8.7 percentage points in MSE and LPIPS, respectively, which can effectively preserve content structure, integrate style patterns, and maintain local details.

     

/

返回文章
返回