纺织学报 ›› 2020, Vol. 41 ›› Issue (02): 69-76.doi: 10.13475/j.fzxb.20181201008

• 纺织工程 • 上一篇    下一篇

基于BP神经网络的织物表面绒毛质量的检测方法

金守峰1(), 林强强1, 马秋瑞2, 张浩1   

  1. 1.西安工程大学 机电工程学院, 陕西 西安 710048
    2.西安工程大学 服装与艺术设计学院, 陕西 西安 710048
  • 收稿日期:2018-12-06 修回日期:2019-11-20 出版日期:2020-02-15 发布日期:2020-02-21
  • 作者简介:金守峰(1979—),男,副教授,博士。主要研究方向为机器视觉检测与机器人控制。E-mail: jdxyjsf@126.com
  • 基金资助:
    陕西省自然科学基础研究计划项目(2017JM5141);陕西省教育厅专项科研计划项目(17JK0334);西安工程大学博士基金项目(BS1535);西安市科技局创新引导项目(201805030YD8CG145)

Method for detecting fluff quality of fabric surface based on BP neural network

JIN Shoufeng1(), LIN Qiangqiang1, MA Qiurui2, ZHANG Hao1   

  1. 1. College of Mechanical and Electrical Engineering, Xi'an Polytechnic University, Xi'an, Shaanxi 710048,China
    2. College of Apparel & Art Design, Xi'an Polytechnic University, Xi'an, Shaanxi 710048, China
  • Received:2018-12-06 Revised:2019-11-20 Online:2020-02-15 Published:2020-02-21

摘要:

为了对起毛工艺后的织物表面绒毛状态进行客观评定,提出了基于BP神经网络的织物表面绒毛质量的检测方法。以光切成像原理采集绒毛轮廓图像,利用自适应图像分割方法对绒毛区域进行分割,将得到的二值图像应用Freeman链码原理提取织物的上边缘轮廓坐标,以此作为BP神经网络的输入对BP神经网络进行训练,并将训练得到的2组权值根据BP神经网络的计算过程进行验证,提出应用激活函数和训练的权值相结合直接计算的方法。应用基于光切成像原理搭建的绒毛织物检测平台,对4种不同颜色和不同起毛工艺加工后的织物进行检测,准确率为93.02%;且权值的计算结果与网络实际计算结果相符合,因此可以直接利用网络训练的权值做矩阵运算,缩短实际检测的时间。

关键词: 绒毛织物, 机器视觉, BP神经网络, 光切成像, 起毛工艺

Abstract:

In order to evaluate objectively the fluff state of fabric surface after the raising process, a method for detecting the surface fluff quality of the fabric based on BP neural network was proposed. The fluff contour image was collected by the principle of optical imaging, and the fluff region was segmented by adaptive image segmentation method. The Freeman chain code principle was applied to the obtained binary image to extract the upper edge contour coordinates of the fabric, and the BP neural network was trained as an input of the BP neural network. The two sets of weights obtained through the training were verified according to the calculation process of the BP neural network, and the method of applying the activation function and the weight of the training combined with the direct calculation was proposed. Applying the fluff fabric detection platform built on the principle of optical imaging, the fabrics processed by four different colors and different fluffing processes were tested. The detection accuracy rate reached 93.02%, and the calculation result of the weight is shown consistent with the actual calculation result of the network. This suggests that the weight of the network training may be used directly for the matrix calculation, which can shorten the actual detection time.

Key words: fabric with fluff, machine vision, BP neural network, optical imaging, raising process

中图分类号: 

  • TN911.73

图1

光切成像原理"

图2

绒毛织物切向图像"

图3

灰度直方图"

图4

绒毛区域"

图5

织物绒毛轮廓边缘坐标提取"

图6

3层BP神经网络"

表1

神经网络模型分析"

训练函数 隐含层 输出层 训练时间/s 准确率/%
traingd Log-Sigmoid Log-Sigmoid 1 41.86
Tan-Sigmoid 12 86.05
purelin 13 83.72
Tan-Sigmoid
Log-Sigmoid 1 53.49
Tan-Sigmoid 11 93.02
purelin 4 83.72
traingdm Log-Sigmoid Log-Sigmoid 1 53.49
Tan-Sigmoid 1 60.47
purelin 12 88.37
Tan-Sigmoid
Log-Sigmoid 1 55.81
Tan-Sigmoid 1 60.47
purelin 1 30.23
traingdx Log-Sigmoid Log-Sigmoid 1 55.81
Tan-Sigmoid 1 55.81
purelin 1 88.37
Tan-Sigmoid
Log-Sigmoid 1 72.09
Tan-Sigmoid 1 60.47
purelin 1 86.05
trainb Log-Sigmoid Log-Sigmoid 2 41.84
Tan-Sigmoid 1 60.47
purelin 30 48.84
Tan-Sigmoid
Log-Sigmoid 1 44.84
Tan-Sigmoid 1 55.81
purelin 1 37.21
trainscg Log-Sigmoid Log-Sigmoid 1 67.44
Tan-Sigmoid 1 90.70
purelin 1 74.42
Tan-Sigmoid
Log-Sigmoid 1 76.74
Tan-Sigmoid 1 86.05
purelin 2 88.37
trainr Log-Sigmoid Log-Sigmoid 14 74.42
Tan-Sigmoid 10 83.72
purelin 11 81.40
Tan-Sigmoid
Log-Sigmoid 13 88.37
Tan-Sigmoid 7 83.72
purelin 11 76.74

图7

样本数据集部分照片"

图8

不同组合的实际值和预测值"

图9

起毛工艺后的织物"

表2

检测结果对比"

织物
类型
期望输
出值
BP神经网络
实际输出值
本文方法
评判结果
人工
评判
a# 0 0.192 4 不合格 不合格
b# 1 0.987 0 合格 合格
c# 1 0.966 5 合格 合格
d# 1 0.900 5 合格 合格

表3

BP神经网络权值验证结果"

-0.080 0 -0.021 0 -0.037 0 0.079 5 0.003 5 -0.007 0 0.059 9
-0.037 0 -0.067 0 0.055 6 0.011 4 -0.069 0 -0.052 0 0.009 0
wmi隐含层权值 -0.040 0 -0.064 0 -0.074 0 -0.040 0 -0.025 0 0.031 3 -0.001 0
?
-0.138 0 -0.021 0 0.083 6 -0.016 0.016 5 0.048 3 0.030 9
b1隐含层阈值 1.473 4 1.222 4 -1.076 0 0.788 0 0.660 1 …… 1.192 5 -1.413 6
wij输出层权值 0.830 7 0.797 6 -0.671 8 -0.465 0.803 3 …… -0.311 0 -0.602 0
b2输出层阈值 -0.006 5

图10

计算权值验证"

[1] 孙艳, 郭娟琛, 杨建忠. 毛织物视觉风格研究[J]. 毛纺科技, 2008(12):37-40.
SUN Yan, GUO Juanchen, YANG Jianzhong. Study on the visual style of worsted fabrics[J]. Wool Textile Journal, 2008(12):37-40.
[2] 陈慧. 毛纺面料特性对服装设计的影响[J]. 毛纺科技, 2016(8):48-50.
CHEN Hui. Influence of clothing design of characteristics of wool fabric[J]. Wool Textile Journal, 2016(8):48-50.
[3] MAK K L, PENG P, YIU K F C. Fabric defect detection using multi-level tuned-matched Gabor filter[J]. Journal of Industrial and Management Optimization, 2012,8(2):325-341.
[4] JING J F, ZANG H H, LI P F, et al. Fabric defect detection using Gabor filters and defect classification based on LBP and Tamura method[J]. Journal of the Textile Institute, 2013,104(1):18-27.
doi: 10.1080/00405000.2012.692940
[5] 李春雷, 高广帅, 刘洲峰, 等. 应用方向梯度直方图和低秩分解的织物疵点检测算法[J]. 纺织学报, 2017,38(3):149-154.
LI Chunlei, GAO Guangshuai, LIU Zhoufeng, et al. Fabric defect detection algorithm based on histogram of oriented gradient and low-rank decomposition[J]. Journal of Textile Research, 2017,38(3):149-154.
[6] 杨曼, 李仁忠, 刘阳阳, 等. 基于改进迭代匹配滤波的织物疵点检测[J]. 西安工程大学学报, 2017,31(3):383-389.
YANG Man, LI Renzhong, LIU Yangyang, et al. Fabric defect detection based on improved iterative match filter algorithm[J]. Journal of Xi'an Polytechnic University, 2017,31(3):383-389.
[7] 何峰, 周亚同, 赵翔宇, 等. 纹理织物疵点窗口跳步形态学法检测[J]. 纺织学报, 2017,38(10):124-131.
HE Feng, ZHOU Yatong, ZHAO Xiangyu, et al. Textured fabric defect detection based on windowedhop-step morphological algorithm[J]. Journal of Textile Research, 2017,38(10):124-131.
[8] KIM S M, PPAR C K. Evaluation of fabric pilling using hybrid imaging methods[J]. Fibers and Polymers, 2006,7(1):71-89.
[9] 汪亚明, 崔新辉, 韩永华. 基于小波变换及Gabor滤波的起毛起球图像分割[J]. 丝绸, 2016,53(3):37-40.
WANG Yaming, CUI Xinhui, HAN Yonghua. Fabric pilling image segmentation based on wavelet transform and Gabor filter[J]. Journal of Silk, 2016,53(5):37-40.
[10] 周圆圆, 潘如如, 高卫东, 等. 基于标准样照与图像分析的织物起毛起球评等方法[J]. 纺织学报, 2010,31(10):29-33.
ZHOU Yuanyuan, PAN Ruru, GAO Weidong, et al. Evaluation of fabric pilling based on standard images and image analysis[J]. Journal of Textile Research, 2010,31(10):29-33.
[11] 杨松林, 马帅, 丁朝鹏, 等. 应用机器视觉的织物表面绒毛率测试系统[J]. 纺织学报, 2017,38(6):118-123.
YANG Songlin, MA Shuai, DING Zhaopeng, et al. Fabric surface fluff rate detecting system based on machine vision[J]. Journal of Textile Research, 2017,38(6):118-123.
[12] 张恒, 张欣, 贺兴时. 应用BP神经网络估算服装铺料长度[J]. 纺织学报, 2009,30(5):109-113.
ZHANG Heng, ZHANG Xin, HE Xingshi. Using BP neural network to predict the length of garment marking[J]. Journal of Textile Research, 2009,30(5):109-113.
[13] 刘为敏, 谢红. BP神经网络下的智能化合体服装样板生成[J]. 纺织学报, 2018,39(7):116-121.
LIU Weimin, XIE Hong. Generation of intelligent fitting pattern based on BP neural network[J]. Journal of Textile Research, 2018,39(7):116-121.
[14] ZHOU H, DING W F, LI Z, et al. Predicting the grinding force of titanium matrix composites using the genetic algorithm optimizing back-propagation neural network model[J]. Proceedings of the Institution of Mechanical Engineers, Part B: Journal of Engineering Manufacture, 2019,233(4):1157-1167.
doi: 10.1177/0954405418780166
[15] ZHANG R, QIANG L, TAO J, et al. Data driven modeling using an optimal principle component analysis based neural network and its application to a nonlinear coke furnace[J]. Industrial & Engineering Chemistry Research, 2018,57(18):6344-6352.
[16] NICOLA G D, COCCIA G, PIERANTOZZI M, et al. Artificial neural network for the second virial coefficient of organic and inorganic compounds: an ANN for B of organic and inorganic compounds[J]. Chemical Engineering Communications, 2018,205(8):1077-1095.
doi: 10.1080/00986445.2018.1433664
[17] 袁冰清, 程功, 郑柳刚. BP神经网络基本原理[J]. 数字通信世界, 2018(8):28-29.
YUAN Bingqing, CHENG Gong, ZHENG Liugang. Basic principle of BP neural networks[J]. Digital Communication World, 2018(8):28-29.
[18] ZIEGLER J C, MONTANT M, BRIESEMEISTER B B, et al. Do Words stink? neural reuse as a principle for understanding emotions in reading[J]. Journal of Cognitive Neuroscience, 2018,30(7):1023-1032.
doi: 10.1162/jocn_a_01268 pmid: 29668395
[19] LEI X, ZHEN Z, SHENG Y, et al. Modeling and simulation of coal gas concentration prediction based on the BP neural network[J]. International Symposium on Information Engineering & Electronic Commerce, 2011(3):562-565.
[20] 温宗周, 刘现华. 基于BP算法的含沙量预测模型研究[J]. 西安工程大学学报, 2015,29(5):600-605.
WEN Zongzhou, LIU Xianhua. Study on prediction model of sediment concentrationbased on BP algorithm[J]. Journal of Xi'an Polytechnic University, 2015,29(5):600-605.
[1] 朱世根, 杨宏贤, 白云峰, 丁浩, 朱巧莲. 长条状细薄带钩零件变形自动检测系统[J]. 纺织学报, 2020, 41(10): 158-163.
[2] 张晓侠, 刘凤坤, 买巍, 马崇启. 基于BP神经网络及其改进算法的织机效率预测[J]. 纺织学报, 2020, 41(08): 121-127.
[3] 张建新, 李琦. 基于机器视觉的筒子纱密度在线检测系统[J]. 纺织学报, 2020, 41(06): 141-146.
[4] 路浩, 陈原. 基于机器视觉的碳纤维预浸料表面缺陷检测方法[J]. 纺织学报, 2020, 41(04): 51-57.
[5] 王文胜, 李天剑, 冉宇辰, 卢影, 黄民. 筒子纱纱笼纱杆的定位检测方法[J]. 纺织学报, 2020, 41(03): 160-167.
[6] 景军锋, 张君扬, 张缓缓, 苏泽斌. 梯度空间下的丝饼表面缺陷检测[J]. 纺织学报, 2020, 41(02): 44-51.
[7] 王晓晖, 刘月刚, 孟婥, 孙以泽. 基于遗传算法和神经网络的3D增材印花工艺参数优化[J]. 纺织学报, 2019, 40(11): 168-174.
[8] 周捷, 马秋瑞. 基于BP神经网络的运动文胸肩带属性与乳房振幅的函数关系[J]. 纺织学报, 2019, 40(09): 186-191.
[9] 孙卫红, 阮棉奖, 邵铁锋, 梁曼. 基于机器视觉的生丝抱合性能检测方法[J]. 纺织学报, 2019, 40(08): 164-168.
[10] 景军锋, 张星星. 基于机器视觉的玻璃纤维管纱毛羽检测[J]. 纺织学报, 2019, 40(05): 157-162.
[11] 周捷, 马秋瑞. BP神经网络在塑身内衣压力预测中的应用[J]. 纺织学报, 2019, 40(04): 111-116.
[12] 徐洋, 朱治潮, 盛晓伟, 余智祺, 孙以泽. 基于机器视觉的鞋面特征点自动识别改进方法[J]. 纺织学报, 2019, 40(03): 168-174.
[13] 景军锋, 郭根. 基于机器视觉的丝饼毛羽检测[J]. 纺织学报, 2019, 40(01): 147-152.
[14] 查刘根, 谢春萍. 应用四层BP神经网络的棉纱成纱质量预测[J]. 纺织学报, 2019, 40(01): 52-56.
[15] 巫莹柱 单颖法 黄伯熹 林广茂 梁家豪 张晓利. 聚对苯二甲酸丙二醇酯与聚对苯二甲酸丁二醇酯混纺纤维的智能识别[J]. 纺织学报, 2018, 39(09): 169-175.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!