纺织学报 ›› 2023, Vol. 44 ›› Issue (07): 103-109.doi: 10.13475/j.fzxb.20220405401

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

面向织物疵点检测的缺陷重构方法

付晗1,2, 胡峰1,2(), 龚杰1,2, 余联庆1,2   

  1. 1.武汉纺织大学 机械工程与自动化学院, 湖北 武汉 430074
    2.武汉纺织大学 湖北省数字化纺织装备重点实验室, 湖北 武汉 430074
  • 收稿日期:2022-04-15 修回日期:2023-01-12 出版日期:2023-07-15 发布日期:2023-08-10
  • 通讯作者: 胡峰(1979—), 男, 教授, 博士。主要研究方向为设备故障诊断与维护、 智能设备设计和检测。E-mail: hufeng@wtu.du.cn
  • 作者简介:付晗(1998—), 男, 硕士生。 主要研究方向为智能设备设计和检测。
  • 基金资助:
    湖北省数字化纺织装备重点实验室开放基金项目(DTL2021006)

Defect reconstruction algorithm for fabric defect detection

FU Han1,2, HU Feng1,2(), GONG Jie1,2, YU Lianqing1,2   

  1. 1. School of Mechanical Engineering & Automation, Wuhan Textile University, Wuhan, Hubei 430074, China
    2. Hubei Digital Textile Equipment Key Laboratory, Wuhan Textile University, Wuhan, Hubei 430074, China
  • Received:2022-04-15 Revised:2023-01-12 Published:2023-07-15 Online:2023-08-10

摘要:

为解决复杂图案织物疵点检测精度不足的问题,通过将疵点视为对织物纹理的破坏,利用生成对抗神经网络对疵点图像进行重构,使其恢复成正常织物纹理的图像,然后将重构图像与缺陷图像进行求异计算,对求异结果进行图像分割,实现疵点检测目的。同时引入自注意力机制、L1损失函数和改进的结构损失函数用于改进生成对抗神经网络结构及其损失函数,用以分析并解决疵点图像重构精度差和网络处理图像细节能力的不足。最后采用本文方法与无监督缺陷检测算法(ReNet-D)和SDDM-PS 2种方法对5种不同复杂图案织物疵点进行实验对比,结果表明本文方法检测精度更高。

关键词: 疵点检测, 生成对抗神经网络, 缺陷重构, 损失函数, 自注意力机制, 织物质量

Abstract:

Objective Defect has great influence on the accuracy of fabric quality evaluation. At present, the detection methods of fabric defect utilizing deep learning method, such as region convolutional neural networks (R-CNN) and YOLO, have insufficient detection accuracy for complex pattern fabric defects and are heavily dependent on the number of training samples. In order to solve the problem that the number of fabric defect samples with complex patterns has a large impact on the detection accuracy, a reconstruction method of fabric defect image is proposed for fabric defect detection.

Method The core idea of the proposed method is to consider the defect as a damage to the fabric texture. Firstly, the conditional generative adversarial neural network(CGAN) is adopted to repair the defective area of the image. Then, the difference is calculated as pixels-by-pixels comparison between the reconstructed image and the defect image. Lastly, the detection of fabric defect is perform by the image division of difference result.

Results In order to enhance reconstruction accuracy of the defect image by the generator, a self attention mechanism is used in the constitutional neural network, which can establish connections between distant pixels in the defect image. To solve the problem that the loss function of the generative adversarial neural network is weak in processing image details, the L1 loss function and the improved structural loss function are employed to construct the target loss function to improve the network's ability to process image details. Since the self attention mechanism is added to the generator, the neural network has the capability to coordinate the global features of the pattern fabric image and the local features around the defect area. The network is encouraged to reconstruct the defect according to the global features, so that the accuracy of image reconstruction is higher. Through the reconstruction experiment of oil defect images, the effectiveness of the method is proved (Fig. 1). The image reconstruction quality and image detail processing capability of the network are improved by introducing L1 loss function and improved structure loss function. L1 loss function can improve the image reconstruction quality of the network. The structural loss function can enhance the detail processing ability of the network. Two functions were simultaneously a dopted to strengthen the detection capability of defect edges and small defects (Fig. 3). ReNet-D method, SDDM-PS method and the proposed method are respectively used for the comparative experimental study of five kinds of fabric defects with different complex patterns. The results show that the ReNet-D method has a very poor performance in the detection of various defects of complex pattern fabrics, and can hardly detect the defects. The SDDM-PS method had a good detection effect on obvious defects such as oil stains and holes, but there were some cases of missed detection and false detection, and the detection effect was poor for defects such as rubbing damage and gaps with small differences from the background. It can be seen that the proposed method provides complete detection of oil, foreign matter, holes, rubbing damage and warp loss defects in the fabric (Fig. 6-Fig. 10). In terms of detection efficiency,our method takes 46.15 ms to detect an image, which is only a small increase in time consumption compared to 38.25 ms for ReNet-D and 43.82 ms for SDDM-PS.

Conclusion A defect detection method based on defect image reconstruction is proposed. This method combines GAN network and self attention mechanism, and makes full use of the advantages of both to improve the reconstruction accuracy of defect images. At the same time, aiming at the problem of weak image detail processing in the generation of adversarial neural network loss function, L1 loss function and improved structure loss function are introduced to construct the target loss function, so as to improve the ability of CGAN network to process image details. The experimental results show that the ReNet-D method has poor detection accuracy for all kinds of defects, and even the original background of the image is used as a defect. SDDM-PS method has certain detection ability for oil, foreign matter and holes, but there are cases of missed detection and false detection, and it can hardly detect rubbing damage defects, and the detection integrity of warp loss defects is also very low. Although there is some error in the detection of rubbing damage and warp loss defects, the proposed method has a high degree of completeness and accuracy compared to the above two methods.

Key words: defect detection, generative adversarial neural network, defect reconstruction, loss function, self attention mechanism, fabric quality

中图分类号: 

  • TS101.9

图1

有无自注意力机制检测对比图"

图2

生成器网络结构"

图3

不同损失函数检测结果对比"

图4

疵点检测处理流程"

图5

实验采用的疵点数据集"

图6

各方法油污疵点实验结果对比"

图7

各方法擦伤疵点实验结果对比"

图8

各方法异物疵点实验结果对比"

图9

各方法破洞疵点实验结果对比"

图10

各方法缺经点实验结果对比"

[1] WEIMER D, SCHOLZ-REITER B, SHPITALNI M. Design of deep convolutional neural network architectures for automated feature extraction in industrial inspection[J]. CIRP Annals, 2016, 65(1): 417-420.
doi: 10.1016/j.cirp.2016.04.072
[2] 刘娆. 卷积神经网络在纺织品缺陷检测中的应用研究[D]. 西安: 西安工程大学, 2019: 35-45.
LIU Xiao. The application of convolutional neural network in textile defect detection[D]. Xi'an: Xi'an Polytechnic University, 2019: 35-45.
[3] LI Yundong, ZHAO Weigang, PAN Jiahao. Deformable patterned fabric defectdetection with Fisher criterion-based deep learning[J]. IEEE Transactions on Automation Science and Engineering, 2016, 14(2): 1256-1264.
doi: 10.1109/TASE.2016.2520955
[4] MEI Shuang, YANG Hua, YIN Zhouping. An unsupervised learning-based approach for automated defect inspection on textured surfaces[J]. IEEE Transactions on Instrumentation and Measurement, 2018, 67(6): 1266-1277.
doi: 10.1109/TIM.2018.2795178
[5] 余文勇, 张阳, 姚海明, 等. 基于轻量化重构网络的表面缺陷视觉检测[J]. 自动化学报, 2020, 48(9):2175-2186.
YU Wenyong, ZHANG Yang, YAO Haiming, et al. Visual inspection of surface defects based on lightweight reconstruction network[J]. ACTA Automatica Sinica, 2020, 48(9):2175-2186.
[6] ZHANG D, SONG K, XU J, et al. An image-level weakly supervised segmentation method for no-service rail surface defect with size prior[J]. Mechanical Systems and Signal Processing, 2022, 165(15): 108334-108348.
doi: 10.1016/j.ymssp.2021.108334
[7] 李剑. 基于无监督学习的木地板缺陷检测方法研究[D]. 北京: 北京交通大学, 2021: 40-45.
LI Jian. Research on defect inspection of wooden floor based on unsupervised learning[D]. Beijing: Beijing Jiaotong University, 2021: 40-45.
[8] ZHAO Xinyu, WU Bin. Algorithm for real-time defect detection of micropipe inner surface[J]. Applied Optics, 2021, 60(29): 9167-9179.
doi: 10.1364/AO.438287
[9] 张哲源. 基于生成对抗网络的机织物疵点检测研究[D]. 上海: 东华大学, 2022: 1-7.
ZHANG Zheyuan. Research on woven fabric defect defection based on generative adversarial network[D]. Shanghai: Donghua University, 2022:1-7.
[10] HUANG R, DUAN B, ZHANG Y, et al. Priorguided GAN based interactive airplane engine damage image augmentation method[J]. Chinese Journal of Aeronautics, 2021, 35(10): 222-232.
doi: 10.1016/j.cja.2021.11.021
[11] ISOLA P, ZHU J Y, ZHOU T, et al. Image-to-image translation with conditional adversarial networks[C]// HONOLULU H I. Conference on Computer Vision & Pattern Recognition. New York: IEEE, 2016:5967-5976.
[12] LI Huan, TANG Jinglei. Dairy goat image generation based on improved self-attention generative adversarial networks[J]. IEEE Access, 2020, 8(99): 62448-62457.
doi: 10.1109/Access.6287639
[13] ZHANG H, GOODFELLOW I, METAXAS D, et al. Self-attention generative adversarial networks[J]. Computer Science, 2018. DOI: 10.48550/arXiv.1805.08318.
doi: 10.48550/arXiv.1805.08318
[14] LIU X, QIAO Y, XIONG Y, et al. Cascade conditional generative adversarial nets for spatial-spectral hyperspectral sample generation[J]. Science China Information Sciences, 2020, 63(4):77-92.
[15] ZHAO Hang, GALLO Orazio, FROSIO Luri, et al. Loss functions for image restoration with neural networks[J]. IEEE Transactions on Computational Imaging, 2017, 3(1): 47-57.
doi: 10.1109/TCI.2016.2644865
[16] WANG Z, BOVIK A C, SHEIKH H R, et al. Image quality assessment: from error visibility to structural similarity[J]. IEEE Trans Image Process, 2004, 13(4): 600-612.
doi: 10.1109/TIP.2003.819861
[17] 徐启永, 胡峰, 王传桐, 等. 改进频率调谐显著算法在疵点图像分割中的应用[J]. 纺织学报, 2018, 39(5): 125-131.
XU Qiyong, HU Feng, WANG Chuantong, et al. Segmentation of fabric defect images based on improved frequenytuned salient algorithm[J]. Journal of Textile Research, 2018, 39(5): 125-131.
[18] MAKHZANI A, SHLENS J, JAITLY N, et al. Adversarial autoencoders[J]. Computer Science, 2015. DOI: 10.48550/arXiv.1511.05644.
doi: 10.48550/arXiv.1511.05644
[19] ZHAO Z, LI B, DONG R, et al. A surface defect detection method based on positive samples[J]. PRICAI: Trends in Artificial Intelligence, 2018, 29(95): 473-481.
[1] 闫本超, 潘如如, 周建, 王蕾, 王小虎. 基于改进Itti显著模型的织物疵点实时检测[J]. 纺织学报, 2023, 44(07): 95-102.
[2] 李杨, 彭来湖, 李建强, 刘建廷, 郑秋扬, 胡旭东. 基于深度信念网络的织物疵点检测[J]. 纺织学报, 2023, 44(02): 143-150.
[3] 王斌, 李敏, 雷承霖, 何儒汉. 基于深度学习的织物疵点检测研究进展[J]. 纺织学报, 2023, 44(01): 219-227.
[4] 金守峰, 侯一泽, 焦航, 张鹏, 李宇涛. 基于改进AlexNet模型的抓毛织物质量检测方法[J]. 纺织学报, 2022, 43(06): 133-139.
[5] 吕文涛, 林琪琪, 钟佳莹, 王成群, 徐伟强. 面向织物疵点检测的图像处理技术研究进展[J]. 纺织学报, 2021, 42(11): 197-206.
[6] 李东洁, 郭帅, 杨柳. 基于改进图像阈值分割算法的纱线疵点检测[J]. 纺织学报, 2021, 42(03): 82-88.
[7] 朱磊, 任梦凡, 潘杨, 李博涛. 基于相似性定位和超像素分割的织物疵点检测[J]. 纺织学报, 2020, 41(10): 58-66.
[8] 周文明, 周建, 潘如如. 应用上下文视觉显著性的色织物疵点检测[J]. 纺织学报, 2020, 41(08): 39-44.
[9] 杨恩君, 廖义辉, 刘安东, 俞立. 基于低秩分解的织物疵点检测[J]. 纺织学报, 2020, 41(05): 72-78.
[10] 张缓缓, 马金秀, 景军锋, 李鹏飞. 基于改进的加权中值滤波与K-means聚类的织物缺陷检测[J]. 纺织学报, 2019, 40(12): 50-56.
[11] 杜帅, 李岳阳, 王孟涛, 罗海驰, 蒋高明. 基于改进局部自适应对比法的织物疵点检测[J]. 纺织学报, 2019, 40(02): 38-44.
[12] 王传桐 胡峰 徐启永 吴雨川 余联庆. 改进频率调谐显著算法在疵点辨识中的应用[J]. 纺织学报, 2018, 39(03): 154-160.
[13] 何峰 周亚同 赵翔宇 刘猛 张忠伟. 纹理织物疵点窗口跳步形态学法检测[J]. 纺织学报, 2017, 38(10): 124-131.
[14] 王传桐 胡峰 徐启永 吴雨川 余联庆. 采用Gabor滤波簇和等距映射算法的织物疵点检测方法[J]. 纺织学报, 2017, 38(03): 162-167.
[15] 李春雷 高广帅 刘洲峰 刘秋丽 李文羽. 应用方向梯度直方图和低秩分解的织物疵点检测算法[J]. 纺织学报, 2017, 38(03): 149-154.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!