Improved YOLOv5-based Infrared Dim-small Target Detection under Complex Background
-
摘要: 针对传统算法依赖于对红外目标与环境背景的精确分离和信息提取,难以满足复杂背景和噪声等干扰因素下的检测需求。论文提出一种基于改进YOLOv5(You Only Look Once)的复杂背景红外弱小目标检测算法。该算法在YOLOv5基础上,添加注意力机制提高算法的特征提取能力和检测效率,同时改进原YOLOv5目标检测网络的损失函数和预测框的筛选方式提高算法对红外弱小目标检测的准确率。实验选取了来自不同复杂背景的7组红外弱小目标数据集,将这些图像数据集进行标注并训练,得到红外弱小目标检测模型,然后从模型训练结果和目标检测结果的角度评估算法和模型的正确性。实验结果表明:改进的YOLOv5算法训练出来的模型,检测准确性和检测速度对比实验列出的几种目标检测算法均有明显的提升,平均精度均值(mean Average Precision,mAP)可达99.6%以上,在不同复杂背景下均可有效检测出红外弱小目标,且漏警率、虚警率低。Abstract: Using the traditional algorithm to meet the detection requirements of interference factors, such as complex background and noise, relying on the precise separation and information extraction of infrared targets and environmental background, is difficult. This paper presents a dim–small target detection method for an infrared imaging algorithm based on the improved YOLOv5 for complex backgrounds. Based on YOLOv5, an attention mechanism is introduced in the algorithm to improve the feature extraction ability and detection efficiency. In addition, the loss function and prediction box screening method of the original YOLOv5 target detection network are used to improve the accuracy of the algorithm for infrared dim–small target detection. In the experiment, seven sets of infrared dim–small target image datasets with different complex backgrounds are selected, the data are labeled and trained, and an infrared dim–small target detection model is established. Finally, the accuracy of the algorithm and model is evaluated in terms of the model training and target detection results. The experimental results show that the model trained by employing the improved YOLOv5 algorithm in this study has a significant improvement in detection accuracy and speed compared with several target detection algorithms used in the experiment, and the average accuracy can reach more than 99.6%. The model can effectively detect infrared dim–small targets in different complex backgrounds, and the leakage and false alarm rates are low.
-
Keywords:
- infrared dim-small target /
- complex backgrounds /
- YOLOv5 /
- attention mechanism /
- loss function
-
-
表 1 红外图像数据划分
Table 1 Infrared image data segmentation
Dataset Total Training set Validation set Test set data1 400 280 80 40 data2 400 280 80 40 data3 500 350 100 50 data4 500 350 100 50 data5 600 420 120 60 data6 600 420 120 60 data7 600 420 120 60 表 2 训练环境配置
Table 2 Training environment configuration
Parameters Configuration Operating system ubuntu16.04 Video memory 8G RAM 8G GPU NVIDIA GeForce GTX 1050 Ti GPU acceleration environment Training framework CUDA10.1
Pytorch表 3 训练参数配置
Table 3 Training parameters configuration
Parameters Configuration Model YOLOv5s Training rounds 50 Batch size 8 Weights Yolov5s.pt 表 4 算法模型结果对比
Table 4 Comparison of 5 model results
Parameters mAP Time/s SSD 78.88% 5.80 Faster R-CNN 90.33% 4.89 YOLOv3 97.55% 2.47 YOLOv5
Improved YOLOv598.76%
99.65%1.25
0.82 -
[1] GAO Jinyan, GUO Yulan, LIN Zaiping, et al. Robust infrared small target detection using multiscale gray and variance difference measures[J]. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 2018, 11(12): 5039-5052. DOI: 10.1109/JSTARS.2018.2877501
[2] XU Yongli, WANG Weihua. A method for single frame detection of infrared dim small target in complex background[J]. Journal of Physics. Conference Series, 2020, 1634(1): 012063. DOI: 10.1088/1742-6596/1634/1/012063
[3] 马铭阳, 王德江, 孙翯, 等. 基于稳健主成分分析和多点恒虚警的红外弱小目标检测[J]. 光学学报, 2019, 39(8): 0810001. https://www.cnki.com.cn/Article/CJFDTOTAL-GXXB201908013.htm MA Mingyang, WANG Dejiang, SUN He, et al. Infrared dim-small target detection based on robust principal component analysis and multi-point constant false alarm[J]. Acta Photonica Sinica, 2019, 39(8): 0810001. https://www.cnki.com.cn/Article/CJFDTOTAL-GXXB201908013.htm
[4] 杨其利, 周炳红, 郑伟, 等. 基于全卷积网络的红外弱小目标检测算法[J]. 红外技术, 2021, 43(4): 349-356. http://hwjs.nvir.cn/article/id/3abe1943-0aea-49e7-b39f-cfad3d9c8ac4 YANG Qili, ZHOU Binghong, ZHENG Wei, et al. Infrared weak target detection algorithm based on full convolutional network[J]. Infrared Technology, 2021, 43(4): 349-356. http://hwjs.nvir.cn/article/id/3abe1943-0aea-49e7-b39f-cfad3d9c8ac4
[5] 仇国庆, 杨海静, 王艳涛, 等. 基于视觉特征融合的机载红外弱小目标检测[J]. 激光与光电子学进展, 2020, 57(18): 79-86. https://www.cnki.com.cn/Article/CJFDTOTAL-JGDJ202018007.htm QIU Guoqing, YANG Haijing, WANG Yantao, et al. Dim target detection in airborne infrared images based on visual feature fusion[J]. Laser & Optoelectronics Progress, 2020, 57(18): 79-86. https://www.cnki.com.cn/Article/CJFDTOTAL-JGDJ202018007.htm
[6] 陆福星, 李夜金, 陈忻, 等. 基于Top-hat变换的PM模型弱小目标检测[J]. 系统工程与电子技术, 2018, 40(7): 1417-1422. https://www.cnki.com.cn/Article/CJFDTOTAL-XTYD201807001.htm LU Fuxing, LI Yegin, CHEN Xin, et al. Weak target detection for PM model based on Top-hat transform[J]. Systems Engineering and Electronics, 2018, 40(7): 1417-1422. https://www.cnki.com.cn/Article/CJFDTOTAL-XTYD201807001.htm
[7] 汪烈兵, 姜雄飞, 石春光, 等. 基于图像滤波与Hough变换的红外弱小目标检测[J]. 红外技术, 2020, 42(7): 683-687. http://hwjs.nvir.cn/article/id/hwjs202007012 WANG Liebing, JIANG Xiongfei, SHI Chunguang, et al. Infrared small target detection based on image filtering and Hough transform[J]. Infrared Technology, 2020, 42(7): 683-687. http://hwjs.nvir.cn/article/id/hwjs202007012
[8] 韩金辉, 董兴浩, 蒋亚伟, 等. 基于局部对比度机制的红外弱小目标检测算法[J]. 红外技术, 2021, 43(4): 357-366. http://hwjs.nvir.cn/article/id/29b77b73-8c1e-4251-9ae4-c9f39e265270 HAN Jinhui, DONG Xinjhao, JIANG Yawei, et al. Infrared small dim target detection based on local contrast mechanism[J]. Infrared Technology, 2021, 43(4): 357-366. http://hwjs.nvir.cn/article/id/29b77b73-8c1e-4251-9ae4-c9f39e265270
[9] Kaveh Ahmadi, Ezzatollah Salari. Small dim object tracking using frequency and spatial domain information[J]. Pattern Recognition, 2016, 58: 227-234. DOI: 10.1016/j.patcog.2016.04.001
[10] 冯洋. 基于小波包变换的红外弱小目标检测[J]. 计算机与现代化, 2020(12): 112-115, 122. DOI: 10.3969/j.issn.1006-2475.2020.12.019 FENG Yang. Infrared dim small target detection based on wavelet packet transform[J]. Computers and Modernization, 2020(12): 112-115, 122. DOI: 10.3969/j.issn.1006-2475.2020.12.019
[11] 李德新, 钟洪. 基于差异梯度直方图与显著性映射的红外弱小目标检测算法[J]. 光学技术, 2021, 47(5): 594-600. https://www.cnki.com.cn/Article/CJFDTOTAL-GXJS202105015.htm LI Dexin, ZHONG Hong. Infrared dim small target detection algorithm based on difference histogram of oriented gradients and saliency map[J]. Optical Technique, 2021, 47(5): 594-600. https://www.cnki.com.cn/Article/CJFDTOTAL-GXJS202105015.htm
[12] ZHANG N, Donahue J, Girshick R, et al. Part-based R-CNNs for fine-grained category detection[C]//European Conference on Computer Vision, 2014: 834-849.
[13] Girshick R. Fast R-CNN[C]//Proceedings of the IEEE International Conference on Computer Vision, 2015: 1440-1448.
[14] REN S, HE K, Girshick R, et al. Faster R-CNN: Towards real-time object detection with region proposal networks[J]. IEEE Transactions on Pattern Analysis & Machine Intelligence, 2017, 39(6): 1137-1149.
[15] Redmon J, Divvala S, Girshick R, et al. You Only Look Once: real-time object detection[C]// IEEE Conference on Computer Vision and Pattern Recognition, 2016: 779-788.
[16] LIU W, Anguelov D, Erhan D, et al. SSD: Single shot multibox detector[C]//European Conference on Computer Vision, 2016: 21-37.
[17] 杨晓玲, 江伟欣, 袁浩然. 基于Yolov5的交通标志识别检测[J]. 信息技术与信息化, 2021(4): 28-30. DOI: 10.3969/j.issn.1672-9528.2021.04.005 YANG Xiaoling, JIANG Weixin, YUAN Haoran. Traffic sign recognition detection based on Yolov5[J]. Information Technology and Informatization, 2021(4): 28-30. DOI: 10.3969/j.issn.1672-9528.2021.04.005
[18] Lowe D G. Distinctive image features from scale invariant keypoints[J]. International Journal of Computer Vision, 2004, 60(2): 91-110. DOI: 10.1023/B:VISI.0000029664.99615.94
[19] 范有臣, 马旭, 马淑丽, 等. 深度学习在激光干扰效果评估中的应用[J/OL]. 红外与激光工程, [2021-08-03]: 1-8. FAN Youchen, MA Xu, MA Shuli et al. Evaluation method of laser jamming learning effect based on deep learning[J/OL]. Infrared and Laser Engineering, [2021-08-03]: 1-8.
[20] 林清平, 张麒麟, 肖蕾. 采用改进YOLOv5网络的遥感图像目标识别方法[J]. 空军预警学院学报, 2021, 35(2): 117-120. https://www.cnki.com.cn/Article/CJFDTOTAL-KLDX202102008.htm LIN Qingping, ZHANG Qilin, XIAO Lei. A remote sensing image target recognition method using improved YOLOv5 network[J]. Journal of Air Force Early Warning Academy, 2021, 35(2): 117-120. https://www.cnki.com.cn/Article/CJFDTOTAL-KLDX202102008.htm
[21] 王宇宁, 庞智恒, 袁德明. 基于YOLO算法的车辆实时检测[J]. 武汉理工大学学报, 2016, 38(10): 41-46. DOI: 10.3963/j.issn.1671-4431.2016.10.008 WANG Yuning, PANG Zhiheng, YUAN Deming. Vehicle detection based on YOLO in real time[J]. Journal of Wuhan University of Technology, 2016, 38(10): 41-46. DOI: 10.3963/j.issn.1671-4431.2016.10.008
[22] 周飞燕, 金林鹏, 董军. 卷积神经网络研究综述[J]. 计算机学报, 2017, 40(6): 1229-1251. https://www.cnki.com.cn/Article/CJFDTOTAL-JSJX201706001.htm ZHOU Feiyan, JIN Linpeng, DONG Jun. Review of convolutional neural network[J]. Chinese Journal of Computers, 2017, 40(6): 1229-1251. https://www.cnki.com.cn/Article/CJFDTOTAL-JSJX201706001.htm
[23] ZHOU Junchi et al. Ship target detection algorithm based on improved YOLOv5[J]. Journal of Marine Science and Engineering, 2021, 9(8): 908-908. DOI: 10.3390/jmse9080908
[24] 张宏群, 班勇苗, 郭玲玲, 等. 基于YOLOv5的遥感图像舰船的检测方法[J]. 电子测量技术, 2021, 44(8): 87-92. https://www.cnki.com.cn/Article/CJFDTOTAL-DZCL202108017.htm ZHANG Hongqun, BAN Yongmiao, GUO Lingling, et al. Detection method of remote sensing image ship based on YOLOv5[J]. Electronic Measurement Technology, 2021, 44(8): 87-92. https://www.cnki.com.cn/Article/CJFDTOTAL-DZCL202108017.htm
-
期刊类型引用(31)
1. 张子军,赵旭,李连鹏,刘子玉. 基于SIRA的红外和可见光图像未爆弹目标配准方法. 红外技术. 2025(03): 376-384 . 本站查看
2. 刘子玉,赵旭,李连鹏,许学平. 基于SAE-YOLOv5的机载红外UXO目标检测方法. 激光与红外. 2025(02): 288-295 . 百度学术
3. 李瑶,武琼,陈岳军,解伟豪. 城市照明无人机智能巡检系统的研究及应用. 科技和产业. 2025(07): 36-42 . 百度学术
4. 陈健松,蔡艺军. 面向垃圾分类场景的轻量化目标检测方案. 浙江大学学报(工学版). 2024(01): 71-77 . 百度学术
5. 傅饶,房建东,赵于东. 无监督缺失值预测的运动目标检测算法. 计算机工程与应用. 2024(04): 220-228 . 百度学术
6. 刘子玉,赵旭,李连鹏,代牮. 基于NGG-YOLOv5的空对地UXO目标检测方法. 电光与控制. 2024(03): 70-74 . 百度学术
7. 刘琦妍,张凯,王田田,杨尧. 基于残差密集连接注意力的红外目标识别算法. 电光与控制. 2024(06): 31-35 . 百度学术
8. 宋为,王赫莹,郭忠峰,胡克腾. 基于改进YOLOv5s的目标检测算法. 机械工程师. 2024(09): 64-67 . 百度学术
9. 张海峰,芦新春,冯博,杨进. 基于改进YOLOv5s的海水鱼种类识别. 食品与机械. 2024(08): 84-92 . 百度学术
10. 张兴平,邵延华,梅艳莹,张晓强,楚红雨. 融合视觉显著性的红外航拍行人检测. 红外技术. 2024(09): 1043-1050 . 本站查看
11. 周鹍,郭俊鑫,罗杰,李云红,李丽敏,苏雪平,侯乐乐. 基于红外测温数据的水电站设备缺陷检测方法. 红外技术. 2024(11): 1308-1314 . 本站查看
12. 王育欣,张志,张家亮,韩江宁,连建国,祁一峰. 基于改进YOLOv5算法的光伏缺陷检测. 太阳能学报. 2024(12): 139-145 . 百度学术
13. 王涛,冯凯. 自注意力特征下机场跑道周界异物入侵预警. 计算机仿真. 2024(12): 88-92 . 百度学术
14. 张杰,魏艳龙,薛红新. 基于CBW-YOLOv5s轻量化模型的学生课堂行为快速检测. 现代计算机. 2024(21): 1-7 . 百度学术
15. 曾耀,高法钦. 基于改进YOLOv5的电子元件表面缺陷检测算法. 浙江大学学报(工学版). 2023(03): 455-465 . 百度学术
16. 刘宇宸,李浩. 显著性特征融合的热红外图像光伏组件热斑检测. 水力发电. 2023(04): 96-101+112 . 百度学术
17. 刘璎瑛,曹晅,郭彬彬,陈慧杰,戴子淳,龚长万. 基于改进YOLO v5复杂场景下肉鹅姿态的检测算法研究. 南京农业大学学报. 2023(03): 606-614 . 百度学术
18. 张军,郑黎明,刘先禄. 基于轻量化模型YOLOv4-tiny的目标检测改进. 阜阳师范大学学报(自然科学版). 2023(02): 58-65 . 百度学术
19. 潘桂霞,赖惠成,王同官,赵艳杰,文晓鹏. 一种Yolov5颈部细化的小交通标志检测算法. 现代电子技术. 2023(14): 56-62 . 百度学术
20. 梁纲,栗晓政,饶宇飞,杨磊,商兵兵. 一种Transformer引导YOLOv5对高空吊钩违规操作识别. 电工技术. 2023(10): 1-4 . 百度学术
21. 薛强,李宇,葛绍妹,侯仕杰,周红,陈康伟,金美骥. 基于改进YOLOv5算法绝缘子缺陷检测研究. 电工技术. 2023(11): 182-185 . 百度学术
22. 朱菊香,崔长胜,张赵良,张铭. 红外道路场景下车辆与行人检测算法. 国外电子测量技术. 2023(06): 171-179 . 百度学术
23. 盛博莹,侯进,李嘉新,党辉. 面向复杂交通场景的道路目标检测方法. 计算机工程与应用. 2023(15): 87-96 . 百度学术
24. 陆兆刚,朱旋. 轧辊磨床屏幕智能相机与图像识别方法研究. 电子测量与仪器学报. 2023(07): 243-250 . 百度学术
25. 潘博阳. 融合多尺度注意力和分离解耦头的红外弱小目标检测算法. 首都师范大学学报(自然科学版). 2023(05): 30-36 . 百度学术
26. 古静,朱志宇. 改进YOLOv5的红外船舶目标检测算法. 电光与控制. 2023(10): 21-26 . 百度学术
27. 张玉彬,刘鹏谦,陈丽娜,韩雅鸽,刘蕊,谢静,徐长航. 基于YOLO v5的带涂层钢结构亚表面缺陷脉冲涡流热成像智能检测. 红外技术. 2023(10): 1029-1037 . 本站查看
28. 张睿,李允臣,王家宝,李阳,苗壮. 基于深度学习的红外目标检测综述. 计算机技术与发展. 2023(11): 1-8 . 百度学术
29. 史梦圆,高俊钗. 改进YOLO v5的建筑物破损检测算法研究. 国外电子测量技术. 2022(08): 84-90 . 百度学术
30. 刘麒,尹港,王影,叶泽. 基于深度学习的水面漂浮物识别算法设计. 吉林化工学院学报. 2022(07): 28-33 . 百度学术
31. 叶剑青,汪义贺,母久状,吴冰,朱峰. 基于YOLOv5s的电厂蒸汽泄漏检测研究. 现代信息科技. 2022(19): 52-56+60 . 百度学术
其他类型引用(19)