• CN:11-2187/TH
  • ISSN:0577-6686

机械工程学报 ›› 2025, Vol. 61 ›› Issue (10): 241-249.doi: 10.3901/JME.2025.10.241

• 仪器科学与技术 • 上一篇    

扫码分享

基于多尺度标准化流模型的布匹缺陷检测

余智祺, 徐洋, 王元飞, 盛晓伟   

  1. 东华大学机械工程学院 上海 201620
  • 收稿日期:2024-05-08 修回日期:2025-01-28 发布日期:2025-07-12
  • 作者简介:余智祺,男,1993年出生,博士研究生。主要研究方向为机器视觉。E-mail:15900448115@163.com;徐洋(通信作者),女,1977年出生,博士,教授,博士研究生导师。主要研究方向为复杂系统建模与参数识别。E-mail:xuyang@dhu.edu.cn
  • 基金资助:
    国家重点研发计划资助项目(2018YFB1308800)。

Fabric Defect Detection Based on Multiscale Normalizing Flow Model

YU Zhiqi, XU Yang, WANG Yuanfei, SHENG Xiaowei   

  1. College of Mechanical Engineering, Donghua University, Shanghai 201620
  • Received:2024-05-08 Revised:2025-01-28 Published:2025-07-12

摘要: 基于深度学习的布匹缺陷检测算法依赖大量带标签的缺陷样本,但在实际生产过程中难以大量获取且标注烦琐。针对这一问题提出一种基于多尺度标准化流模型的布匹缺陷检测算法。该方法首先通过加载预训练权重的特征提取网络获取正常样本的特征,然后通过训练标准化流模型,建立正常样本特征分布与标准高斯分布之间的映射关系,以此评估待测图像特征经转化后在标准高斯分布中的概率密度来识别和定位缺陷。为减轻深层特征低分辨率引起的纹理细节损失,提出一种融合策略融合不同尺度下变换后的特征分布。检测时计算待测布匹图像特征的概率密度来评估每个像素的异常程度,并根据设定的阈值划分缺陷区域。试验表明:所提出的方法在不需要缺陷样本的情况下即可完成布匹缺陷检测,且检测精度可达像素级。在不同纹理背景与不同缺陷类型的数据上表现优异,图像级AUC高达100%,像素级AUC达98.5%,显示了良好的泛化能力。

关键词: 布匹缺陷检测, 正常样本, 标准化流, 多尺度, 深度学习

Abstract: Deep learning-based fabric defect detection methods rely heavily on a substantial collection of labeled defect samples, which can be challenging to obtain and annotate during actual manufacturing processes. To address this issue, a fabric defect detection method based on multiscale normalizing flow model is proposed. The method initially extracts features from defect-free samples via a feature extraction network with pre-trained weights. Subsequently, it establishes a mapping relationship between the feature distribution of defect-free samples and the standard Gaussian distribution through training the normalizing flow model. This mapping enables the assessment of the probability density of a test image’s features within the standard Gaussian distribution to identify and localize defects. In order to mitigate the loss of texture details caused by the low resolution of deep features, a fusion strategy is proposed to fuse the feature distributions at different scales. During the detection process, the probability density of the features for the fabric image is calculated to evaluate the anomaly degree of each pixel, and defect regions are delineated based on a predefined threshold. Experimental results demonstrate that the proposed multiscale flow model-based detection approach can accomplish fabric defect detection without requiring defect samples, achieving pixel-wise accuracy. It exhibits outstanding performance on fabric defect dataset with varying texture backgrounds and defects, achieving a 100% image-wise AUC metric and a 98.5% pixel-wise AUC metric, showcasing robust generalization capabilities.

Key words: fabric defect detection, defect-free samples, normalizing flow, multiscale, deep learning

中图分类号: