Fabric defect detection based on improved YOLOv8s and machine vision
As a key part of the fabric quality control for the textile industry, it is important to detect fabric defects quickly, accurately, and efficiently. To address the missed detection of the defects with tiny, extreme aspect ratios, and low contrast in fabric images, an improved YOLOv8s-HCG algorithm is proposed in this paper. First, the histogram specification algorithm is used to enhance the defect feature expression of low-contrast fabric images at the input side. Second, the content-aware reassembly of features (CARAFE) operator is used instead of the nearest-neighbor interpolation operator for up-sampling in the YOLOv8s. The CARAFE operator aggregates contextual information in a large receptive field to reassemble abundant detailed features, and reassembles features by using targets in the feature map with the adaptive reassembled kernel. Finally, the global attention mechanism module is added into the YOLOv8s neck network to construct the interdependence relationship between fabric defect image channels and spatial dimensions to capture important features. The algorithm was validated on a self-made fabric dataset and two public fabric datasets. The comparison experimental results show that the detection performance of the proposed algorithm in this paper is better than the other algorithms for defects with extreme aspect ratios, tiny, and low contrast. This research is of great significance to the fabric defect detection industry.
Authors
- Chengjun Cui (ORCID: https://orcid.org/0000-0002-3474-4601)
- Can Hao (ORCID: https://orcid.org/0000-0002-5181-6005)
- Dongbin Mei
- Ying Wang (ORCID: https://orcid.org/0009-0007-7606-3453)
- Dong Dengfeng
Institutions
- Chinese Academy of Sciences (CN)
- Institute of Microelectronics (CN)
- University of Chinese Academy of Sciences (CN)
Publication Details
- Journal
- Textile Research Journal
- Published
- 2025-06-24
- DOI
- https://doi.org/10.1177/00405175251348141
- Primary Topic
- Industrial Vision Systems and Defect Detection
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- National Key Research and Development Program of China