# Small-Scale Foreign Object Debris Detection Using Deep Learning and Dual Light Modes
## 3 Experiment
### Experimental Dataset Creation and Analysis  
This paper compares the MAP of several different attention mechanisms under the YOLOv5 framework, including SA (Spatial Attention), CA (Channel Attention), CBAM, and SE. PURE indicates a situation where no attention mechanism has been introduced. According to Table 2, the introduction of a spatial attention mechanism reduced the model's accuracy by 5.8%. The model that used only channel attention achieved an accuracy that was 6.1% higher than the model that used mixed attention, CBAM, indicating the importance of channel attention for detecting small targets. With the above experimental results, it can be seen that on the IVFOD dataset, the method proposed in this paper can effectively improve the recognition accuracy of the model for small targets. Compared with the original YOLOv5 model, the accuracy and generalization ability are both improved to some extent. The training convergence speed and accuracy of the network are also improved after introducing the CIoU loss function. A comparison of the loss functions CIoU and GIoU is shown in Figure 10(c). The improvements proposed in this paper are in line with the expected results. In order to show a more intuitive comparison of the actual detection performance of each attention mechanism, Figure 10(a),b give the comparison plots of the detection accuracy and loss curves of several models. Table 3 compares the mean average precision of different objects under different models. In the case of visible images alone (single mode), the effect of increasing the depth of the network on improving the accuracy of small target detection is not very significant. In contrast, for objects such as bottles, which are significantly larger than the other three types of objects, deepening the depth of the network can improve detection accuracy. By comparing the first and third sets of data in the table, it can be observed that the addition of infrared images improved the detection accuracy for small targets, even without increasing the network depth. Moreover, the detection accuracy for tiny targets such as nuts was enhanced by using infrared images. SLBAF-Net [35] has added an infrared and visible light adaptive fusion layer to the front end of the network, which enhances feature extraction \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **Precision** & **Recall** & **MAP** & **Mean Loss** \\ \hline PURE & 0.671 & 0.719 & 0.713 & 0.004258 \\ SA & 0.613 & 0.784 & 0.71 & 0.004475 \\ CA & 0.722 & 0.754 & 0.747 & 0.004151 \\ CBAM & 0.661 & 0.802 & 0.763 & 0.005930 \\ SE & 0.745 & 0.838 & 0.817 & 0.004216 \\ Proposed & 0.845 & 0.913 & 0.911 & 0.004054 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison test results of attention mechanism. Figure 10: Data size and distribution. and visible light adaptive fusion layer added to the front end of the network, which enhances feature extraction and fuses the infrared and visible image features, effectively improving small target detection accuracy. The model in this paper achieves a MAP of 91.1%, which is better than other models and has the highest detection accuracy for the target. FPS reached 36.3, with a slightly slower detection speed than the baseline model. While achieving high accuracy, the parameters of the improved model are 42.2 M, which proves that our model is lightweight enough, easy to deploy, and can be applied to real-time detection scenarios. The original infrared image is shown in Figure 12a, and the original visible light image is shown in Figure 12b. Small target detection based on visible light images suffers from the challenges of tiny pixels, low resolution, unclear target texture features, and ineffective color features due to the small size of the target. In poor lighting conditions, such as at night, visible light loses its edge completely. The six exemplar image pairs were acquired at three distinct temporal instances--morning, afternoon, and evening. Some results from different networks are shown in Figure 12c-f.