# PRC-Light YOLO: An Efficient Lightweight Model for Fabric Defect Detection
###### Abstract
Although this method establishes a relationship between classification and target localization [16], CARL exhibits sensitivity to noise and outliers within the data, potentially resulting in the model's tendency to overfit to these anomalies. [PERSON] et al. proposed a weighted bidirectional feature network by substituting the Backbone module within the original YOLOv5 structure with the Swin Transformer [17]. Moreover, they employed the generalized focal loss to decrease the missed detection rate and improve the learning of positive sample instances. However, the Swin Transformer increases the parameter number and calculation amount of the original network, and there is no guarantee that the model will achieve the same detection results on either mobile or embedded terminals. [PERSON] et al. embedded the Atrous Spatial Pyramid Pooling module and squeeze-and-excitation channel attention module into YOLO. They used convolution kernels with varying expansion rates to pool feature maps and achieved improved defect detection accuracy by self-learning the weights of each feature channel [18], but the background of the dataset is too simple, which can lead to idealized experimental results. [PERSON] et al. developed a deconvolution-based adaptive feature fusion network and introduced a context receptive field block into the Backbone of the YOLOv5 model; in addition, they used exponential distance IOU as the model bounding box loss function [19]. The detection precision of the model is improved by adaptively weighting the bounding box gradient, but this method has 3.8M more parameters than the baseline YOLOv5 and a lower \(mAP\) value than YOLOv7. The methods mentioned above can achieve higher defect detection accuracy or the quantity of computation, but often at the cost of adding more parameters to the original model. In addition, the background of the dataset used in some literature is not complicated enough, so they have high \(mAP\) values. In this paper, we made some data images of fabric defects with complicated background and researched the structure of YOLOv7 [20]. Our main contributions are as follows:* We propose Partial Convolution (PConv) to replace the \(3\times 3\) Conv of Extended-Efficient Layer Aggregation Networks (E-ELAN) in the Backbone module. This replacement aims to decrease network model calculation and parameters. * In the Neck module, we incorporate a Receptive Field Block (RFB) [21] and integrate the Content-Aware ReAssembly of FEatures (CARAFE) lightweight upsampling operator. * We utilize the HardSwish activation function to decrease the computational burden and memory access of the network. The Wise-IOU v3 with dynamic non-monotonic focusing mechanism is applied as the bounding box loss function of the model. * Compared with YOLOv7 and other detection models, the experimental results validate that PRC-Light YOLO has the highest \(mAP\) and improves the performance of fabric defect detection. The remaining sections of this article are organized as follows: In Section 2, we introduce the YOLOv7 model and its image processing process. Section 3 presents the PRC-Light YOLO model, which encompasses the construction of lightweight modules, feature fusion network and optimization of activation functions and loss functions. Section 4 provides a detailed account of the experimental results and analysis. In Section 5, we design a fabric defect detection system. Section 6 discusses further research based on the experimental results. Finally, a conclusion is provided.