#### 期刊菜单

Military Aircraft Target Detection Algorithm Based on Improved YOLOv8s
DOI: 10.12677/orf.2024.144371, PDF, HTML, XML, 下载: 25  浏览: 83

Abstract: Based on the YOLOv8s object detection algorithm, an improved algorithm for object detection in military aircraft remote sensing images is proposed. Firstly, the Mixup data augmentation method is introduced; secondly, the network structure is modified to reduce the number of channels in the last output feature map of the backbone network to 256; then, an improved SimAM attention mechanism is integrated into the backbone network; finally, an improved NWD loss is used as the position loss function. The improved algorithm has increased the mAP50 on the MAR20 and NWPU VHR-10 datasets by 4.3% and 2.2% respectively compared to YOLOv8s, verifying the effectiveness of the improved algorithm.

1. 引言

2. 改进的YOLOv8s算法

2.1. YOLOv8算法原理

YOLOv8目标检测算法是基于YOLOv5目标检测算法改进而来的单阶段目标检测算法，它融合了众多最前沿的技术以提升检测效果。与YOLOv5相比，YOLOv8的主要改动部分在于检测头部分和损失函数计算部分。YOLOv8的检测头换成了目前的主流解耦头结构，把分类问题和回归问题分离以提高检测准确率，同时使用了无锚框的范式做边框回归。损失计算的时候，则引入了DFL [12]损失函数。YOLOv8目标检测算法根据模型参数量的不同，有五个版本：YOLOv8n、YOLOv8s、YOLOv8m、YOLOv8l、YOLOv8x，以适应不同的应用场景。

2.2. 改进的YOLOv8s算法

Figure 1. Improved YOLOv8 network structure

1. 改进的YOLOv8网络结构

2.2.1. Mixup数据增强

$\begin{array}{l}\stackrel{˜}{x}=\lambda {x}_{i}+\left(1-\lambda \right){x}_{j}\\ \stackrel{˜}{y}=\lambda {y}_{i}+\left(1-\lambda \right){y}_{j}\end{array}$ (1)

xixj是原始的输入图片，yiyj是独热编码之后的图片标签，$\lambda \subset \left[0,1\right]$ 且服从Beta分布。Mixup数据增强只增加很小的训练代价，并且可以提高模型的稳健性。

2.2.2. 改进的NWD距离损失

${W}_{2}^{2}\left({\mu }_{a},{\mu }_{b}\right)={‖\left({\left[c{x}_{a},c{y}_{a},\frac{{w}_{a}}{2},\frac{{h}_{a}}{2}\text{\hspace{0.17em}}\right]}^{T},{\left[c{x}_{b},c{y}_{b},\frac{{w}_{b}}{2},\frac{{h}_{b}}{2}\right]}^{T}\right)‖}_{2}^{2}$ (2)

$NWD\left({\mu }_{a},{\mu }_{b}\right)=\text{\hspace{0.17em}}\mathrm{exp}\left(-\frac{1}{C}\sqrt{{W}_{2}^{2}\left({\mu }_{a},{\mu }_{b}\right)}\right)$ (3)

$\alpha -NWD=NW{D}^{\alpha }$ (4)

$Los{s}_{\alpha -NWD}=1-\alpha -NWD$ (5)

2.2.3. 改进的SimAM注意力机制

${e}_{t}^{*}=\frac{4\left({\stackrel{˜}{\sigma }}^{2}+\lambda \right)}{t-{\stackrel{˜}{\mu }}^{2}+2{\stackrel{˜}{\sigma }}^{2}+2\lambda }$ (6)

$\stackrel{˜}{X}=sigmoid\left(\frac{1}{{e}^{t}}\right)\cdot X$ (7)

Figure 2. ShuffleSimAM module

2. ShuffleSimAM模块

2.2.4. 修改主干网络结构

3. 实验结果分析

3.1. 实验环境和数据集

MAR20数据集是西北工业大学开源的军事飞机目标识别数据集，包含3842张图像、20种军用飞机型号以及22,341个目标实例。根据不同机场包含的各飞机型号和目标数量，将3842张图像划分为训练集和测试集，训练集包含1331张图像和7870个目标实例，测试集包含2511张图像和14,471个目标实例。NWPU VHR-10数据集是用于遥感图像目标检测的数据集，包括650有标注的图像、10个类别以及 3775个标注实例，实验中按照4:1划分训练集和测试集。

3.2. 评价指标

$Precision=\frac{TP}{TP+FP}$ (8)

$Recall=\frac{TP}{TP+FN}$ (9)

3.3. 消融实验

Table 1. Experimental results of MAR20 dataset

1. MAR20数据集实验结果

 算法模块 mAP50:95 (%) mAP50 (%) mAP75 (%) 参数量(M) FLOPs (G) 基线算法 66.1 87.6 82.9 11.143 14.292 Mixup 68.1 90.5 85.5 11.143 14.292 修改主干网络 66.6 88.4 83.7 6.732 12.448 NWD 66.1 88.4 82.6 11.143 14.292 α-NWD 66.6 89.1 83.4 11.143 14.292 SimAM 66.8 89.0 83.4 11.143 14.292 ShuffleSimAM 68.0 89.8 85.2 11.143 14.292 改进的算法 68.9 91.9 86.5 6.732 12.448

MAR20数据集的实验结果如表1所示，基线算法是指YOLOv8s目标检测算法，改进的算法是指在此基础上使用了Mixup数据增强、修改骨干网络、ShuffleSimAM注意力模块和α-NWD损失函数的检测算法。由结果可知，在YOLOv8s算法基础上加入本文介绍的模块后，mAP50均有提升，改进的算法mAP50：95指标比YOLOv8s提高了2.8%，mAP50指标比YOLOv8s高了4.3%，且模型参数量减少了39.5%，浮点计算量减少了12.9%，实验结果验证了改进算法的有效性。

Table 2. Experimental results of NWPU VHR-10 dataset

2. NWPU VHR-10实验结果

 算法模块 mAp50:95 (%) mAP50 (%) mAP75 (%) 参数量(M) FLOPs (G) 基线模型 56.3 88.9 65.8 11.139 14.281 改进的算法 56.9 91.1 62.7 6.728 12.437

Figure 3. Loss changing on MAR20

3. MAR20数据集损失变化

Figure 4. Loss changing on NWPU VHR-10

4. NWPU VHR-10数据集损失变化

Figure 5. Detection result of the YOLOv8s algorithm

5. YOLOv8s算法检测效果

Figure 6. Detection result of the improved YOLOv8s algorithm

6. 改进的YOLOv8s算法检测效果

3.4. 对比实验

Table 3. Comparison experiment results of MAR20 dataset

3. MAR20数据集对比实验结果

 算法 mAP50 (%) mAP75 (%) 参数量(M) FLOPs (G) YOLOv5s 88.7 82.1 7.074 8.007 YOLOv6s 81.7 74.6 17.196 21.895 YOLOXs 90.2 79.0 8.945 13.339 YOLOv8s 87.6 82.9 11.143 14.292 改进算法 91.9 86.5 6.732 12.448

4. 结束语

 [1] 王杰, 张上, 张岳, 等. 改进YOLOv5的军事飞机检测算法[J]. 无线电工程, 2024, 54(3): 589-596. [2] Xu, S., Chen, Z., Zhang, H., Xue, L. and Su, H. (2024) Improved Remote Sensing Image Target Detection Based on Yolov7. Optoelectronics Letters, 20, 234-242. https://doi.org/10.1007/s11801-024-3063-z [3] Cui, C., Wang, R., Wang, Y., Zhou, F., Bian, X. and Chen, J. (2024) Research on Optical Remote Sensing Image Target Detection Technique Based on Dch-Yolov7 Algorithm. IEEE Access, 12, 34741-34751. https://doi.org/10.1109/access.2024.3368877 [4] Sunkur, R., Kantamaneni, K., Bokhoree, C., Rathnayake, U. and Fernando, M. (2024) Mangrove Mapping and Monitoring Using Remote Sensing Techniques Towards Climate Change Resilience. Scientific Reports, 14, Article No. 6949. https://doi.org/10.1038/s41598-024-57563-4 [5] 章程军, 胡晓兵, 魏上云, 等. 基于深度学习的遥感目标检测技术[J]. 计算机工程, 2024, 45(2): 594-600. [6] Tan, M., Pang, R. and Le, Q.V. (2020) Efficient Det: Scalable and Efficient Object Detection. 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, 13-19 June 2020, 10778-10787. https://doi.org/10.1109/cvpr42600.2020.01079 [7] 谢俊章, 彭辉, 唐健峰, 等. 改进YOLOv4的密集遥感目标检测[J]. 计算机工程与应用, 2021, 57(22): 247-256. [8] Zhang, H., Cisse, M., Dauphin, Y.N., et al. (2018) Mixup: Beyond Empirical Risk Minimization. International Conference on Learning Representations, Vancouver, 30 April-3 May 2018, 1-13. [9] Xu, C., Wang, J., Yang, W., Yu, H., Yu, L. and Xia, G. (2022) Detecting Tiny Objects in Aerial Images: A Normalized Wasserstein Distance and a New Benchmark. ISPRS Journal of Photogrammetry and Remote Sensing, 190, 79-93. https://doi.org/10.1016/j.isprsjprs.2022.06.002 [10] Yang, L., Zhang, R.-Y., Li, L. and Xie, X. (2021) SimAM: A Simple, Parameter-Free Attention Module for Convolutional Neural Networks. Proceedings of the 38th International Conference on Machine Learning, New York, 18-24 July 2021, 11863-11874. [11] 禹文奇, 程塨, 王美君, 等. MAR20: 遥感图像军用飞机目标识别数据集[J]. 遥感学报, 2023, 27(12): 2688-2696. [12] Li, X., Lv, C., Wang, W., et al. (2023) Generalized Focal Loss: Towards Efficient Representation Learning for Dense Object Detection. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45, 3139-3153. https://doi.org/10.1109/TPAMI.2022.3180392 [13] He, J., Erfani, S., Ma, J., et al. (2021) Alpha-IoU: A Family of Power Intersection over Union Losses for Bounding Box Regression. arXiv: 2110.13675. https://doi.org/10.48550/arXiv.2110.13675 [14] Zhang, Q.-L. and Yang, Y.-B. (2021) SA-Net: Shuffle Attention for Deep Convolutional Neural Networks. ICASSP 2021-2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Toronto, 6-11 June 2021, 2235-2239. https://doi.org/10.1109/ICASSP39728.2021.9414568 [15] Lin, T., Dollar, P., Girshick, R., He, K., Hariharan, B. and Belongie, S. (2017) Feature Pyramid Networks for Object Detection. 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, 21-26 July 2017, 936-944. https://doi.org/10.1109/cvpr.2017.106 [16] Li, C., Li, L., Jiang, H., et al. (2022) YOLOv6: A Single-Stage Object Detection Framework for Industrial Applications. arXiv:2209.02976. https://doi.org/10.48550/arXiv.2209.02976 [17] Ge, Z., Liu, S., Wang, F., et al. (2021) YOLOX: Exceeding YOLO Series in 2021. arXiv: 2107.08430. https://doi.org/10.48550/arXiv.2107.08430 [18] Guo, M., Lu, C., Liu, Z., Cheng, M. and Hu, S. (2023) Visual Attention Network. Computational Visual Media, 9, 733-752. https://doi.org/10.1007/s41095-023-0364-2 [19] Lau, K.W., Po, L.-M. and Ur Rehman, Y.A. (2024) Large Separable Kernel Attention: Rethinking the Large Kernel Attention Design in CNN. Expert Systems with Applications, 236, Article 121352. https://doi.org/10.1016/j.eswa.2023.121352