Improved YOLOv7 garment stitch fault detection method based on attention mechanism
Aiming at the problems of low efficiency,high cost,low accuracy,and easy to miss and mis-check in the inspector's naked eye inspection method,deep learning was used in this paper to detect clothing stitch defects in real time.A dataset for garment stitch fault detection was constructed in this paper,which contains common types of garment stitch faults.In addition,an improved attention mechanism of YOLOv7 algorithm SK-YOLOv7 was proposed,three SK modules were added to the backbone network of YOLOv7 to enhance the feature extraction capability of the backbone network,and CBAM-YOLOv7 and SE-YOLOv7 were introduced for comparison experiments.The experimental results show that SK-YOLOv7 has a higher detection accuracy and improved detection completeness as well as mean average precision.SK-YOLOv7 performs better in stitch detection compared to CBAM-YOLOv7 and SE-YOLOv7.In addition,different marking methods were used to compare the dataset.The method of marking the defective area once resulted in a large number of lost features,while the method of marking the defective area in chunks showed a better detection result.The results of the comprehensive experiments are judged that the proposed method for detecting garment stitch faults is fully feasible and can better promote the development of the textile and garment testing industry.