| China has been a major textile country since ancient times.It has a share of more than 50 %in the global textile market,but the economic benefits are not ideal.The main reason is that the quality of the whole fabric is reduced due to the defects of the produced fabric.At present,manual detection is widely used.However,this detection method not only has low detection efficiency,but also easily causes missed detection and false detection.As machine vision technology and deep learning technology become more and more mature in various application fields,there are better solutions for fabric defect detection.This paper proposes a detection system based on deep learning to detect fabric defects.Firstly,the designed fabric defect detection device is introduced in detail.The device mainly includes transmission module,auxiliary module and image acquisition module.Then,the selection,material and working principle are explained,and the three-dimensional diagram of specific parts is displayed.Secondly,according to the characteristics of fabric defects,such as large difference in size,large difference in number of categories,and large number of small-size defects,this paper proposes a fabric defect classification algorithm based on improved Res Net50.In view of the fact that the network is too deep to appear gradient disappearance,the basic residual network is improved.Leaky-relu is used to replace relu.A 1 × 1 convolution kernel is added to the right side of the residual structure to realize cross-channel feature fusion,and a BN layer is added to standardize the feature map and accelerate the convergence speed.In order to improve the feature extraction ability of the model,the bidirectional weighted feature pyramid network Bi FPN is combined with Res Net50,and the advantage of Bi FPN dual path is used to reduce the loss of small-scale defect information.Then,jump connection is used to fuse more features,and the weight parameters of different scale features are given according to the contribution of the model.Through experimental verification,the improved detection accuracy reaches96.37 %,which has a good defect classification effect.Aiming at the poor detection effect of the model on small-size defects,a fabric defect region detection algorithm based on improved YOLOv5 is proposed.The CBAM module is added to the backbone network to increase the feature extraction ability of small-size defects.At the same time,the small target detection layer is added.The image segmentation technology is used to avoid the interference of background information and improve the detection performance of small-size fabrics.The lightweight network Ghost Net and the CIOU loss function are added to further improve the performance of the network.After experimental verification,the detection accuracy of small size defects reached 94.73 %,and the improvement effect was obvious.Finally,the upper computer interface of fabric defect detection software is designed by QT software.The detection algorithm,detection software and detection device are combined into a whole to realize automatic operation and meet the actual production needs. |