Font Size: a A A

Application And Research On Fabric Defect Detection Based On YOLOv5

Posted on:2024-04-20Degree:MasterType:Thesis
Country:ChinaCandidate:Y X ShengFull Text:PDF
GTID:2531306923452174Subject:Computer technology
Abstract/Summary:PDF Full Text Request
The detection of defects in fabric is a significant task in industrial quality-check field.Traditional detection methods rely primarily on manual visual inspection,which is timeconsuming,prone to human error,and suffers from low detection accuracy,slow speed,and high cost.This paper aims to develop a high-precision,efficient,and cost-effective fabric defect detection model that is suitable for deployment by leveraging digital image processing technology and object detection techniques.To this end,we propose a fabric defect detection method based on YOLOv5,which helps to address critical challenges such as uneven image data distribution,high resolution,extreme aspect ratio of defect points,and small defect target sizes in fabric datasets,thereby improving the efficiency and quality of fabric production.This paper proposes a series of structural optimization methods to improve the performance of detection models in four aspects:data augmentation,image segmentation,multiscale feature fusion,and small object detection.In particular,to address the problem of limited and imbalanced datasets,this paper employs data augmentation techniques such as Mixup,Copy-Paste,and Oversampling to effectively expand the dataset,enrich the training image scenes and defect points,and enhance the robustness and generalization ability of the model.To tackle the difficulty of training high-resolution images,this paper proposes a defect recognition algorithm based on image segmentation,which divides the image during the model training phase and filters and fuses the detection boxes during the inference phase to effectively solve this issue.To address the problem of extreme aspect ratios of defects on fabrics,this paper proposes a structural optimization method based on multiscale feature fusion,which consists of two modules:target box clustering and multiscale feature fusion.The target box clustering module employs the K-Means++algorithm to better initialize the clustering center,which improves the accuracy and stability of the clustering results.The multiscale feature fusion module uses a more efficient Bi-directional Feature Pyramid Network(BiFPN)structure to adaptively select features from different levels for fusion,further improving the effectiveness of multiscale feature fusion.To address the problem of detecting small defects in the dataset,this paper proposes a structural optimization method based on small object detection,which effectively improves the accuracy of small defect detection.This method consists of two modules:a small object detection layer and a Convolutional Block Attention Module(CBAM).The small object detection layer module adds a new detection head in the YOLOv5 network structure and uses further upsampling operations to effectively solve the problem of detecting small defects.The CBAM attention enhancement module introduces the CBAM attention mechanism in YOLOv5,allowing the model to weight different channels and spatial positions on the feature map,thus improving the accuracy of small defect detection by the network.To demonstrate the effectiveness of the proposed method,extensive experiments are conducted on one fabric dataset.The experimental results demonstrate that the YOLOv5-based fabric defect detection method proposed in this paper achieves a 10.3%increase in Mean Average Precision(mAP)on the test set compared to the baseline model.Moreover,the detection time per image is 0.225 seconds,meeting the real-time requirements of practical applications.
Keywords/Search Tags:Fabric defect detection, Image segmentation, Multi-scale feature fusion, Small object detection
PDF Full Text Request
Related items