Please wait a minute...
Journal of ZheJiang University (Engineering Science)  2024, Vol. 58 Issue (4): 718-728    DOI: 10.3785/j.issn.1008-973X.2024.04.007
    
Unsupervised surface defect detection of magnetic tile for repair of suspected area defects
Shancheng TANG(),Jianhui LU,Ying ZHANG,Zicheng JIN,Anxin ZHAO
1. College of Communication and Information Technology, Xi’an University of Science and Technology, Xi’an 710054, China
Download: HTML     PDF(2238KB) HTML
Export: BibTeX | EndNote (RIS)      

Abstract  

The number of magnetic tiles with surface defects is limited, and abnormal visual features are diversely distributed. The existing supervised detection methods that rely on target features cannot effectively detect undefined defects. The non-uniform and non-periodic distribution of normal texture on the surface of magnetic tiles makes it difficult for classical reconstruction networks to accurately reconstruct the normal features, resulting in poor performance of related unsupervised detection methods. The multi-head attention-based masked image inpaint network (MIINet) was utilized to extract image features over long distances, capture global information and enhance the repair capability of images. The vision saliency algorithm was used to suppress the texture information of the magnetic tile surface and emphasize the defect area, enabling the binary value algorithm to accurately segment the suspected defect region. MIINet was utilized to repair the suspected defect region in the image. The residual image and structural similarity of the before and after repair images were selected to achieve defect detection and defect judgment. Compared with the classical unsupervised method, the accuracy of the proposed surface defect detection method for repairing the suspected defect area was increased by 2.36%, and the F1 value was increased by 1.62%.



Key wordsmulti-head attention      magnetic tile surface defect detection      unsupervised learning      image inpainting      vision saliency     
Received: 27 June 2023      Published: 27 March 2024
CLC:  TP 391.4  
Fund:  国家重点研发计划资助项目(2018YFC0808300);陕西省科技计划重点产业创新链(群)项目(2020ZDLGY15-07).
Cite this article:

Shancheng TANG,Jianhui LU,Ying ZHANG,Zicheng JIN,Anxin ZHAO. Unsupervised surface defect detection of magnetic tile for repair of suspected area defects. Journal of ZheJiang University (Engineering Science), 2024, 58(4): 718-728.

URL:

https://www.zjujournals.com/eng/10.3785/j.issn.1008-973X.2024.04.007     OR     https://www.zjujournals.com/eng/Y2024/V58/I4/718


修复缺陷嫌疑区域的无监督磁瓦表面缺陷检测

磁瓦表面缺陷样本数量少,异常视觉特征分布发散,现有依赖目标特征的有监督检测方法不能有效检测未定义缺陷;磁瓦表面正常纹理呈非均匀且非周期性分布,使得经典重构网络难以准确地重构磁瓦表面正常特征,导致相关无监督检测方法性能低下. 为此,采用多头注意力增强的掩码图像修复网络(MIINet),长距离提取图像特征,捕捉全局信息,增强图像修复的能力;引入视觉显著性算法抑制磁瓦表面纹理信息和突显缺陷区域,以便二值化算法精准分割缺陷嫌疑区域;利用MIINet修复待检测图像缺陷嫌疑区域,选用修复前后图像的残差图像和结构相似性实现缺陷检测与缺陷判定. 与经典无监督方法相比,修复缺陷嫌疑区域的表面缺陷检测方法的准确率提升了2.36%,F1值提升了1.62%.


关键词: 多头注意力,  磁瓦表面缺陷检测,  无监督学习,  图像修复,  视觉显著性 
Fig.1 Unsupervised surface defect detection of magnetic tile for repair of suspected area defects
Fig.2 Structure of masked image inpaint network
Fig.3 Analysis of saliency characteristics of defect-free magnetic tiles
Fig.4 Surface defect detection process of magnetic tile
Fig.5 Differential image before and after magnetic tile repair
Fig.6 Flow chart of defect area determination
类别${n_0}$${n_{\mathrm{e}}}$类别${n_0}$${n_{\mathrm{e}}}$
Blow hole115122Fray3268
Break8598Uneven103
Crack5775Free9523 324
Tab.1 Parameters of magnetic tile dataset
Fig.7 Magnetic tile reconstruction results of different detection models
Fig.8 Localization results of suspected defect area for different methods
Fig.9 Verdict results of different defects by MIINet
Fig.10 Magnet tile surface defect detection results
Fig.11 Comparison of receiver operating characteristic curves for six detection methods
方法Acc/%F1/%AUC/%
DCAE69.2863.3364.63
DCGAN79.1271.0570.55
文献[23]89.0792.7783.83
文献[24]90.0593.8189.06
文献[25]94.5196.3195.04
本研究96.8797.9395.88
Tab.2 Comparison of detection accuracy for six detection methods
失效
类型
输入
图像
缺陷嫌
疑区域
修复
图像
检测
结果
期待
结果
判定
结果
GTNF
1有缺陷无缺陷25
有缺陷无缺陷
2无缺陷有缺陷23
无缺陷有缺陷
3有缺陷有缺陷8
有缺陷有缺陷
Tab.3 Failure sample detection process of proposed model
[1]   HUANG Y, QIU C, YUAN K Surface defect saliency of magnetic tile[J]. Visual Computer, 2020, 36: 85- 96
doi: 10.1007/s00371-018-1588-5
[2]   CUI L, TIANG X, XU M, et al SDDNet: a fast and accurate network for surface defect detection[J]. IEEE Transactions on Instrumentation and Measurement, 2021, 70: 2505713
[3]   LIU W, ZHANG J, SU Z, et al Binary neural network for automated visual surface defect detection[J]. Sensors, 2021, 21 (20): 6868
doi: 10.3390/s21206868
[4]   TANG C, FENG X, WEN H, et al Semantic segmentation network for surface defect detection of automobile wheel hub fusing high-resolution feature and multi-scale feature[J]. Applied Sciences, 2021, 11 (22): 10508
doi: 10.3390/app112210508
[5]   LING X, WU Y, ALI R, et al Magnetic tile surface defect detection methodology based on self-attention and self-supervised learning[J]. Computational Intelligence and Neuroscience, 2022, 2022: 3003810
[6]   刘培勇, 董洁, 谢罗峰, 等 基于多支路卷积神经网络的磁瓦表面缺陷检测算法[J]. 吉林大学学报: 工学版, 2023, 53 (5): 1449- 1457
LIU Peiyong, DONG Jie, XIE Luofeng, et al Surface defect detection algorithm of magnetic tiles based on multi-branch convolutional neural network[J]. Journal of Jilin University: Engineering and Technology Edition, 2023, 53 (5): 1449- 1457
[7]   卞佰成, 陈田, 吴入军, 等 基于改进YOLOv3的印刷电路板缺陷检测算法[J]. 浙江大学学报: 工学版, 2023, 57 (4): 735- 743
BIAN Baicheng, CHEN Tian, WU Rujun, et al Improved YOLOv3-based defect detection algorithm for printed circuit board[J]. Journal of Zhejiang University: Engineering Science, 2023, 57 (4): 735- 743
[8]   HOU W, JING H. RC-YOLOv5s: for tile surface defect detection [EB/OL]. (2023-03-01) [2023-05-18]. https://link.springer.com/content/pdf/10.1007/s00371-023-02793-2.pdf.
[9]   胡广华, 王宁, 何文亮, 等 基于图像修复的无监督表面缺陷检测方法[J]. 华南理工大学学报: 自然科学版, 2021, 49 (7): 76- 85
HU Guanghua, WANG Ning, HE Wenliang, et al Unsupervised surface defect detection method based on image inpainting[J]. Journal of South China University of Technology: Natural Science Edition, 2021, 49 (7): 76- 85
[10]   KINGMA D P, WELLING M. Auto-encoding variational bayes [EB/OL]. (2022-12-10) [2023-05-18]. https://arxiv.org/pdf/1312.6114.pdf.
[11]   GOODFELLOW I J, POUGET-ABADIE J, MIRZA M, et al. Generative adversarial networks [EB/OL]. (2014-06-10) [2023-03-20]. https://arxiv.org/pdf/1406.2661.pdf.
[12]   MI Z, JIANG X, SUN T, et al GAN-generated image detection with self-attention mechanism against GAN generator defect[J]. IEEE Journal of Selected Topics in Signal Processing, 2020, 14 (5): 969- 981
doi: 10.1109/JSTSP.2020.2994523
[13]   GUO Y, ZHONG L, QIU Y, et al Using ISU-GAN for unsupervised small sample defect detection[J]. Scientific Reports, 2022, 12: 11604
doi: 10.1038/s41598-022-15855-7
[14]   WEI C, LIANG J, LIU H, et al Multi-stage unsupervised fabric defect detection based on DCGAN[J]. The Visual Computer, 2023, 39: 6655- 6671
doi: 10.1007/s00371-022-02754-1
[15]   景海钊, 史江林, 邱梦哲, 等 基于密集残差块生成对抗网络的空间目标图像超分辨率重建[J]. 光学精密工程, 2022, 30 (17): 2155- 2165
JING Haizhao, SHI Jianglin, QIU Mengzhe, et al Super-resolution reconstruction method for space target images based on dense residual block-based GAN[J]. Optics and Precision Engineering, 2022, 30 (17): 2155- 2165
doi: 10.37188/OPE.20223017.2155
[16]   唐善成, 陈明, 王瀚博, 等 采用变分自编码器的无监督压敏电阻表面缺陷检测[J]. 计算机集成制造系统, 2022, 28 (5): 1337- 1351
TANG Shancheng, CHEN Ming, WANG Hanbo, et al Unsupervised varistor surface defect detection based on variational autoencoder[J]. Computer Integrated Manufacturing Systems, 2022, 28 (5): 1337- 1351
[17]   WEI W, DENG D, ZENG L, et al Real-time implementation of fabric defect detection based on variational automatic encoder with structure similarity[J]. Journal of Real-Time Image Processing, 2021, 18: 807- 823
doi: 10.1007/s11554-020-01023-5
[18]   LIU W, LIU Z, WANG H, et al An automated defect detection approach for catenary rod-insulator textured surfaces using unsupervised learning[J]. IEEE Transactions on Instrumentation and Measurement, 2020, 69 (10): 8411- 8423
[19]   HE K, CHEN X, XIE S, et al. Masked autoecoder are scalable vision learners [C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Patern Recognition . New Orleans: IEEE, 2022: 15979–15988.
[20]   DOSOVITSKIY A, BEYER L, KOLESNIKOV A, et al. An image is worth 16 ×16 words: Transformers for image recognition at scale [EB/OL]. (2021-06-03) [2023-05-18]. https://arxiv.org/pdf/2010.11929.pdf.
[21]   VASWANI A, SHAZEER N, PARMAR N, et al. Attention is all you need [EB/OL]. (2023-08-02) [2023-05-18]. https://arxiv.org/pdf/1706.03762v1.pdf.
[22]   MONTABONE S, SOTO A Human detection using a mobile platform and novel features derived from a visual saliency mechanism[J]. Image and Vision Computing, 2010, 28 (3): 391- 402
doi: 10.1016/j.imavis.2009.06.006
[23]   LI X, ZHENG Y, CHEN B, et al Dual attention-based industrial surface defect detection with consistency loss[J]. Sensors, 2022, 22 (14): 5141
doi: 10.3390/s22145141
[24]   LIU T, YE W A semi-supervised learning method for surface defect classification of magnetic tiles[J]. Machine Vision and Applications, 2022, 33: 35
doi: 10.1007/s00138-022-01286-x
[1] Jun YANG,Jin-tai LI,Zhi-ming GAO. Unsupervised co-calculation on correspondence of three-dimensional shape collections[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(10): 1935-1947.
[2] Peng ZHANG,Zi-du TIAN,Hao WANG. Flight parameter data anomaly detection method based on improved generative adversarial network[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(10): 1967-1976.
[3] Yi-fan MA,Fan-yu ZHAO,Xin WANG,Zhong-he JIN. Satellite earth observation task planning method based on improved pointer networks[J]. Journal of ZheJiang University (Engineering Science), 2021, 55(2): 395-401.