纺织学报 ›› 2021, Vol. 42 ›› Issue (07): 123-128.doi: 10.13475/j.fzxb.20200705106

• 染整与化学品 • 上一篇    下一篇

基于模拟退火算法改进遗传算法的织物智能配色

许雪梅()   

  1. 浙江理工大学 信息学院, 浙江 杭州 310018
  • 收稿日期:2020-07-21 修回日期:2021-04-02 出版日期:2021-07-15 发布日期:2021-07-22
  • 作者简介:许雪梅(1996—),女,硕士生。主要研究方向为智能配色。E-mail: summer_mei18@163.com

Improved genetic algorithm for fabric formulation prediction based on simulated annealing algorithm

XU Xuemei()   

  1. School of Information Science and Technology, Zhejiang Sci-Tech University, Hangzhou, Zhejiang 310018, China
  • Received:2020-07-21 Revised:2021-04-02 Published:2021-07-15 Online:2021-07-22

摘要:

为提高传统配色方法及现有配色算法的配色精度、效率及泛化能力,构建了基于BP神经网络的遗传算法和模拟退火算法相结合的织物智能配色模型,利用BP神经网络预测颜色,将训练好的BP神经网络与CIEDE2000色差公式结合作为遗传算法的适应度函数,用模拟退火算法改进的基于BP神经网络的遗传算法预测颜色配方,并根据预测的配方对涤纶织物进行染色实验,计算实验色差。结果表明:模拟退火算法优化的基于BP神经网络的遗传算法配色模型只需经过80次迭代即可收敛,预测颜色的理论色差均值为0.165,染色实验色差均值为0.289,配方绝对误差平均值为0.010 7;验证样本的理论色差均值为0.240,染色实验色差均值为0.437。该算法可实现织物的智能配色。

关键词: 配色预测, BP神经网络, 遗传算法, 模拟退火算法, 色差, 织物智能配色

Abstract:

In order to improve the color matching accuracy, efficiency and generalization ability of traditional color matching methods and existing color matching algorithms, a fabric intelligent color matching model based on the combination of genetic algorithm and simulated annealing algorithm based on BP neural network was constructed, and the color was predicted by the trained BP neural network. The good BP neural network and the CIEDE2000 color difference formula were combined to form the fitness function of the genetic algorithm. The genetic algorithm based on the BP neural network improved by the simulated annealing algorithm was used to predict the color formula, and the polyester fabric was dyed according to the predicted recipe. The research results show that the genetic algorithm color matching model optimized by the simulated annealing algorithm based on BP neural network only needs 80 iterations to converge. The theoretical average color difference of the predicted colors is 0.165, the average color difference from dyeing experiments is 0.289, and the average absolute error of the formula is 0.010 7. The average theoretical color difference of the verification sample is 0.240, and the average color difference of the dyeing experiment is 0.437. It is proved that the algorithm can realize the intelligent color matching of fabrics.

Key words: color-matching prediction, BP neural network, genetic algorithm, simulated annealing algorithm, color difference, intelligent color matching of fabric

中图分类号: 

  • TS193.13

表1

标准样本颜色配方和色度参数"

样本编号 配方/% 色度值
L* a* b*
1 0.10 0.30 2.80 30.694 -10.374 -17.745
2 1.00 0.20 1.20 34.313 0.790 -16.182
3 0.20 2.60 0.40 41.730 2.040 33.974
4 2.60 0.15 0.05 44.569 41.907 4.242
5 0.40 1.20 0.40 42.674 -1.439 24.663
6 0.15 0.05 2.20 34.886 -2.647 -31.032
7 2.20 0.12 0.08 44.438 37.492 0.153
8 0.30 0.10 2.40 32.020 -2.628 -27.608
9 0.60 1.80 0.40 40.459 4.100 27.722
10 0.70 0.30 1.80 32.187 -5.570 -14.896
11 1.20 1.40 0.20 42.384 17.285 27.896
12 1.80 0.70 0.30 38.402 17.483 11.890
13 0.20 2.40 0.60 38.839 -3.067 28.179
14 2.60 0.20 0.40 35.839 22.868 -7.744
15 2.80 0.25 0.15 40.245 33.219 2.460
16 3.00 0.08 0.12 41.164 38.604 -5.183
17 1.40 1.60 0.20 41.542 19.332 28.616
18 0.20 1.20 1.40 33.553 -14.272 9.528

表2

BP神经网络验证结果"

样本编号 预测色度值 色差
L' a' b'
1 30.657 -10.526 -17.984 0.154
2 34.632 0.649 -16.327 0.244
3 41.450 2.076 33.699 0.170
4 44.845 41.885 4.349 0.139
5 42.839 -1.477 24.758 0.094
6 34.514 -2.711 -31.175 0.178
7 44.484 37.305 -0.011 0.119
8 32.302 -2.667 -27.609 0.116
9 40.620 3.844 27.590 0.230
10 32.511 -5.735 -14.793 0.224
11 42.223 17.504 27.956 0.157
12 38.535 17.832 12.030 0.151
13 38.682 -2.841 28.158 0.200
14 36.179 23.133 -7.882 0.207
15 40.236 33.025 2.387 0.088
16 41.355 38.726 -5.369 0.136
17 40.989 19.517 28.725 0.269
18 33.582 -14.390 9.516 0.091

表3

算法训练收敛性分析"

参数 数值
1 2 3
种群规模 500 100 100
迭代次数 1 000 1 000 2 000
迭代收敛次数 80 300 300
收敛色差 Δ E 00 0.152 0.306 0.297

表4

GA-BP-SA算法预测结果"

样本编号 预测配方/% 绝对误差
1 0.101 5 0.277 7 2.801 4 0.001 5 0.022 3 0.001 4
2 1.010 7 0.209 4 1.172 4 0.010 7 0.009 4 0.027 6
3 0.198 8 2.594 8 0.428 6 0.001 2 0.005 2 0.028 6
4 2.618 4 0.156 1 0.038 4 0.018 4 0.006 1 0.011 6
5 0.425 0 1.184 4 0.383 6 0.025 0 0.015 6 0.016 4
6 0.160 9 0.057 5 2.196 1 0.010 9 0.007 5 0.003 9
7 2.201 1 0.128 2 0.077 5 0.001 1 0.008 2 0.002 5
8 0.302 6 0.135 0 2.401 8 0.002 6 0.035 0 0.001 8
9 0.587 2 1.805 4 0.430 6 0.012 8 0.005 4 0.030 6
10 0.711 3 0.301 6 1.789 9 0.011 3 0.001 6 0.010 1
11 1.191 0 1.395 5 0.215 3 0.009 0 0.004 5 0.015 3
12 1.789 4 0.717 4 0.306 9 0.010 6 0.017 4 0.006 9
13 0.198 0 2.381 8 0.603 8 0.002 0 0.018 2 0.003 8
14 2.606 1 0.228 2 0.432 0 0.006 1 0.028 2 0.032 0
15 2.790 7 0.256 6 0.154 2 0.009 3 0.006 6 0.004 2
16 2.995 4 0.086 3 0.118 1 0.004 6 0.006 3 0.001 9
17 1.386 1 1.601 5 0.182 9 0.013 9 0.001 5 0.017 1
18 0.207 4 1.198 9 1.401 8 0.007 4 0.001 1 0.001 8

表5

染色样本CIELab色度值和各分量色差值"

样本编号 染色样本色度值 Δ L * Δ a * Δ b * Δ C * Δ H *
L' a' b'
1 30.651 -10.642 -17.649 -0.043 -0.268 0.096 0.046 -0.014
2 34.261 0.527 -16.138 -0.052 -0.263 0.044 -0.057 -0.016
3 41.309 2.091 33.865 -0.421 0.051 -0.109 -0.418 -0.002
4 44.292 41.854 3.967 -0.278 -0.053 -0.275 -0.238 -0.006
5 42.345 -1.207 24.926 -0.329 0.232 0.263 -0.336 -0.010
6 34.997 -2.230 -31.066 0.111 0.417 -0.034 0.082 0.047
7 44.650 37.976 0.106 0.212 0.484 -0.047 0.475 -0.001
8 32.149 -2.989 -27.339 0.129 -0.361 0.269 0.160 -0.015
9 40.087 4.161 27.481 -0.372 0.061 -0.241 -0.364 -0.023
10 32.261 -5.488 -14.133 0.074 0.082 0.763 0.059 -0.018
11 42.728 17.246 27.388 0.344 -0.039 -0.508 0.304 -0.007
12 38.032 17.521 11.604 -0.370 0.038 -0.286 -0.321 -0.012
13 38.601 -3.503 28.009 -0.238 -0.436 -0.170 -0.200 0.025
14 35.508 23.156 -7.749 -0.331 0.288 -0.005 -0.122 0.004
15 40.665 33.676 2.054 0.420 0.457 -0.406 0.615 -0.019
16 41.065 38.157 -5.034 -0.099 -0.447 0.149 -0.377 0.008
17 41.989 19.657 28.417 0.447 0.325 -0.199 0.543 -0.011
18 33.485 -14.502 10.051 -0.068 -0.230 0.523 0.028 -0.017

表6

分量色差偏移规律"

分量色差值 颜色
+(正值) -(负值)
Δ L * 偏亮 偏暗
Δ a * 偏红 偏绿
Δ b * 偏黄 偏蓝
Δ C * 偏鲜艳 偏暗

表7

染色样本与标准样本之间的实验色差值"

样本编号 实验色差值 样本编号 实验色差值
1 0.229 10 0.452
2 0.311 11 0.303
3 0.199 12 0.266
4 0.201 13 0.396
5 0.296 14 0.206
6 0.314 15 0.367
7 0.208 16 0.182
8 0.365 17 0.354
9 0.210 18 0.346

表8

GA-BP-SA算法配色精度分析"

Δ E - 不同实验色差在染色样本中比例/%
Δ E 0.2 Δ E 0.3 Δ E 0.4 Δ E 0.5
0.289 11.11 50.00 94.44 100.00

图1

验证样本理论色差值和实验色差值"

[1] 张贵, 王美佳, 杨爱民. 计算机测配色在涤纶织物精准配方染色中的应用[J]. 染整技术, 2019, 41(2):23-27.
ZHANG Gui, WANG Meijia, YANG Aimin. Application of computer color matching system in the precision formula dyeing of polyester fabrics[J]. Textile Dyeing and Finishing Journal, 2019, 41(2):23-27.
[2] 赵黎, 杨连贺, 黄新. 基于多目标蜂群优化算法的计算机辅助配色[J]. 计算机集成制造系统, 2018, 24(2):381-388.
ZHAO Li, YANG Lianhe, HUANG Xin. Hierarchical multi-hive bee colony algorithm for computer aided color design[J]. Computer Integrated Manufacturing Systems, 2018, 24(2):381-388.
[3] 徐海松. Kubelka-Munk理论在纺织印染自动配色中的应用研究[J]. 光子学报, 1998, 27(4):338-341.
XU Haisong. The application research of Kubelka-Munktheory to automatic color matching in textile dyeing[J]. Acta Photonica Sinica, 1998, 27(4):338-341.
[4] 周华, 王春燕, 罗来丽, 等. 基于Kubelka-Munk双常数理论的纬全显色提花织物配色算法[J]. 纺织学报, 2012, 33(5):35-39.
ZHOU Hua, WANG Chunyan, LUO Laili, et al. Spectrophotometric color matching algorithm of jacquard fabric with all colored wefts based on Kubelka-Munk double constant theory[J]. Journal of Textile Research, 2012, 33(5):35-39.
[5] 张婷婷, 薛元, 贺玉东, 等. 环锭数码纱Kubelka-Munk双常数配色模型构建及其色彩预测[J]. 纺织学报, 2020, 41(1):50-55.
ZHANG Tingting, XUE Yuan, HE Yudong, et al. Construction of Kubelka-Munk double-constant color matching model for ring digital yarn color prediction[J]. Journal of Textile Research, 2020, 41(1):50-55.
[6] YANG Ruihua, XU Yaya, DENG Qianqian, et al. K-M theory of fabric knitted by three-channel rotor spun wool yarn[J]. Color Research Application, 2019, 44(2):243-248.
doi: 10.1002/col.v44.2
[7] 张安岭, 张秉森. 基于Elman神经网络的织物染色的配色[J]. 山东纺织科技, 2006(3):37-39.
ZHANG Anling, ZHANG Bingsen. Color matching for textile dyeing based on Elman neural network[J]. Shandong Textile Science & Technology, 2006(3):37-39.
[8] ROCCO Furferi, LAPO Governi, YARY Volpe. Color matching of fabric blends: hybrid Kubelka-Munk + artificial neural network based method[J]. Journal of Electronic Imaging, 2016, 25(6):1-10.
[9] 王巍娟, 张秉森, 聂晴晴, 等. 隐层改进的 BP 网络在织物染色配色中的应用[J]. 青岛大学学报(工程技术版), 2008, 23(4):40-44.
WANG Weijuan, ZHANG Bingsen, NIE Qingqing, et al. Research on application of BP neural networks in computer color matching for textile dyeing based on hidden layer improvement[J]. Journal of Qingdao University (E&T), 2008, 23(4):40-44.
[10] 肖春华. 基于改进深层神经网络的织物配方智能预测算法[J]. 计算机时代, 2019(10):65-69.
XIAO Chunhua. Intelligent prediction algorithm for fabric formula based on improved deep neural network[J]. Computer Era, 2019(10):65-69.
[11] CHAOUCH Sabrine, MOUSSA Ali, BEN Marzoug Imed, et al. Application of ant colony optimization to color matching of dyed cotton fabrics with direct dyestuffs mixtures[J]. Color Research Application, 2019, 44(4):556-567.
doi: 10.1002/col.v44.4
[12] CHAOUCH Sabrine, MOUSSA Ali, BEN Marzoug Imed, et al. Colour recipe prediction using ant colony algorithm: principle of resolution and analysis of performances[J]. Coloration Technology, 2019, 135(5):349-360.
doi: 10.1111/cote.12409
[1] 周亚勤, 王攀, 张朋, 张洁. 纬编织造车间生产调度方法研究[J]. 纺织学报, 2021, 42(04): 170-176.
[2] 张卓, 丛洪莲, 蒋高明, 董智佳. 基于交互式遗传算法的Polo衫快速款式推荐系统[J]. 纺织学报, 2021, 42(01): 138-144.
[3] 裘柯槟, 陈维国, 周华. 用光谱成像技术与分光光度法测量织物颜色的比较分析[J]. 纺织学报, 2020, 41(11): 73-80.
[4] 李亮, 倪俊芳. 绗缝机花样加工代码自动生成算法[J]. 纺织学报, 2020, 41(11): 162-167.
[5] 谢子昂, 杜劲松, 赵国华. 衬衫吊挂流水线的自适应动态调度[J]. 纺织学报, 2020, 41(10): 144-149.
[6] 程璐, 陈婷婷, 曹吉强, 王颖, 夏鑫. 基于光谱反射率的色纺纱计算机修色算法[J]. 纺织学报, 2020, 41(09): 39-44.
[7] 张晓侠, 刘凤坤, 买巍, 马崇启. 基于BP神经网络及其改进算法的织机效率预测[J]. 纺织学报, 2020, 41(08): 121-127.
[8] 应双双, 裘柯槟, 郭宇飞, 周赳, 周华. 纺织品色彩管理色表测量数据的误差优化[J]. 纺织学报, 2020, 41(08): 74-80.
[9] 黄珍珍, 莫碧贤, 温李红. 基于遗传算法及仿真技术的服装生产流水线平衡[J]. 纺织学报, 2020, 41(07): 154-159.
[10] 郑小虎, 鲍劲松, 马清文, 周衡, 张良山. 基于模拟退火遗传算法的纺纱车间调度系统[J]. 纺织学报, 2020, 41(06): 36-41.
[11] 莫帅, 冯战勇, 唐文杰, 党合玉, 邹振兴. 基于神经网络和遗传算法的锭子弹性管性能优化[J]. 纺织学报, 2020, 41(04): 161-166.
[12] 张戈, 周建, 王蕾, 潘如如, 高卫东. 用分光光度计法测量纤维颜色的影响因素[J]. 纺织学报, 2020, 41(04): 72-77.
[13] 黄淇, 周其洪, 张倩, 王绍宗, 范伟, 孙会丰. 基于系统布置设计-遗传算法的纱线浸染生产线布局优化[J]. 纺织学报, 2020, 41(03): 84-90.
[14] 杨红英, 惠志奎, 杨志晖, 张靖晶, 谢宛姿, 周金利. 基于汉风色典的不同色差公式的色差均匀性[J]. 纺织学报, 2020, 41(02): 103-108.
[15] 金守峰, 林强强, 马秋瑞, 张浩. 基于BP神经网络的织物表面绒毛质量的检测方法[J]. 纺织学报, 2020, 41(02): 69-76.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!