Journal of Textile Research ›› 2023, Vol. 44 ›› Issue (08): 81-87.doi: 10.13475/j.fzxb.20220308101

• Textile Engineering • Previous Articles     Next Articles

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 Online:2023-08-15 Published:2023-09-21

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

CLC Number: 

  • TS111

Fig. 1

Algorithm flow chart"

Fig. 2

Original image(a) and residual image(b)"

Fig. 3

Detection results of different types of defects and different patch sizes. (a)Detection result of warp defect; (b)Detection result of weft defect; (c)Detection result of blocky defect"

Fig. 4

Size of K and its corresponding reconstruction error"

Fig. 5

Influence of k on reconstruction error"

Tab. 1

Comparison of three defect detection methods"

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

Fig. 6

Image of patch divided samples"

Tab. 2

Summary of fabric defect detection results %"

样本
编号
无约束字典 稀疏字典 优化稀疏字典
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] YAN Benchao, PAN Ruru, ZHOU Jian, WANG Lei, WANG Xiaohu. Real-time detection of fabric defects based on use of improved Itti salient model [J]. Journal of Textile Research, 2023, 44(07): 95-102.
[2] LI Yang, PENG Laihu, LI Jianqiang, LIU Jianting, ZHENG Qiuyang, HU Xudong. Fabric defect detection based on deep-belief network [J]. Journal of Textile Research, 2023, 44(02): 143-150.
[3] ZHENG Zhaolun, LU Yujun. Dual-algorithm for fabric defect detection based on singular value decomposition [J]. Journal of Textile Research, 2022, 43(11): 59-67.
[4] SUN Chunhong, DING Guangtai, FANG Kun. Cashmere and wool classification based on sparse dictionary learning [J]. Journal of Textile Research, 2022, 43(04): 28-32.
[5] LÜ Wentao, LIN Qiqi, ZHONG Jiaying, WANG Chengqun, XU Weiqiang. Research progress of image processing technology for fabric defect detection [J]. Journal of Textile Research, 2021, 42(11): 197-206.
[6] LIU Guowei, PAN Ruru, GAO Weidong, ZHOU Jian. Fabric defects segmentation using total variation [J]. Journal of Textile Research, 2021, 42(11): 64-70.
[7] ZHU Lei, REN Mengfan, PAN Yang, LI Botao. Fabric defect detection based on similarity location and superpixel segmentation [J]. Journal of Textile Research, 2020, 41(10): 58-66.
[8] DI Lan, YANG Da, LIANG Jiuzhen, MA Mingyin. Fabric defect detection method based on primitive segmentation and Gabor filtering [J]. Journal of Textile Research, 2020, 41(09): 59-66.
[9] YANG Enjun, LIAO Yihui, LIU Andong, YU Li. Detection for fabric defects based on low-rank decomposition [J]. Journal of Textile Research, 2020, 41(05): 72-78.
[10] ZHANG Huanhuan, MA Jinxiu, JING Junfeng, LI Pengfei. Fabric defect detection method based on improved fast weighted median filtering and K-means [J]. Journal of Textile Research, 2019, 40(12): 50-56.
[11] DU Shuai, LI Yueyang, WANG Mengtao, LUO Haichi, JIANG Gaoming. Fabric defect detection based on improved local adaptive contrast method [J]. Journal of Textile Research, 2019, 40(02): 38-44.
[12] HU Keman, LUO Siolong, HU Haiyan. Improved algorithm for fabric defect detection based on Canny operator [J]. Journal of Textile Research, 2019, 40(01): 153-158.
[13] . Fabric defect inspection based on modified discriminant complete local binary pattern and lattice segmentation [J]. Journal of Textile Research, 2018, 39(09): 57-64.
[14] . Segmentation of fabric defect images based on improved frequency-tuned salient algorithm [J]. JOURNAL OF TEXTILE RESEARCH, 2018, 39(05): 125-131.
[15] . Real-time detection system for electro-magnetic needle selector [J]. JOURNAL OF TEXTILE RESEARCH, 2018, 39(03): 143-147.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!