| Textile industry is a labor-intensive industry in China.China is the world’s largest producer and exporter of textiles and clothing.Therefore,the textile industry attaches great importance to fabric quality inspection.However,at present,most enterprises still use manual detection in the process of fabric production.However,this detection method has some disadvantages,such as slow detection speed,low accuracy,high labor intensity and so on.In view of the above reasons,the textile industry adopts the deep learning technology to realize the automatic detection of fabric,but there are still two problems: one is that the fabric will produce motion blur on the conveyor belt during the shooting process.Second,it is difficult to detect small defects due to the proportion of the area in the fabric image.Therefore,this paper studies a motion blur removal and fabric defect detection algorithm based on deep learning.The contributions of this paper are as follows:1.For the fabric image acquisition and transmission process is easy to introduce a large amount of motion blur,which in turn leads to the loss of image content information and distortion of edge contours.In this paper,we propose a deblurring algorithm based on cavity convolution and attention mechanism.Firstly,to address the problem of content information loss,cascaded cavity convolution is introduced in the residual module of the network to enhance the feature extraction of fabric images by increasing the perceptual field,which helps the network to focus on more contextual information.Then for better extraction of local detail information the network uses a self-attentive mechanism module,which suppresses other useless information so that the network can better extract local detail information of the fabric images.Finally the fabric images are deblurred by end-to-end approach.The experimental results show that the algorithm in this paper presents better quantitative results in objective metrics(PSNR,SSIM)compared to existing image deblurring algorithms.2.For the problem of low accuracy of conventional single-stage detectors to detect small targets in fabric images,a YOLOv5 s detection algorithm that fuses attention mechanism and adaptive feature pyramid is proposed.First,an adaptive feature fusion module is introduced on the basis of the original feature pyramid module,which can enable the network to better extract the fused features at different scales by assigning feature weights.Secondly,in order to reduce the loss of detailed information,an attention mechanism(Transformer)is introduced to enable the network to focus on useful information and enhance the transfer of information between different network structures.The experimental results show that the improved algorithm can improve the localization accuracy of fabric defect detection quickly and accurately.3.A fabric image deblurring and detection system is designed according to the algorithm proposed in this paper.The system has a complete functional interface and can perform deblurring and detection operations on fabric images. |