# Study on the Detection Mechanism of Multi-Class Foreign Fiber under Semi-Supervised Learning
## 3 Results
### Ablation Experiment  
In the YOLOv5-cotton neck network, a CBAM attention module is introduced to address the issue of uniform feature weighting for different levels of importance. This uniform weighting approach in the YOLOv5n model does not favor the extraction of information from small-scale targets. To tackle this problem, the CBAM attention mechanism is incorporated. Additionally, the original SPPF layer in the backbone network is replaced with the SPPFCSPC layer. The SPPFCSPC module is a convolutional neural network module designed for feature extraction. It introduces parallel MaxPool operations within a sequence of convolutions, avoiding image distortion issues caused by image processing operations and addressing the challenge of extracting repetitive features from images. The SPPFCSPC module outperforms the SPPF layer but comes with an increased parameter count and computational complexity. Furthermore, the C3 layer in the backbone network is modified to the C3 Ghost layer. The Ghost module within C3 Ghost is a lightweight neural network architecture that effectively reduces model parameters and computational complexity while maintaining high accuracy and low-cost convolutional operations.  
To further validate the impact of these improvements on foreign fiber detection, we conduct ablation experiments on the Efficient YOLOv5-cotton network. Using the same dataset and training parameters, we define three methods based on the YOLOv5n baseline: Method 1 adds the CBAM attention module to the neck network; Method 2 replaces the original SPPF layer in the backbone with the SPPFCSPC layer; and Method 3 modifies the C3 layer in the backbone to the C3 Ghost layer. The results are summarized in Table 3.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Groups** & **CBAM** & **SPFFCSPC** & **C3 Ghost** & **[EMAIL_ADDRESS] (\%)** & **P (\%)** & **R (\%)** & **Params (M)** \\ \hline
1 & & & & & 95.4 & 92.7 & 94.0 & 1.76 \\
2 & \(\surd\) & & & 96.4 & 94.0 & 94.2 & 1.76 \\
3 & & \(\surd\) & & 96.1 & 94.5 & 93.6 & 3.37 \\
4 & & & \(\surd\) & 94.5 & 93.5 & 92.6 & 1.47 \\
5 & \(\surd\) & & \(\surd\) & 96.6 & 95.2 & 94.4 & 3.37 \\
6 & \(\surd\) & & \(\surd\) & 96.4 & 94.4 & 94.4 & 1.48 \\
7 & & \(\surd\) & \(\surd\) & 96.0 & 95.8 & 92.0 & 3.37 \\
8 & \(\surd\) & \(\surd\) & \(\surd\) & 97.0 & 96.3 & 95.4 & 3.08 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Table of ablation experiments.  
Table 3 shows that the baseline model, Efficient YOLOv5n, achieves a foreign fiber detection model [EMAIL_ADDRESS] of 95.4%. By analyzing the comprehensive experimental results, we find that individual improvements using methods 1, 2, and 3 lead to foreign fiber detection performance growth. Each of these modifications improves the foreign fiber detection model's performance. Additionally, when introducing the SPPFCSDC module by replacing SPPF, we achieve a 0.7% increase in mAP. However, it is evident that the model parameters are nearly double in size. Finally, after combining all three improvement methods, the detection performance reaches an mAP of 97.0%, a 1.6% improvement over the baseline model. Furthermore, the model parameters are reduced by 10% compared to the baseline model with SPPFCSPC. This approach enhances the accuracy of foreign fiber detection using Efficient YOLOv5 and carefully considers the trade-off between the model size and computational cost.