现代纺织技术 ›› 2024, Vol. 32 ›› Issue (1): 27-35.

• • 上一篇    下一篇

基于语义分割的织物疵点检测算法研究

  

  1. 西安工程大学机电工程学院,西安 710613
  • 出版日期:2024-01-10 网络出版日期:2024-01-30
  • 作者简介:赵浩铭(1999—),男,河北石家庄人,硕士研究生,主要从事计算机视觉方面的研究。
  • 基金资助:
    国家自然科学基金项目(51735010)

Research on the fabric defect detection algorithm based on semantic segmentation

  1. School of Mechanical and Electrical Engineering, Xi'an Polytechnic University, Xi'an 710613, China
  • Published:2024-01-10 Online:2024-01-30

摘要: 针对织物疵点语义分割任务中数据分类不均衡导致疵点检测准确率不高的问题,文章在Resnet、U-net网络结构基础上设计了CS model网络,添加了适用于小疵点及条带状疵点特征检测的MSCA注意力机制。织物图像中,破洞、污渍等织物疵点像素,占比较少,相比于全图像素为小类别疵点,导致分割结果不准确。针对小类别疵点分割准确率不高的问题,将多类别Focal Loss损失函数引入于其中,该损失函数通过提高小类别疵点的权值,使分割结果更为准确。调整Focal Loss参数对比实验结果,采用mIoU、Acc和Loss数值作为实验评价指标,分别与U-Net、ResNet50、DeepLabV3和VGG16网络的语义分割模型进行对比实验,结果表明:提出的CS model网络可将小类别疵点分割精度有效提高几个百分点。

关键词: MSCA注意力机制, 图像语义分割, 多类别损失函数, 疵点检测, 神经网络

Abstract: Defect detection is an important link for textile enterprises to improve product quality. The fabric with defects cannot be used in production, which greatly reduces the production efficiency of the factory. At present, the detection of fabric defects in most enterprises in China is still mainly based on manual visual inspection. With the extension of working hours, human function is limited, human eyes are tired, defects will be missed and misjudged, and the objectivity is poor and the detection efficiency is low. Affected by physiology, psychology and external environment, it will have an important impact on the health of testers. As there are many kinds of fabrics and the types, sizes and shapes of defects are different, it is impossible to meet the requirements of factory production efficiency and detection accuracy only by manual visual inspection. Therefore, intelligent inspection is introduced into the factory and gradually replaces manual visual inspection. Fabric defect detection has become a research hotspot. Convolutional neural network and algorithm research have a significant effect on defect detection, while the reasonable collection of data sets is a big problem. There are many kinds of fabric textures and fibers, and fabric defects account for a small proportion relative to the pixels of the whole image, usually between 0.5% and 15%, so it is impossible to achieve a balanced proportion of pixels. Due to the uneven data classification in the data set, the detection accuracy cannot be further improved. 
Many scholars have designed different neural networks to detect defects, such as U-net and ResNet50. The accuracy rate can reach 95% for fabric defects with large pixels, such as broken warp and weft, but only 80% for defects with small pixels, such as holes and stains, and the effect is not good. The imbalance of data types in data sets is very common, including defects with large pixel ratio and defects with small pixel ratio. The network needs to be adjusted to improve the detection accuracy of small-category defects. To solve the problem of imbalanced data classification and improve the accuracy of small-category defect detection, we put forward a CS model network designed on the basis of Resnet and U-net network structure, and adds MSCA attention mechanism suitable for small-category defect and strip defect feature detection, which makes the network pay more attention to this kind of defects. The multi-class Focal Loss function is introduced into it, which makes the segmentation result more accurate by increasing the weight of small-class defects. The small-scale defects are given a large initial weight and dynamically adjusted to keep it balanced. By adjusting the parameters of Focal loss function, mIoU, Acc and Loss values are used as experimental evaluation indicators to compare the experimental results, and CS model is compared with the semantic segmentation models of U-net, ResNet50, DeepLabV3 and VGG16 networks, respectively.
The experimental results show that the detection accuracy of the CS model network model proposed in this study is improved by 2.97% compared with U-net, 7.89% compared with mIoU, 3.86% compared with ResNet50, and 6.98% compared with mIoU, all of which have been significantly improved, and the problems of uneven classification of data categories and detection accuracy of small-category defects in data sets have been solved. The research results can provide reference suggestions for fabric defect detection research.

Key words: MSCA attention mechanism, image semantic segmentation, multiclass loss function, defects detection, neural network

中图分类号: