纺织学报 ›› 2023, Vol. 44 ›› Issue (08): 81-87.doi: 10.13475/j.fzxb.20220308101

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

基于稀疏字典优选的织物疵点检测方法

王小虎, 潘如如, 高卫东, 周建()   

  1. 生态纺织教育部重点实验室(江南大学), 江苏 无锡 214122
  • 收稿日期:2022-03-23 修回日期:2023-04-10 出版日期:2023-08-15 发布日期:2023-09-21
  • 通讯作者: 周建(1985—),男,副教授,博士。主要研究方向为纺织智能制造。E-mail:jzhou@jiangnan.edu.cn
  • 作者简介:王小虎(1998—),男,硕士生。主要研究方向为数字化纺织技术。
  • 基金资助:
    国家自然科学基金项目(61501209)

Fabric defect detection method using optimized sparse dictionary

WANG Xiaohu, PAN Ruru, GAO Weidong, ZHOU Jian()   

  1. Key Laboratory of Eco-Textiles (Jiangnan University), Wuxi, Jiangsu 214122, China
  • Received:2022-03-23 Revised:2023-04-10 Published:2023-08-15 Online:2023-09-21

摘要:

针对稀疏字典算法检测速度慢,无法满足实时检测需求的问题,提出了一种基于稀疏字典优化的疵点检测算法。首先采用一定尺寸的窗口对正常样本滑动取块进行学习得到字典库;然后对字典库进行分组优选,其策略是依据样本被近似的程度,按顺序分组挑选最优字典组;之后检测时选用字典组对织物图像求解系数并进行重构,得到重构图像及相应的残差图像,最后对残差图像进行疵点区域的判定。实验结果表明,此方法检测准确率平均可达96.22%,检出率高于无约束字典学习方法,图像大小为512像素×512像素时平均每张用时208 ms,为稀疏字典方法的0.26%,可达到在保证检测精度的同时仍具有实时性的效果。

关键词: 稀疏表达, 字典优化, 织物疵点, 实时检测, 图像处理

Abstract:

Objective Textile fabric defects are generally caused by raw materials (warp or weft yarns), mechanical failures and human factors in the production process, and they seriously impair the quality of final products. At present, most of the defect inspection is conducted by human inspectors, resulting in low efficiency and high laboring cost. Therefore, it is of great significance to apply fast and reliable image processing and machine vision techniques to perform automated defect detection instead of human.

Method Sparse dictionary learning method has excellent adaptability in representing complex fabrics textures. However, the learning and solving of sparse dictionary take a long time, making it hard to meet the real time requirements in the industrial scenarios. This work proposed a novel dictionary grouping strategy to speed up the sparse coding process in detection stage while guaranteeing the detection accuracy. Firstly, the sliding patch scheme was adopted to learn dictionary from normal fabric samples. Secondly, the learned dictionary was optimized by dividing into groups, and such strategy is to select several optimal dictionary groups with respect to the degree of approximation. Next, the optimized dictionary groups were used to reconstruct a test image to obtain its residual image. As the final step, the reconstructed errors were applied to identify defect areas from normal ones.

Results To compare the computation time of different algorithms, only the total running time in detection stage was calculated, not including the dictionary learning or dictionary grouping. The experimental results showed that the sparse dictionary algorithm took a longest running time among them, the proposed algorithm took the second longest time, and the unconstrained dictionary used the shortest time(Tabl. 1). The reason that the proposed algorithm was able to reduce most of the time is that the entire algorithm process advances the process of finding the optimal dictionary atoms for the sparse dictionary (sparse coding) and limits the number of dictionary atoms and the reconstruction error, thus significantly reducing the computational effort. The proposed algorithm also achieved a high accuracy rate, slightly lower than the sparse dictionary. The possible reason for it may be that the sparse dictionary do not use all dictionary elements patches each time, but selecting the least number of elements for patch approximation, helping ignore details such as defective areas. The three dictionary learning algorithms have relatively good detection results for various types of defects in plain gray fabrics, and the detection rates are above 90% (Tab. 2). This proposed method has excellent and stable detection for warp defects such as broken warp and knots, and poor detection for weft defects only for few images, which may be caused by their low contrast or minor anomalous defective areas. In summary, the detection accuracy of the proposed method is comparable to that of the unconstrained dictionary and the sparse dictionary in terms of detection accuracy.

Conclusion In this work, the grouped sparse dictionary method has been proposed to address the real time flaw inspection problem on textile fabric. Aiming at the time consumption of spare coding process, the large amount of spare dictionary are grouped into several groups with small dictionary atoms inside in advance. By converting the time-consuming sparse coding into a least square problem, the proposed method has been proved to be capable of reducing computation time in inspection phase significantly. The experimental results show that this method can combine the advantages of learning time of unconstrained dictionaries and high accuracy of sparse dictionaries, while ensuring real-time and low false detection rate, and has strong adaptability to different types of defects, especially for warp defects with high accuracy and stability.

Key words: sparse representation, dictionary optimization, fabric defect, real-time detection, image optimization

中图分类号: 

  • TS111

图1

算法流程图"

图2

原图与残差图像"

图3

不同种类瑕疵不同子窗口大小的检测效果"

图4

K的大小与其对应的重构误差"

图5

k的大小对重构误差的影响"

表1

不同字典方案检测效果对比"

方法 平均用时/ms 检出率/% 误检率/%
无约束字典 32 92.63 2.26
稀疏字典 10 812 98.69 1.72
优化稀疏字典 208 96.22 1.74

图6

子窗口样本的划分图像"

表2

织物疵点检测结果汇总"

样本
编号
无约束字典 稀疏字典 优化稀疏字典
P E P E P E
J1 93.75 0.42 100.00 0.00 100.00 0.00
J2 85.71 1.24 100.00 0.00 100.00 0.41
J3 64.71 2.09 100.00 0.84 94.12 0.84
J4 93.33 0.41 100.00 0.00 93.33 0.00
J5 100.00 0.00 100.00 0.00 100.00 0.42
J6 100.00 0.41 100.00 0.41 100.00 0.41
J7 100.00 0.00 100.00 0.00 93.75 0.42
J8 92.31 0.00 92.31 0.41 92.31 0.00
J9 100.00 0.00 100.00 0.00 100.00 0.00
J10 100.00 0.00 100.00 0.00 100.00 0.00
J11 100.00 0.00 100.00 0.00 100.00 0.00
J12 85.71 1.24 100.00 0.83 100.00 0.83
J13 100.00 0.40 100.00 0.40 100.00 0.40
W1 100.00 0.41 100.00 0.00 100.00 0.41
W2 81.82 0.41 100.00 0.00 63.64 0.00
W3 86.67 0.83 100.00 0.41 93.33 0.00
W4 70.00 1.22 100.00 1.63 100.00 1.22
W5 100.00 0.00 100.00 0.00 100.00 0.00
W6 86.67 0.00 100.00 0.00 100.00 0.00
K1 100.00 0.79 100.00 0.79 100.00 0.40
K2 75.00 1.59 75.00 0.40 75.00 1.19
K3 100.00 1.97 100.00 0.79 100.00 1.18
K4 100.00 2.39 100.00 0.40 100.00 0.80
K5 100.00 2.78 100.00 1.19 100.00 1.98
K6 100.00 2.37 100.00 0.40 100.00 0.40
N(100) 2.61 2.07 2.06
平均 89.06 2.26 94.90 1.72 92.52 1.74
[1] 吕文涛, 林琪琪, 钟佳莹, 等. 面向织物疵点检测的图像处理技术研究进展[J]. 纺织学报, 2021, 42(11):197-206.
LÜ Wentao, LIN Qiqi, ZHONG Jiaying, et al. Research progress of image processing technology for fabric defect detection[J]. Journal of Textile Research, 2021, 42(11):197-206.
[2] DIVYADEVI R, KUMAR B V. Survey of automated fabric inspection in textile industries[C]//2019 International Conference on Computer Communication and Informatics(ICCCI). Haikou:IEEE, 2019:1-4.
[3] GAO G, ZHANG D, LI C, et al. A novel patterned fabric defect detection algorithm based on GHOG and low-rank recovery[C]// IEEE 13th International Conference Signal Process(ICSP). New York: IEEE, 2016:1118-1123.
[4] Ll C, GAO G, LIU Z, et al. Defect detection for patterned fabric images based on GHOG and low-rank decomposition[J]. IEEE Access, 2019, 7:83962-83973.
doi: 10.1109/Access.6287639
[5] ZHU D D, PAN R R, GAO W D, et al Yarn-dyed fabric defect detection based on autocorrelation function and GLCM[J]. Autex Res J, 2015, 15(3):226-232.
doi: 10.1515/aut-2015-0001
[6] DEOTALE N T, SARODE T. Fabric defect detection adopting combined GLCM, gabor wavelet features and random decision forest[J]. Computer Science, 2019, 10(1):1-13.
[7] ARNIA F, MUNADI K. Real time textile defect detection using GLCM in DCT-based compressed images[C]// 2015 6th International Conference on Modeling, Simulation, and Applied Optimization. Sanya: IEEE, 2015:1-6.
[8] REBHI A, ABID S, FNAIECH F. Fabric defect detection using local homogeneity and morphological image processing[C]// 2016 International lmage Processing, Applications and Systems(IPAS). Hammamet: IEEE, 2016:1-5.
[9] 任欢欢, 景军锋, 张缓缓, 等. 应用GIS和FTDT的织物错花缺陷检测研究[J]. 激光与光电子学进展, 2019, 56(13):94-99.
REN Huanhuan, JING Junfeng, ZHANG Huanhuan, et al. Cross-printing defect detection of printed fabric using GIS and FTDT[J]. Laser & Optoelectroniscs Progress, 2019, 56(13):94-99.
[10] LI Y D, ZHANG C. Automated vision system for fabric defect inspection using Gabor filters and PCNN[J]. SpringerPlus, 2016, 5(1):765.
doi: 10.1186/s40064-016-2452-6 pmid: 27386251
[11] 厉征鑫, 周建, 潘如如, 等. 应用单演小波分析的织物疵点检测[J]. 纺织学报, 2016, 37(9): 59-64.
LI Zhengxin, ZHOU Jian, PAN Ruru, et al. Fabric defect detection using monogenic wavelet analysis[J]. Journal of Textile Research, 2016, 37(9): 59-64.
[12] 吴莹, 汪军, 周建. 基于离散余弦变换过完备字典的机织物纹理稀疏表征[J]. 纺织学报, 2018, 39(1):157-163.
WU Ying, WANG Jun, ZHOU Jian. Sparse representation of woven fabric texture based on discrete cosine transform over-complete dictionary[J]. Journal of Textile Research, 2018, 39(1):157-163.
[13] ZHOU J, SEMENOVICH D, SOWMYA A, et al. Sparse dictionary reconstruction for textile defect detection[C]// 2012 11th International Conference on Machine Learning and Applications. Florida: SSMC, 2012: 21-26,.
[14] ZHU Z W, HAN G J, JIA G Y, et al. Modified dense net for automatic fabric defect detection with edge computing for minimizing latency[J]. IEEE Internet of Things Journal, 2020, 7(10):9623-9636.
doi: 10.1109/JIoT.6488907
[15] FARNAZ F, MEHRAN Y, MOHAMMAD F. Face image super-resolution via sparse representation and wavelet transform[J]. Signal Image & Video Processing, 2018(13):1-8.
[16] LU T, LI S, FANG L, et al. Spectral-spatial adaptive sparse representation for hyperspectral image denoi-sing[J]. IEEE Transactions on Geoscience & Remote Sensing, 2016, 54(1):373-385.
[1] 戴宁, 梁汇江, 胡旭东, 戚栋明, 徐郁山, 屠佳佳, 史伟民. 插管式机器人空管状态检测方法[J]. 纺织学报, 2023, 44(11): 199-207.
[2] 闫本超, 潘如如, 周建, 王蕾, 王小虎. 基于改进Itti显著模型的织物疵点实时检测[J]. 纺织学报, 2023, 44(07): 95-102.
[3] 杨宏脉, 张效栋, 闫宁, 朱琳琳, 李娜娜. 一种高鲁棒性经编机上断纱在线检测算法[J]. 纺织学报, 2023, 44(05): 139-146.
[4] 李杨, 彭来湖, 李建强, 刘建廷, 郑秋扬, 胡旭东. 基于深度信念网络的织物疵点检测[J]. 纺织学报, 2023, 44(02): 143-150.
[5] 安亦锦, 薛文良, 丁亦, 张顺连. 基于图像处理的纺织品耐摩擦色牢度评级[J]. 纺织学报, 2022, 43(12): 131-137.
[6] 张东剑, 甘学辉, 杨崇倡, 韩阜益, 刘香玉, 谈渊, 廖壑, 王松林. 纺丝过程中非接触式纤维张力检测技术研究进展[J]. 纺织学报, 2022, 43(11): 188-194.
[7] 袁嫣红, 曾洪铭, 茅木泉. 基于图像处理的选针器检测系统[J]. 纺织学报, 2022, 43(10): 176-182.
[8] 邓中民, 胡灏东, 于东洋, 王文, 柯薇. 结合图像频域和空间域的纬编针织物密度检测方法[J]. 纺织学报, 2022, 43(08): 67-73.
[9] 马运娇, 王蕾, 潘如如, 高卫东. 基于平面镜成像的纱线条干三维合成校准方法[J]. 纺织学报, 2022, 43(07): 55-59.
[10] 周其洪, 彭轶, 岑均豪, 周申华, 李姝佳. 基于机器视觉的细纱接头机器人纱线断头定位方法[J]. 纺织学报, 2022, 43(05): 163-169.
[11] 张荣根, 冯培, 刘大双, 张俊平, 杨崇倡. 涤纶工业长丝毛丝在线检测系统的研究[J]. 纺织学报, 2022, 43(04): 153-159.
[12] 熊晶晶, 杨雪, 苏静, 王鸿博. 基于图像技术的织物导湿性能测试方法[J]. 纺织学报, 2021, 42(12): 70-75.
[13] 吕文涛, 林琪琪, 钟佳莹, 王成群, 徐伟强. 面向织物疵点检测的图像处理技术研究进展[J]. 纺织学报, 2021, 42(11): 197-206.
[14] 刘国维, 潘如如, 高卫东, 周建. 基于总变差的织物疵点分割方法[J]. 纺织学报, 2021, 42(11): 64-70.
[15] 夏旭文, 孟朔, 潘如如, 高卫东. 基于改进帧间差分法的经纱撞筘拥纱在线检测[J]. 纺织学报, 2021, 42(06): 91-96.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!