高级检索

基于YOLOv5改进的红外目标检测算法

刘皓皎, 刘力双, 张明淳

刘皓皎, 刘力双, 张明淳. 基于YOLOv5改进的红外目标检测算法[J]. 激光技术, 2024, 48(4): 534-541. DOI: 10.7510/jgjs.issn.1001-3806.2024.04.011
引用本文: 刘皓皎, 刘力双, 张明淳. 基于YOLOv5改进的红外目标检测算法[J]. 激光技术, 2024, 48(4): 534-541. DOI: 10.7510/jgjs.issn.1001-3806.2024.04.011
LIU Haojiao, LIU Lishuang, ZHANG Mingchun. An improved infrared object detection algorithm based on YOLOv5[J]. LASER TECHNOLOGY, 2024, 48(4): 534-541. DOI: 10.7510/jgjs.issn.1001-3806.2024.04.011
Citation: LIU Haojiao, LIU Lishuang, ZHANG Mingchun. An improved infrared object detection algorithm based on YOLOv5[J]. LASER TECHNOLOGY, 2024, 48(4): 534-541. DOI: 10.7510/jgjs.issn.1001-3806.2024.04.011

基于YOLOv5改进的红外目标检测算法

基金项目: 

光电信息控制和安全技术重点实验室基金资助项目 202105509

详细信息
    通讯作者:

    刘力双, Liulishaung@bistu.edu.cn

  • 中图分类号: TN219;TP391

An improved infrared object detection algorithm based on YOLOv5

  • 摘要: 为了解决红外图像特征少、对比度不佳导致目标检测时精度低的问题,采用增加一个额外的预测特征层的方法,以提高原始YOLOv5在红外图像中的识别率;通过添加坐标注意力机制,优化红外目标强特征提取,提升检测准确度;再使用双向特征金字塔网络优化特征融合,增强模型表达能力,降低冗余计算;最后解决检测定位差和边界框回归任务中样本不平衡,采用focal-EIOU作为模型的边界框损失函数,提高收敛速度,并专注于高质量的锚框回归。结果表明,改进的YOLOv5在FLIR数据集上的准确率达到了85.3%,相比于原始网络模型提高了4.2%,具有较高的检测准确率。这一结果为在嵌入式设备上部署该软件提供了可行性。
    Abstract: To address the issues of low recognition accuracy, lack of infrared image features, and poor contrast affecting object detection, several improvements to the original YOLOv5 model were proposed. Firstly, an additional prediction feature layer was introduced to enhance the detection capability for small objects in infrared images. Additionally, a coordinate attention mechanism was employed to enhance the extraction of strong features from infrared targets, thereby improving the detection accuracy of the model. Secondly, the feature fusion network was optimized by using a bidirectional feature pyramid network to improve the model's expressive power and reduce redundant computation. Lastly, to tackle the problem of sample imbalance in detection localization and bounding box regression tasks, the focal-EIOU as the loss function was adopted. This accelerates convergence speed and focuses the regression process on high-quality anchor boxes. Experimental results demonstrate that the improved YOLOv5 achieves an accuracy of 85.3% on the FLIR dataset, which is a 4.2% improvement over the original network model. It not only exhibits high detection accuracy but also provides feasibility for deployment on embedded devices.
  • 图  1   YOLOv5s结构图

    Figure  1.   YOLOv5s structure diagram

    图  2   改进的YOLOv5s结构图

    Figure  2.   Improved YOLOv5s structure diagram

    图  3   CA机制

    Figure  3.   CA mechanism

    图  4   PAN和BiFPN示意图

    Figure  4.   Schematic diagram of PAN and BiFPN

    图  5   YOLOv5s和改进后的YOLOv5s检测结果对比

    Figure  5.   Comparison of YOLOv5s and improved YOLOv5s detection results

    表  1   训练平台配置

    Table  1   Training platform configuration

    name configuration information
    CPU(central processing unit) Intel(R)Core i9-10900X
    GPU(graphics processing unit) NVIDIA RTX 3090 ×2
    framework Pytorch 1.12.1
    environments CUDA11.6 CUDNN8.3.2
    下载: 导出CSV

    表  2   改进的YOLOv5消融实验数据

    Table  2   Improved Yolov5 ablation experimental data

    model +head BiFPN CA EIOU MAP/%
    YOLOv5s 81.1
    A 83.9
    B 84.5
    C 84.8
    D 85.4
    下载: 导出CSV

    表  3   不同模型的检测性能对比

    Table  3   Comparison of detection performance of different models

    model P/% R/% MAP/% parameter/106 size/Mbyte speed/(frame·s-1) BFLOP
    faster R-CNN 63.9 53.7 80.4 99.2 330.6 33 440.3
    SSD 71.8 34.7 71.8 91.7 182.2 64 190.7
    YOLOv3-tiny 72.1 52.4 58.9 8.6 17.4 205 12.9
    YOLOv4 79.3 66.5 74.9 9.1 18.7 101 20.6
    YOLOv5s 82.6 71.0 81.1 7.0 14.4 116 15.8
    YOLOv5s-p2 85.3 72.8 81.9 7.1 15.5 113 18.6
    our 86.9 74.4 85.3 7.2 15.8 106 19.0
    下载: 导出CSV

    表  4   不同尺寸的检测指标对比

    Table  4   Comparison of detection indicators of different sizes

    model MAP/%
    small medium large
    YOLOv5s 71.3 95.2 94.4
    our method 79.8 96.3 95.2
    下载: 导出CSV
  • [1] 李其昌, 李兵伟, 王宏臣. 非制冷红外成像技术发展动态及其军事应用[J]. 军民两用技术与产品, 2016, 42(21): 54-57. DOI: 10.3969/j.issn.1009-8119.2016.21.029

    LI Q Ch, LI B W, WANG H Ch. Development trends and military applications of uncooled infrared imaging technology[J]. Dual Use Technologies & Products, 2016, 42(21): 54-57(in Chinese). DOI: 10.3969/j.issn.1009-8119.2016.21.029

    [2] 侯春萍, 张倩文, 王晓燕, 等. 轮廓匹配的复杂背景中目标检测算法[J]. 哈尔滨工业大学学报, 2020, 52(5): 121-128. https://www.cnki.com.cn/Article/CJFDTOTAL-HEBX202005018.htm

    HOU C P, ZHANG Q W, WANG X Y, et al. Object detection algorithm in complex background based on contour matching[J]. Journal of Harbin Institute of Technology, 2020, 52(5): 121-128(in Chinese). https://www.cnki.com.cn/Article/CJFDTOTAL-HEBX202005018.htm

    [3]

    BILAL M, HANIF M S. Benchmark revision for HOG-SVM pedestrian detector through reinvigorated training and evaluation methodologies[J]. IEEE Transactions on Intelligent Transportation Systems, 2021, 16(52): 1277-1287.

    [4]

    GIRSHICK R, DONAHUE J, DARRELL T, et al. Rich feature hie-rarchies for accurate object detection and semantic segmentation[C]// Conference on Computer Vision and Pattern Recognition. Columbus, USA: IEEE Press, 2014: 277-127.

    [5]

    LI Y, PANG Y, CAO J, et al. Improving single shot object detection with feature scale unmixing[J]. IEEE Transactions on Image Processing, 2021, 30: 2708-2721. DOI: 10.1109/TIP.2020.3048630

    [6]

    CHENG G, YUAN X, YAO X W, et al. Towards large-scale small object detection: Survey and benchmarks[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2023, 23(76): 34-46.

    [7]

    REDMON J, DIVVALA S, GIRSHICK R, et al. You only look once: Unified, real-time object detection[C]//Conference on Computer Vision and Pattern Recognition. Las Vegas, USA: IEEE Press, 2016: 779-788.

    [8] 张明淳, 牛春晖, 刘力双, 等. 用于无人机探测系统的红外小目标检测算法[J]. 激光技术, 2024, 48(1): 114-120. DOI: 10.7510/jgjs.issn.1001-3806.2024.01.018

    ZHANG M Ch, NIU Ch H, LIU L Sh, et al. Infrared small target detection algorithm for unmanned aerial vehicle detection system[J]. Laser Technology, 2024, 48(1): 114-120(in Chinese). DOI: 10.7510/jgjs.issn.1001-3806.2024.01.018

    [9] 王云杰, 王艳林, 夏润秋, 等. 大视场红外告警系统中目标高精度方位提取[J]. 激光技术, 2023, 47(2): 200-204. DOI: 10.7510/jgjs.issn.1001-3806.2023.02.007

    WANG Y J, WANG Y L, XIA R Q, et al. High precision azimuth extraction of targets in a large field of view infrared warning system[J]. Laser Technology, 2023, 47(2): 200-204(in Chinese). DOI: 10.7510/jgjs.issn.1001-3806.2023.02.007

    [10]

    JIANG P, DAJI E, LIU F, et al. A review of YOLO algorithm deve-lopments[J]. Procedia Computer Science, 2022, 199: 1066-1073. DOI: 10.1016/j.procs.2022.01.135

    [11]

    TERVEN R, CORDOVA-ESPARAZA D M. A comprehensive review of YOLO: From YOLOv1 to YOLOv8 and beyond[J]. arXiv Computer Science, 2023, 4: 2304.00501.

    [12]

    BOCHKOVSKIY A, WANG C Y, LIAO H Y M. Yolov4: Optimal speed and accuracy of object detection[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2020, 75(23): 2004-10934.

    [13]

    ZHANG Y, GUO Zh Y, WU J Q, et al. Real-time vehicle detection based on improved YOLOv5[J]. Sustainability, 2022, 19: 12274-15427.

    [14]

    FANGBO Z, ZHAO H L, NIE Z. Safety helmet detection based on YOLOv5[J]. IEEE International Conference on Power Electronics, Computer Applications, 2021, 34(56): 6-11.

    [15]

    ZHU X K, LYU Sh Ch, WANG X, et al. TPH-YOLOv5: Improved YOLOv5 based on transformer prediction head for object detection on drone-captured scenarios[C]//International Conference on Computer Vision. Québec, Canada: IEEE Press, 2021: 11539.

    [16]

    HOU Q B, ZHOU D Q, FENG J S. Coordinate attention for efficient mobile network design[C]//Conference on Computer Vision and Pattern Recognition. Nashville, USA: IEEE Press, 2021: 13731-13722.

    [17]

    WOO S H, PARK J C, LEE J Y, et al. CBAM: Convolutional block attention module[C]//European Conference on Computer Vision. Munich, Germany: Springer Science Press, 2018: 3-9.

    [18]

    HU J, LI S, SUN G. Squeeze-and-excitation networks[C]//Confe-rence on Computer Vision and Pattern Recognition. Salt Lake City, USA: IEEE Press, 2018: 7132-7141.

    [19]

    TAN M X, PANG R M, LE Q V. Efficientdet: Scalable and efficient object detection[C]//Conference on Computer Vision and Pattern Recognition. Seattle, USA: IEEE Press, 2020: 10781-10790.

    [20]

    ZHANG Y F, REN W Q, ZHANG Z, et al. Focal and efficient IOU loss for accurate bounding box regression[J]. Neurocomputing, 2022, 506: 146-157.

    [21] 陈旭, 彭冬亮, 谷雨. 基于改进YOLOv5s的无人机图像实时目标检测[J]. 光电工程, 2022, 49(3): 210372. https://www.cnki.com.cn/Article/CJFDTOTAL-GDGC202203006.htm

    CHEN X, PENG D L, GU Y. Real-time objeet detection for UAV images based on improved YOLOv5s[J]. Opto-Electronic Engineering, 2022, 49(3): 210372(in Chinese). https://www.cnki.com.cn/Article/CJFDTOTAL-GDGC202203006.htm

图(5)  /  表(4)
计量
  • 文章访问数:  20
  • HTML全文浏览量:  2
  • PDF下载量:  9
  • 被引次数: 0
出版历程
  • 收稿日期:  2023-07-27
  • 修回日期:  2023-10-06
  • 发布日期:  2024-07-24

目录

    /

    返回文章
    返回