# PRC-Light YOLO: An Efficient Lightweight Model for Fabric Defect Detection
###### Abstract  
Defect detection holds significant importance in improving the overall quality of fabric manufacturing. To improve the effectiveness and accuracy of fabric defect detection, we propose the PRC-Light YOLO model for fabric defect detection and establish a detection system. Firstly, we have improved YOLOv7 by integrating new convolution operators into the Extended-Efficient Layer Aggregation Network for optimized feature extraction, reducing computations while capturing spatial features effectively. Secondly, to enhance the performance of the feature fusion network, we use Receptive Field Block as the feature pyramid of YOLOv7 and introduce Content-Aware ReAssembly of FEatures as upsampling operators for PRC-Light YOLO. By generating real-time adaptive convolution kernels, this module extends the receptive field, thereby gathering vital information from contexts with richer content. To further optimize the efficiency of model training, we apply the HardSwish activation function. Additionally, the bounding box loss function adopts the Wise-IOU v3, which incorporates a dynamic non-monotonic focusing mechanism that mitigates adverse gradients from low-quality instances. Finally, in order to enhance the PRC-Light YOLO model's generalization ability, we apply data augmentation techniques to the fabric dataset. In comparison to the YOLOv7 model, multiple experiments indicate that our proposed fabric defect detection model exhibits a decrease of 18.03% in model parameters and 20.53% in computational load. At the same time, it has a notable 7.6% improvement in \(mAP\). fabric defect detection; YOLOv7; lightweight network; HardSwish; Wise-IOU v3 2020 for the decoder to fully recover the original input when inverting the frequency domain data back to the spatial domain. [PERSON] et al. developed a method of cotton fabric defect detection based on K-Singular Value Decomposition dictionary learning [4], in which the dictionary is generally better suited to handle sparse textures. [PERSON] et al. utilized the K-means algorithm to develop a bag-of-words model and proposed a significance-based bag-of-words model for fabric defect detection [5]. The bag-of-words model may ignore the spatial information and contextual relationships of features, leading to the loss of local information and structural information in images. Although the detection speed and performance of the methods based on traditional image processing are better than those of manual detection, the methods of generalization ability are inadequate. In the past two decades, deep learning has become a trend for fabric defect detection, and the techniques have achieved significant advancements in this field [6]. Methods for detection based on deep learning can be classified further into two primary categories: single-stage and two-stage methods. The single-stage methods mainly include Solid State Drive (SSD) [7] and You Only Look Once (YOLO) [8; 9] series, and the two-stage algorithms comprise R-CNN [10], Fast R-CNN [11], Faster R-CNN [12] and so on. [PERSON] et al. utilized ROI Align and ResNet50 network to replace the region of interest pooling layer and VGG16 features extraction network in Faster R-CNN [13]. In addition, the softmax classifier is used to identify the image and obtain the prediction results, but the detection speed needs to be improved. [PERSON] et al. introduced the channel attention mechanism to highlight defect features and suppress background noise features in MobileNetV2-SSDLite and redefined the loss function by Focal Loss [14]. However, this model still has a lot of parameters and is difficult to deploy. Based on YOLOv5s, [PERSON] et al. used K-Means++ clustering to acquire the anchor frames, followed by combining the CARAFE upsampling operator. In addition, they added a small target detection layer to the baseline model, which results in an increase in the amount of model parameters [15]. [PERSON] et al. embedded Classification-Aware Regression Loss (CARL) into YOLOF.