# A Lightweight Uav Swarm Detection Method Integrated Attention Mechanism
## 4 Experimental Results and Analysis
### Ablation Experiment  
Firstly, the structure of YOLOX is simplified and optimized by depthwise separable convolution to build a nano network. In order to verify the effectiveness of the lightweight module, this paper uses the same training strategy to train three lightweight YOLOX models, namely, YOLOX-S, YOLOX-Tiny, and YOLOX-Nano, and tests them on the same test set to analyze their performance differences. It can be seen from Table 4 that the UAV detection accuracy of the three differently scaled YOLOX models toward the test set is more than 80%. As far as the network accuracy and scale of YOLOX of the same series are concerned, the results of this experiment are consistent with the general law of the object detection network--that is, the more layers and parameters of the convolutional neural network, the stronger its feature extraction and generalization ability, and the higher its recognition accuracy. When the DIoU threshold score is set to 0.5, the mAP scores of the three networks are largely the same, but the size of the model and the total number of parameters greatly differ Among them, the model size and the total number of parameters of nano network are about 1/10 th of those of the version S network. This shows that under the same hardware conditions, the lightweight nano model can process more input images and reduce the equipment cost on the premise of meeting the accuracy requirement. Therefore, YOLOX-Nano is selected as the baseline model for research in this paper.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Model** & **[EMAIL_ADDRESS] (\%)** & **Params (\(\times\)106)** & **Model Size/Mb** \\ \hline YOLOX-S & 82.12 & 8.94 & 34.30 \\ YOLOX-Tiny & 81.74 & 5.03 & 13.70 \\ YOLOX-Nano & 80.50 & 0.89 & 3.70 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Performance comparison of YOLOX models with different scales.  
Figure 11: Samples of the UAVSwarm dataset.  
Table 5 shows that the mAP score of the proposed model on the UAVSwarm test set is 82.32%, which is about 2% higher than that of the baseline model, while the total number of parameters and model size are only about 40 Kb higher. It can also be found that the introduction of the SE and CBAM modules and the improvement of the loss functions have brought about an increase in mAP compared with the baseline model, which proves the effectiveness of the above three modules.  
The Loss curves of the different network models during the training process are shown in Figure 12. The abscissa and ordinate are the Epoch and Loss values, respectively. It can be seen that in the training process, the convergence of different models of the YOLOX series is similar. The loss of the training set decreases rapidly in the early stage. With the increase in epoch, the loss value gradually decreases and tends to be stable. Finally, the loss value of the proposed network model is the lowest, which proves that the training strategy and parameter settings are reasonable and effective for improving the model detection accuracy.  
For the UAVSwarm dataset, as a typical small object, the network model proposed in this paper has improved the Precision and Recall indicators of the baseline model by 0.63% and 1.84%, respectively, when the threshold scores are both 0.5, as shown in Figure 13. The improvement of Recall shows that the optimization strategy we used can effectively increase the learning effect of the model on the target of positive foreground samples.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**SE** & **CBAM** & **Loss** & **[EMAIL_ADDRESS] (\%)** & **Params (\(\times 10^{6}\))** & **Model Size/Mb** \\ \hline - & - & - & 80.50 & 0.89 & 3.70 \\ ✓ & - & - & 81.25 & 0.92 & 3.78 \\ - & ✓ & - & 80.62 & 0.92 & 3.84 \\ - & - & ✓ & 82.14 & 0.89 & 3.70 \\ ✓ & ✓ & ✓ & 82.32 & 0.93 & 3.85 \\ \hline \hline \end{tabular}
\end{table}
Table 5: Ablation experiment based on YOLOX-Nano.  
Figure 12: Loss curves of the different networks.