## 4 Experimental Results and Discussion
### Experimental Results and Analysis
#### 4.3.3 Experimental Comparison of the Optimization Mechanism
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Datasets** & **A** & **B** & **C** & **D** & **E** & **P (\%)** & **R (\%)** & **mAP** \\ \hline Vertical + positive + scratch & \(\surd\) & \(\surd\) & \(\surd\) & \(\surd\) & & 80.8 & 81.9 & 78.3 \\ Vertical + positive + scratch & \(\surd\) & \(\surd\) & \(\surd\) & \(\surd\) & & 81.3 & 83.7 & 79.8 \\ Vertical & \(\surd\) & \(\surd\) & \(\surd\) & & 93.0 & 92.1 & 92.6 \\ Vertical & \(\surd\) & \(\surd\) & \(\surd\) & & \(\surd\) & 90.4 & 93.6 & 90.7 \\ Positive & \(\surd\) & \(\surd\) & \(\surd\) & \(\surd\) & & 94.3 & 93.7 & 92.8 \\ Positive & \(\surd\) & \(\surd\) & \(\surd\) & & \(\surd\) & 94.1 & 91.1 & 91.6 \\ Scratch & \(\surd\) & \(\surd\) & \(\surd\) & \(\surd\) & & 92.7 & 93.7 & 91.1 \\ Scratch & \(\surd\) & \(\surd\) & \(\surd\) & & \(\surd\) & 94.3 & 93.7 & 92.8 \\ \hline \hline \end{tabular} Symbol \({}^{\circ}\surd\) indicates that the module is used during the experiment.  
\end{table} 
Table 3: The data sheet of ablation experiment 3.  
number of parameters, which further verifies that the improved model is more suitable for defect detection in nitrile gloves. To more objectively and accurately evaluate the detection effect of the CCA-YOLO network on the vertical defect dataset, a confusion matrix comparison between YOLOv5s and CCA-YOLO is shown in Figure 8. It can be seen from the figure that the true value is close to the predicted value, and the ratio of damaged positive samples has increased by 25%, indicating that the accuracy of the model has been greatly improved. After verifying the effectiveness and performance of each module, the proposed algorithm was compared with the current mainstream target detection algorithms YOLOv3, YOLOX, YOLOv5s, YOLOv7, and YOLOv8. Table 5 presents the comparison results, indicating the training data generated by the dataset shot at a vertical angle and under the condition of the same training parameters for 100 epochs. The experiments show that the algorithm achieves an mAP of 92.8% in the target detection task for nitrile medical gloves. Compared with the unimproved YOLOv5s algorithm, this algorithm achieves a 2.8-percentage-point improvement in mAP, a 1.5-percentage-point improvement in P, and a 3.7-percentage-point improvement in R. Compared with the more stable and frequently used YOLOv7 algorithm, this algorithm exhibits higher P and mAP values but lower recall. Compared with the YOLOv8 algorithm, CCA-YOLO performs better in the P, mAP, and FPS values, while reducing the training time by more than half. To further improve the training, the best weight feeding into the detection network is obtained, and higher precision and a faster monitoring rate are achieved; high-quality data samples were selected from 39,941 data enhancement images for training, the learning rate of the initial training was set to 0.005, the number of picture batches was 32, and the number of training epochs for each dataset was 1000. The training results are shown in Table 6.  
To better verify the detection performance of the proposed algorithm in cases of small defect targets, the original YOLOv5s network and the CCA-YOLO network were used herein to select some of the image data from the test set for testing, as shown in Figure 9. Figure 9a,b compare three detection results, namely, horizontal tear detection, vertical tear detection, and vertical scratch detection, respectively. Based on these figures, the detection accuracy of the proposed algorithm is significantly higher than YOLOv5l. In Figure 9, YOLOv5s misdetected horizontal tears and failed to accurately detect the target, whereas the proposed algorithm accurately detected tear and scratch targets. This was mainly because the detection layer for small targets, which was added to the proposed model, improved its resolution and the coordinate attention mechanism enlarged the receptive field. Moreover, the EIoU and \(\alpha\)-IoU loss functions used for defect types improved the prediction positioning accuracy and detection accuracy for small targets.