Font Size: a A A

Research On Lightweight Fabric Defect Detection System Based On Deep Learning

Posted on:2024-05-05Degree:MasterType:Thesis
Country:ChinaCandidate:H D ChenFull Text:PDF
GTID:2531307142980699Subject:Mechanics
Abstract/Summary:PDF Full Text Request
Defect detection plays a crucial role in the textile production line.However,traditional visual methods have limitations such as low detection efficiency and the need for manual parameter adjustment,which cannot meet the needs of large-scale production.In recent years,the development of deep learning has provided a new approach to solve these problems.However,there are still some challenges in deep learning-based textile defect detection methods,such as the variety of textile defects and their similarity to the texture background,which require better feature extraction and strong generalization ability of the algorithm.To address these issues,this thesis proposes a deep learning-based textile defect detection algorithm that significantly improves detection accuracy and speed by improving and optimizing the network structure and adopting effective training strategies.The proposed algorithm can be applied in textile detection software systems.The main research work of this paper is as follows.(1)A fabric defect detection database has been established.This article’s fabric defect database was built using the Tianchi competition dataset.The images were cropped and resized to a consistent size,and the dataset was initially constructed.Defect characteristics were analyzed,and defect types were classified.Data augmentation and Mosaic data enhancement were applied to the dataset.(2)We propose a lightweight network module,C3_Ghost,designed to incorporate the Ghost_module into the residual network.The Ghost_module employs fewer convolutional cores and depth-separable convolution to achieve similar feature maps while reducing the number of network parameters and enhancing the speed of feature extraction.By comparing the basic C3 architecture in both the backbone and neck networks,we validate the theory of feature fusion.(3)We present a parallel depth-separable attention mechanism,DWAM.First,the depth-separable convolution is employed to generate the feature layer of a single channel.Then,the spatial information of the feature mapping is aggregated using average and maximum pooling operations.DWAM resolves the confusion between spatial weight and channel weight in the attention mechanism,and it is integrated into the neck network.We conduct comparative experiments with mainstream attention mechanisms.(4)We propose a fabric defect detection algorithm,GAW-YOLO,based on the improved YOLOv5.In the neck network of the original YOLOv5_m,we replace C3 with the C3_Ghost proposed in this thesis and embed the DWAM attention mechanism.After conducting multiple functional experiments,we replace the original loss function with Focal loss to solve the problem of positive and negative sample imbalance.After final experimental verification,the algorithm proposed in this thesis,GAW-YOLO,reduces the FLOPs parameter by 17.7%and increases detection speed by 14.3%,and improves m AP0.5 by 2.1%compared to the original algorithm YOLOv5m,which improves the efficiency of online detection.In addition,this thesis designs a"fabric defect detection system"software,deploys the detection algorithm in it,and the software can automatically monitor folders and perform detection,while displaying the detection results in the interface.Furthermore,this thesis also designs a"one-click training"program.Users can train the model by themselves after storing the dataset according to the requirements,ensuring the generalization ability of the detection model.
Keywords/Search Tags:Fabric defect detection, Attention mechanism, Deep learning, Model lightweight
PDF Full Text Request
Related items