## 2 Related Work  
YOLOv5 is a fully convolutional network comprising a convolutional layer and batch normalization layer, without a full connection layer. YOLOv5 provides four network structures of different sizes: YOLOv5s, YOLOv5m, YOLOv5l, and YOLOv5x, in ascending order. Among them, the YOLOv5s network has the smallest volume and fast reasoning speed but low detection accuracy, which is suitable for devices with low computing power. The network structure of YOLOv5s comprises a backbone network, bottleneck layer network, and detection layer [23]. The backbone network comprises a focus module to extract the features of the input image data. The neck layer uses a path aggregation network [24] for feature fusion, combining superficial graphic features with deep semantic features to obtain more complete features. The CioU [25] function is used as the loss function of bbox regression. The original network structure of YOLOv5s is shown in Figure 1.  
The YOLOv5 algorithm has been successfully improved and applied to defect detection. Owing to the large downsampling multiple of YOLOv5, it struggles to learn the feature information of small glove defect targets from deep feature maps, resulting in the poor detection of small-target defects. Therefore, a small-target detection layer was proposed to detect shallow and deep feature images after concatenation. This layer can enhance the network detection of small glove defect targets and improve detection performance. To overcome the problem of small defect targets, based on the original output layer, [PERSON] et al., added an output layer specifically for small-target detection using a cascading network [26]. Attention mechanisms are resource allocation schemes that allocate computing resources to more important tasks and solve the problem of information overload in cases of limited computing power. In the process of the development of attention mechanisms, channel attention (CA) mechanism coordinate attention has been proposed; it aims to enhance the expression ability of the learning features of the mobile network [27]. The CA mechanism can not only obtain long-range dependencies in the spatial direction but can also enhance the expression of the location information of the features and increase the global receptive field of the network. The CA mechanism can consider attention in both channel and spatial dimensions to better pay attention to the defect features of glove tears and scratches [28]. In 2023, [PERSON] et al., introduced coordinate attention in the backbone network to enhance information interaction among all channels and make the network focus on high-weight areas [29]. Bounding box (bbox) regression is the basis of target detection, location, and tracking. In recent studies related to bbox, IoU loss and its related variants were directly adopted as location loss. The related variants of IoU loss are GioU, DioU, CioU, EioU, and \(\alpha\)-IoU. GioU could not directly reflect the distance between the predicted boundary box and real boundary box [30]. In the case of DioU, the diagonal distance normalizes the distance between the center points of the detection box and prediction box, but when the IoU value is the same as the distance between the center points of the two boxes, it cannot distinguish the distance between these boxes [31]. CioU consumes a certain amount of computational power in the process of calculation. EioU calculates the differences in width and height instead of the aspect ratio and introduces focal loss to solve the problem of the imbalance between difficult and easy samples [32]. \(\alpha\)-IoU allows more flexibility in achieving different levels of bbox regression accuracy by adjusting the \(\alpha\) to weight losses and gradients; EioU and \(\alpha\)-IoU can solve the problem of high surface noise in glove defect detection. [PERSON] et al. replaced the original CioU loss function with an EioU loss function to improve the ability to extract surface defect features. Furthermore, [PERSON] et al.