REN Chaoqiang1,2, LIU Dengfeng1,2
(1. School of Artificial Intelligence and Computer Science, Jiangnan University, Wuxi 214122, China;
2. Jiangsu Provincial Engineering Laboratory of Pattern Recognition and Computational Intelligence, Jiangnan University, Wuxi 214122, China)
Abstract:In automated industrial inspection, it is often necessary to train models on anomaly-free images and perform anomaly detection on products, which is also an important and challenging task in computer vision. The student-teacher network trains students to regress the output of the teacher, and uses the difference between the output of the student network and the pre-trained teacher network to locate anomalies, which has achieved advanced results in the field of abnormal segmentation. However, it is slow to predict a picture, and no anomaly detection is performed. A multi-student teacher network is proposed, which uses multiple student networks to jointly regress the output of the teacher network, and the minimum square difference between the output of students and teachers in each dimension is selected as the difference value. The information in the middle layer of the network is used to represent each area of the image and calculate the anomaly distance for anomaly segmentation, and the maximum abnormal score is used to represent the abnormal degree of the image for abnormal detection. Experiments results on MVTec anomaly detection show that the algorithm predicts a picture in 0.17 s and can output anomaly detection results at the same time, with image AUROC reaching 91.1% and Pixel AUROC reaching 94.5%. On the wall tile dataset produced by taking pictures of real scenes, image AUROC reached 89.7%, and Pixel AUROC reached 89.1%. Compared with the original student-teacher network, the proposed method can quickly complete anomaly segmentation and anomaly detection tasks at the same time with better accuracy, and it also has better results in real applications.
Key words:student-teacher network; anomaly detection; anomaly segmentation; unsupervised learning
References
[1]TUO L. Research on online detection method of ceramic tiles surface quality based on multi-feature fusion. Xi’an: Shaanxi University of Science and Technology, 2019.
[2]LIANG Y Y, LI J B. Small objects detection method based on multi-scale non-local attention network. Journal of Frontiers of Computer Science and Technology, 2020, 14(10): 1744-1753.
[3]CHEN Y T, LI Y Y, CHEN W N, et al. Sea surface ship detection based on deep semantic segmentation using remote sensing image. Chinese Journal of Scientific Instrument, 2020, 41(1): 233-240.
[4]WANG X F, JIANG L, LI L, et al. Joint learning of 3D lesion segmentation and classification for explainable COVID-19 diagnosis. IEEE Transactions on Medical Imaging, 2021, 40(9): 2463-2476.
[5]YU J H, DENG Y H, LIU T T, et al. Lymph node metastasis prediction of papillary thyroid carcinoma based on transfer learning radiomics. Nature Communications, 2020, 11(1): 4807.
[6]LI X C. Algorithm for defect detection and segmentation for steel based on improved u-net. Harbin: Harbin Institute of Technology, 2020.
[7]LANG B, LU J, CAO Y. Rail surface damage detection method based on improved u-net convolutional neural network. 2020-09-21[2021-03-15]. https://kns.cnki.net/kcms/detail/31. 1690.TN.20200918.1451.002.html.
[8]KOU X P, LIU S J, MA Z R. Defect detection method of steel strip based on faster-rcnn. China Metallurgy, 2021, 31(4): 77-83.
[9]XIANG K, LI S S, LUAN M H, et al. Aluminum product surface defect detection method based on improved faster rcnn. China Journal of Scientific Instrument, 2021, 42(1): 191-198.
[10]WAN Z, YE M, LIU K. Defect detection of motor cover based on improved yolov4. Computer Systems and Applications, 2021, 30(3): 79-87.
[11]LI B, WANG C, WU J, et al. Surface defect detection of aeroengine components based on improved yolov4 algorithm. 2021-01-06[2021-03-15]. https://kns.cnki.net/kcms/detail/31. 1690.TN.20200918.1451.002.html.kcms/detail/31.1690.TN.20200918.1451.002.html.
[12]SCHLEGL T, SEEBCK P, WALDSTEIN S M, et al. Unsupervised anomaly detection with generative adversarial networks to guide marker discovery//International Conference on Information Processing in Medical Imaging, Jun. 25-30, 2017, Appalachian State University, Boone, USA. Cham: Springer, 2017: 146-157.
[13]SCHLEGL T, SEEBCK P, WALDSTEIN S M, et al. F-AnoGAN: fast unsupervised anomaly detection with generative adversarial networks. Medical Image Analysis, 2019, 54: 30-44.
[14]BAUR C, WIESTLER B, ALBARQOUNI S, et al. Deep autoencoding models for unsupervised anomaly segmentation in brain MR images. Computer Vision and Pattern Recognition, 2018: 161-169.
[15]VASILEV A, GOLKOV V, MEISSNER M, et al. q-Space novelty detection with variational autoencoders. 2018-06-08[2021-03-15]. https://arxiv.org/abs/1806.02997.
[16]BERGMANN P, LWE S, FA USER M, et al. Improving unsupervised defect segmentation by applying structural similarity to autoencoders. 2018-07-05[2021-03-15]. https://arxiv.org/abs/1807.02011.
[17]NALISNICK E, MATSUKAWA A, TEH Y W, et al. Do deep generative models know what they don’t know. 2018-10-22[2021-03-15]. https://arxiv.org/abs/1810.09136.
[18]BERGMANN P, FAUSER M, SATTLEGGER D, et al. Uninformed students: student-teacher anomaly detection with discriminative latent embeddings//Conference on Computer Vision and Pattern Recognition (CVPR), Jun. 13-19, 2020, IEEE, Seattle, USA. Seattle: IEEE Computer Society, 2020: 4182-4191.
[19]PAUL B, KILIAN B, MICHAEL F, et al. The MVTec anom-aly detection dataset: a comprehensive real-world dataset for unsupervised anomaly detection. International Journal of Computer Vision, 2021, 129: 1038-1059.
[20]AKAY S, ATAPOUR-ABARGHOUEI A, BRECKON T P. Skip-GANomaly: skip connected and adversarially trained encoder-decoder anomaly detection. 2019-01-25[2021-03-15]. https://arxiv.org/abs/1901.08954.
[21]COHEN N, HOSHEN Y. Sub-image anomaly detection with deep pyramid correspondences. 2020-05-05[2021-03-15]. https://arxiv.org/abs/2005.02357.
[22]BERGMANN P, FAUSER M, SATTLEGGER D, et al. MVTec AD-A comprehensive real-world dataset for unsupervised anomaly detection//CVF Conference on Computer Vision and Pattern Recognition (CVPR), Jun. 15-20, 2019, IEEE, Long Beach, USA. Los Angeles: IEEE Computer Society, 2019: 9592-9600.
基于多学生-教师网络的异常检测与分割
任超强1,2, 刘登峰1,2
(1. 江南大学 人工智能与计算机学院, 江苏 无锡 214122;2. 江南大学 江苏省模式识别与计算智能工程实验室, 江苏 无锡 214122)
摘 要: 在自动化工业检测中, 通常需要在无异常图像上训练模型并对产品进行异常检测, 这在计算机视觉领域中是一项重要并具有挑战性的任务。 先用学生-教师网络训练学生回归教师的输出, 再用学生与教师的输出差异定位异常, 在异常分割领域取得了先进的效果, 然而, 该算法预测速度慢, 且不能实现预测和异常检测同时进行。 针对以上问题, 提出了一种多学生-教师网络:使用多个学生网络联合回归教师网络的输出, 选择学生与教师的输出在各维度上平方差的最小值作为差异值; 用网络中间层信息代表图像各区域计算异常距离并进行异常分割, 用最大异常分代表图片的异常程度进行异常检测。 在MVTec AD上的实验表明, 该算法预测一张图用时0.17 s, 可以同时输出异常检测结果, 其Image AUROC达到91.1%, Pixel AUROC达到94.5%。 在现实场景拍照制作的墙面瓷砖数据集上, Image AUROC达到89.7%, Pixel AUROC达到89.1%。 相比于原学生-教师网络, 该方法可以快速完成异常分割与异常检测任务, 具有更高的精度, 在实际应用中取得了较好的效果。
关键词: 学生-教师网络; 异常检测; 异常分割; 无监督学习
引用格式:REN Chaoqiang, LIU Dengfeng. Anomaly detection and segmentation based on multi-student teacher network. Journal of Measurement Science and Instrumentation, 2022, 13(2):235-241. DOI:10.3969/j.issn.1674-8042.2022.02.013
[full text view]