纺织学报 ›› 2026, Vol. 47 ›› Issue (1): 176-185.doi: 10.13475/j.fzxb.20250600501

• 染整工程 • 上一篇    下一篇

交叉注意力激励的纺织数码印花图案色彩语义一致性生成

张惠1,2, 周璇1,2, 王骏巍2,3, 邓咏梅2, 张凯兵2,3()   

  1. 1.西安工程大学 纺织科学与工程学院, 陕西 西安 710048
    2.陕西省服装设计智能化重点实验室, 陕西 西安 710048
    3.西安工程大学 计算机科学学院, 陕西 西安 710048
  • 收稿日期:2025-06-03 修回日期:2025-11-10 出版日期:2026-01-15 发布日期:2026-01-15
  • 通讯作者: 张凯兵(1975—),男,教授,博士。主要研究方向为模式识别与智能系统。E-mail: zhangkaibing@xpu.edu.cn
  • 作者简介:张惠(1992—),女,博士生。主要研究方向为纺织工程新技术及智能装备。
  • 基金资助:
    国家自然科学基金项目(62036007);国家自然科学基金项目(61971339);西安工程大学研究生创新基金项目(chx2025003);江西省教育厅科技项目青年项目(GJJ2202812)

Cross-attention excited color-semantic consistent generation for textile digital printing patterns

ZHANG Hui1,2, ZHOU Xuan1,2, WANG Junwei2,3, DENG Yongmei2, ZHANG Kaibing2,3()   

  1. 1. School of Textile Science and Engineering, Xi'an Polytechnic University, Xi'an, Shaanxi 710048, China
    2. Shaanxi Key Laboratory of Clothing Intelligence, Xi'an, Shaanxi 710048, China
    3. School of Computer Science, Xi'an Polytechnic University, Xi'an, Shaanxi 710048, China
  • Received:2025-06-03 Revised:2025-11-10 Published:2026-01-15 Online:2026-01-15

摘要:

针对文本到纺织数码印花图案生成任务中存在的图案色彩属性绑定错误问题,提出一种交叉注意力调控的数码印花图案生成方法。首先构建包含3 090个文本-印花图案样本对的数据集,用于模型微调和测试;随后以文本-图像生成稳定扩散模型为骨干网络,训练文本到数码印花图案生成模型。在模型推理过程中,构建交叉注意力色彩激励模块。该模块通过交叉注意力色彩损失,激励文本中色彩关键词对应的交叉注意力权值最大化,促使模型更加关注图案色彩的生成。结果表明:所提方法不仅在图案色彩语义一致性方面优于其它先进模型,在图案质量与视觉效果方面也表现出显著优势;文本循环一致性(T2T-Sim)指标和色彩文本准确度(C2T-Acc)指标分别较次优方法提升2.96%和8.94%。该方法有效提升了纺织数码印花图案设计与产品开发的效率和精度,增强了印花图案个性化定制能力,为新一代绿色纺织制造和技术创新提供了理论依据与技术支撑。

关键词: 数码印花图案, 跨模态生成, 色彩语义一致性, 扩散模型, 印花图案个性化定制, 人工智能生成内容技术

Abstract:

Objective Textile digital printing technology is popular in the textile dyeing and printing industry because of its high printing precision, fast production speed, and environmentally friendly processes. However, current digital printing pattern design still relies heavily on manual creation by designers, leading to long cycles, low efficiency, and poor market responsiveness. Leveraging Artificial Intelligence Generated Content (AIGC) technology to achieve rapid text-to-digital printing pattern generation can significantly improve the development efficiency of digital textile products and support user personalized customization, opening up new methods for digital pattern design. Nevertheless, mainstream text-to-image generation models (e.g., Stable Diffusion (SD) trained on generic datasets) have two key limitations, i.e. monotonous generated patterns lacking artistic diversity, and mismatch between the generated colors and the text-described color semantics due to inaccurate color attribute binding. Therefore, it is crucial to develop a specialized generative model for textile digital printing patterns and propose new methods to improve color generation accuracy.

Method A dataset containing 3 090 pairs of digital textile patterns and detailed textual descriptions was first constructed. The SD-V1.5 model was fine-tuned using the Low-Rank Adaptation (LoRA) technology. Subsequently, for the fine-tuned SD model, this study introduced a cross-attention-based color excitation module into the first 70% of the denoising process, without requiring any additional training. This module comprises two loss components, namely the target object color excitation loss and the background color excitation loss. By minimizing these two losses through gradient descent, the model learns to increase the attention weights of color-related keywords in the text prompt, thereby focusing more on the target and background colors of the pattern during generation. Finally, the color semantic consistency was evaluated using the CLIP Score, Text-Text Similarity (T2T-Sim), and a newly proposed Color-Text Accuracy (C2T-Acc) metric.

Results The effectiveness of the proposed method was evaluated through both qualitative and quantitative experiments. Qualitatively, the generated patterns under various text prompts and random seeds showed consistent style, pattern color, and background color with the textual descriptions. Benefiting from the diverse pattern types and richly annotated descriptions in the constructed dataset, the generated results also exhibited strong artistic creativity. Quantitatively, although the introduction of attention excitation caused slight perturbations to noise prediction, resulting in a minor decrease in the CLIP Score metric, the T2T-Sim and C2T-Acc indicators were improved by 2.96% and 8.94%, respectively, compared to the more advanced Structured Diffusion and Attend-and-Excite models. These results indicate that the proposed method not only significantly enhances the color semantic consistency of the patterns but also demonstrates substantial improvements in overall pattern quality and visual fidelity. Furthermore, ablation studies show that both the target color excitation and background color excitation contribute positively to the overall improvement, leading to better color generation, detailed pattern formation, and accurate background rendering.

Conclusion This study investigates cross-modal generation of textile digital printing patterns from textual descriptions. The powerful generative model SD-V1.5 is adopted as the baseline and fine-tuned on a custom-built dataset of textile printing patterns. In order to enhance the consistency between generated pattern colors and color semantics in the text, a cross-attention-based color excitation method is introduced, which increases the attention weights of color-related keywords during generation. Extensive qualitative and quantitative evaluations confirm the effectiveness of the proposed method. With only a textual input, users can efficiently obtain semantically aligned and high-quality textile digital printing patterns, enabling convenient, personalized customization. By leveraging advanced AIGC technologies, the proposed approach establishes a domain-specific generation model for textile digital printing, contributing to the development of new productive forces and facilitating the digital, intelligent, and sustainable transformation of the next-generation textile printing industry.

Key words: digital printing pattern, cross-modal generation, color-semantic consistency, diffusion model, personalized pattern customization, artificial intelligence generated content

中图分类号: 

  • TS101

图1

纺织数码印花数据集部分文本-图案样本对"

图2

交叉注意力色彩激励网络框架"

图3

本文方法生成的数码印花图案的可视化结果"

图4

本文方法与其它方法在固定随朵种子条件下的可视化对比"

表1

不同方法定量对比结果"

方法 CLIP
分数
T2T-
Sim
C2T-
Acc
TexTile
未微调原始
SD-V1.5
0.245 8 0.620 9 0.737 2 0.539 8
微调
SD-V1.5
0.246 5 0.635 3 0.774 2 0.605 8
Attend-and-
Excite
0.245 6 0.625 8 0.777 8 0.616 7
Structured
Diffusion
0.247 9 0.638 1 0.648 7 0.592 6
本文方法 0.245 6 0.657 0 0.847 3 0.618 5

表2

交叉注意力色彩激励消融实验"

目标对象
色彩激励
背景
色彩激励
CLIP分数 T2T-Sim C2T-Acc
× × 0.246 5 0.635 3 0.774 2
× 0.246 2 0.644 9 0.825 6
× 0.245 8 0.641 5 0.795 7
0.245 6 0.657 0 0.847 3

图5

目标对象色彩激励和背景色彩激励消融实验对比"

图6

C2T-Acc指标随尺度因子α变化趋势图"

[1] 丁思佳, 林琳, 董淑秀, 等. 2024年中国纺织品数码喷墨印花发展报告[J]. 染整技术, 2024, 46(12): 6-18.
DING Sijia, LIN Lin, DONG Shuxiu, et al. 2024 China textile digital inkjet printing development report[J]. Textile Dyeing and Finishing Journal, 2024, 46(12): 6-18.
[2] 关芳兰, 王建明, 陈嘉滢, 等. 二醋酯纤维织物分散染料免蒸洗数码印花工艺[J]. 纺织学报, 2024, 45(12): 137-143.
doi: 10.13475/j.fzxb
GUAN Fanglan, WANG Jianming, CHEN Jiaying, et al. Non-steaming digital printing process of diacetate fabric with disperse dyes[J]. Journal of Textile Research, 2024, 45(12): 137-143.
doi: 10.13475/j.fzxb
[3] 陈家辉, 梁跃耀, 陈妮, 等. 棉织物喷墨印花打印方式的调控及其应用[J]. 纺织学报, 2023, 44(7): 159-166.
CHEN Jiahui, LIANG Yueyao, CHEN Ni, et al. Research and application of ink jet printing on cotton fabrics[J]. Journal of Textile Research, 2023, 44(7): 159-166.
[4] 郑畑子, 王建萍. 服装印花图案设计的感性研究[J]. 纺织学报, 2020, 41(8): 101-107.
ZHENG Tianzi, WANG Jianping. Perceptual research on printing pattern design for clothing[J]. Journal of Textile Research, 2020, 41(8): 101-107.
doi: 10.1177/004051757104100203
[5] 郑小虎, 刘正好, 陈峰, 等. 纺织工业智能发展现状与展望[J]. 纺织学报, 2023, 44(8): 205-216.
ZHENG Xiaohu, LIU Zhenghao, CHEN Feng, et al. Current status and prospect of intelligent development in textile industry[J]. Journal of Textile Research, 2023, 44(8): 205-216.
[6] 冉二飞, 贾小军, 喻擎苍, 等. 基于SE注意力CycleGAN的蓝印花布单纹样自动生成[J]. 丝绸, 2024, 61(1): 31-37.
RAN Erfei, JIA Xiaojun, YU Qingcang, et al. Single pattern automatic generation of blue calico based on SE attention CycleGAN[J]. Journal of Silk, 2024, 61(1): 31-37.
[7] SU Z B, ZHAO S Y, ZHANG H H, et al. Digital printing image generation method based on style transfer[J]. Textile Research Journal, 2023, 93(23/24): 5211-5223.
doi: 10.1177/00405175231195367
[8] 张佳伟, 李华军, 王秀丽, 等. 基于扩散模型的印花图案生成方法设计[J]. 计算机测量与控制, 2024, 32(10): 243-249.
ZHANG Jiawei, LI Huajun, WANG Xiuli, et al. Design of printed pattern generation method based on diffusion models[J]. Computer Measurement & Control, 2024, 32(10): 243-249.
[9] 王罕仁, 张华熊. 基于生成对抗网络与稳定扩散模型的花卉丝巾图案生成方法[J]. 浙江理工大学学报(自然科学), 2025, 50(4): 556-570.
WANG Hanren, ZHANG Huaxiong. A generative method for floral scarf patterns using GANs and stable diffusion models[J]. Journal of Zhejiang Sci-Tech University (Natural Sciences), 2025, 50(4): 556-570.
[10] CHEFER H, ALALUF Y, VINKER Y, et al. Attend-and-excite: attention-based semantic guidance for text-to-image diffusion models[J]. ACM Transactions on Graphics, 2023, 42(4): 1-10.
[11] FENG W, HE X, FU T J, et al. Training-free structured diffusion guidance for compositional text-to-image synthesis[C]// The Eleventh International Conference on Learning Representations(ICLR). Kigali: ICLR, 2023:3-12.
[12] AHMAD HASSAN YAR G N, TAHA M, AFZAL Z, et al. TexGAN: textile pattern generation using deep convolutional generative adversarial net-work(DCGAN)[C]// 2023 IEEE International Conference on Emerging Trends in Engineering, Sciences and Technology (ICES&T). New York: IEEE, 2023: 1-6.
[13] KARAGOZ H F, BAYKAL G, EKSI I A, et al. Textile pattern generation using diffusion models[C]// 2023 International Textile & Fashion Congress. Istanbul: ITFC, 2023: 48-53.
[14] HO J, JAIN A, ABBEEL P. Denoising diffusion probabilistic models[J]. Advances in Neural Information Processing Systems, 2020, 33: 6840-6851.
[15] ROMBACH R, BLATTMANN A, LORENZ D, et al. High-resolution image synthesis with latent diffusion models[C]// 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). New York: IEEE, 2022: 10674-10685.
[16] HU E J, SHEN Y, WALLIS P, et al. Lora: low-rank adaptation of large language models[J]. International Conference on Learning Representations, 2022, 1(2): 3.
[17] RADFORD A, KIM J W, HALLACY C, et al. Learning transferable visual models from natural language supervision[C]// International Conference on Machine Learning, 2021: 8748-8763.
[18] LI Q, FU X M, WANG X, et al. Unveiling structural memorization: structural membership inference attack for text-to-image diffusion models[C]// Proceedings of the 32nd ACM International Conference on Multimedia. New York: ACM, 2024: 10554-10562.
[19] RODRIGUEZ-PARDO C, CASAS D, GARCES E, et al. Textile:a differentiable metric for texture tile-ability[C]// 2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). New York: IEEE, 2024: 4439-4449.
[20] XIE J H, LI Y X, HUANG Y W, et al. BoxDiff:text-to-image synthesis with training-free box-constrained diffusion[C]// 2023 IEEE/CVF International Conference on Computer Vision (ICCV). New York: IEEE, 2023: 7418-7427.
[1] 赵泽文, 吕宽, 苏旭中, 孙丰鑫. 短纤纱力学性能的宏细观耦合分析与数值模拟[J]. 纺织学报, 2026, 47(1): 106-114.
[2] 邵剑波, 岳欣琰, 陈雨, 韩潇, 洪剑寒. 全针织结构多模态柔性电容传感器的构筑及其传感性能[J]. 纺织学报, 2026, 47(1): 123-131.
[3] 王嘉禧, 袁国澍, 陈晓宇, 陈双婷, 缪莹, 付驰宇, 唐文杨. 纤维基比色气体传感器研究现状和发展趋势[J]. 纺织学报, 2026, 47(1): 259-267.
[4] 张子悦, 江红霞, 刘基宏. 单色机织物数字纹理色卡的设计与评价[J]. 纺织学报, 2025, 46(10): 167-175.
[5] 吴晋瑶, 钟毅, 张琳萍, 徐红, 毛志平. 基于聚苯胺的柔性红外隐身薄膜的制备与性能[J]. 纺织学报, 2025, 46(09): 1-8.
[6] 季惠, 肖红. 玻璃包覆磁性非晶态合金纤维的结构与电磁响应特性[J]. 纺织学报, 2025, 46(09): 9-18.
[7] 张兆栋, 王蕾, 潘如如. 基于ABAQUS模拟的准零刚度织物隔振器制备[J]. 纺织学报, 2025, 46(09): 163-170.
[8] 曾姚, 吕金凤, 王介平, 刘荣鹏, 周婵. 三维蚕丝蛋白支架的应用研究进展[J]. 纺织学报, 2025, 46(09): 258-267.
[9] 张晓婷, 赵鹏宇, 潘如如, 高卫东. 基于深度特征融合的格子织物图像检索方法[J]. 纺织学报, 2025, 46(08): 89-95.
[10] 权英, 张爱琴, 张曼, 刘淑强, 张钰晶. 基于三维编织结构的柔性应变传感器制备及其性能[J]. 纺织学报, 2025, 46(08): 136-144.
[11] 王子涵, 李勇, 陈晓川, 汪军, 梁凌杰. 废旧棉织物破碎加工过程的建模与仿真[J]. 纺织学报, 2025, 46(07): 136-143.
[12] 李朵, 谢晓雯, 张迪凡, 吴景霞, 陆凯, 陈培宁. Wi-Fi双频织物天线的构建及其电磁性能[J]. 纺织学报, 2025, 46(05): 10-16.
[13] 李鹏飞, 罗忆心, 张子凡, 陆宁, 陈碧泠, 许建梅. 丝素/壳聚糖/明胶栓塞微球的制备及其降解性能[J]. 纺织学报, 2025, 46(05): 116-124.
[14] 顾孟尚, 张宁, 潘如如, 高卫东. 结合频域卷积模块的机织物图像疵点目标检测[J]. 纺织学报, 2025, 46(05): 159-168.
[15] 梁琦敏, 鄢卓君, 李长昕, 刘志锋, 何思斯. 纤维及织物基电化学传感器与水系电池的研究进展与展望[J]. 纺织学报, 2025, 46(05): 89-95.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!