留言板

尊敬的读者、作者、审稿人, 关于本刊的投稿、审稿、编辑和出版的任何问题, 您可以本页添加留言。我们将尽快给您答复。谢谢您的支持!

姓名
邮箱
手机号码
标题
留言内容
验证码

基于宇航级NPU的轻量化Yolov5算法的目标检测系统

刘冰 周海 卞春江 成晓蕾 王鹏飞 张彪

刘冰, 周海, 卞春江, 成晓蕾, 王鹏飞, 张彪. 基于宇航级NPU的轻量化Yolov5算法的目标检测系统[J]. 空间科学学报. doi: 10.11728/cjss2025.04.2024-0103
引用本文: 刘冰, 周海, 卞春江, 成晓蕾, 王鹏飞, 张彪. 基于宇航级NPU的轻量化Yolov5算法的目标检测系统[J]. 空间科学学报. doi: 10.11728/cjss2025.04.2024-0103
LIU Bing, ZHOU Hai, BIAN Chunjiang, CHENG Xiaolei, WANG Pengfei, ZHANG Biao. Lightweight Yolov5 Algorithm Target Detection System Based on Space-grade NPU (in Chinese). Chinese Journal of Space Science, 2025, 45(4): 1-11 doi: 10.11728/cjss2025.04.2024-0103
Citation: LIU Bing, ZHOU Hai, BIAN Chunjiang, CHENG Xiaolei, WANG Pengfei, ZHANG Biao. Lightweight Yolov5 Algorithm Target Detection System Based on Space-grade NPU (in Chinese). Chinese Journal of Space Science, 2025, 45(4): 1-11 doi: 10.11728/cjss2025.04.2024-0103

基于宇航级NPU的轻量化Yolov5算法的目标检测系统

doi: 10.11728/cjss2025.04.2024-0103 cstr: 32142.14.cjss.2024-0103
基金项目: 中国科学院青年创新促进会项目资助(E0293401)
详细信息
    作者简介:
    • 刘冰 男, 2000年出生于河南省新乡市, 现为中国科学院国家空间科学中心学生, 研究方向为智能星上信息处理、星上目标检测系统研究等. E-mail: 2492869534@qq.com
    通讯作者:
    • 周海 男, 1987年出生于安徽省蛙埠市, 现为中国科学院国家空间科学中心智能室副主任, 博士生导师, 研究员, 研究方向为目标探测与识别、遥感图像处理等. E-mail: zhouhai@nssc.ac.cn
  • 中图分类号: V557

Lightweight Yolov5 Algorithm Target Detection System Based on Space-grade NPU

  • 摘要: 由于空间探测任务中需处理的遥感图像数量增多, 对目标检测系统的鲁棒性和时效性要求越来越高, 将大量遥感数据传输给地面再进行处理已经无法满足空间探测任务的需求. 针对此问题, 本文开展了基于宇航级NPU的遥感图像在轨目标检测系统研究, 以Yolov5s网络为基础, 替换与NPU适配度低的部分并引入注意力机制提升精度, 解决深度学习算法模型复杂和计算量大导致其在星上难以部署的问题. 优化后的网络迭代训练后部署在开发板上, 经CPU - NPU并行协同处理, 并行执行图像处理三部分, 充分利用Yulong810A平台资源. 实验显示, 优化后的网络部署到星上平台后参数量减少75%, mAP 值达71.25%, 检测速度为47.67 frame·s–1, 均超过原版Yolov5s网络, 成功构建了一个更轻量快速的目标检测系统.

     

  • 图  1  Yolov5的结构

    Figure  1.  Structure of Yolov5 network

    图  2  Ghost模块结构

    Figure  2.  Structure of the Ghost module

    图  3  Ghost bottleneck模块的结构模型

    Figure  3.  Structure of Ghost Bottleneck module

    图  4  改进后的yolov5-Ghost的主干网络模型

    Figure  4.  Structure of the improved Yolov5-Ghost backbone

    图  5  CBAM模块结构

    Figure  5.  Structure of the CBAM module

    图  6  Yolov5-CBAM+Ghost网络模型的结构

    Figure  6.  Structure of Yolov5-CBAM+Ghost network module

    图  7  算子融合前后计算示意

    Figure  7.  Schematic diagram of the calculation before and after operator fusion

    图  8  NPU的图像处理流程

    Figure  8.  Image processing flow diagram of the NPU

    图  9  多线程并行图像处理流程

    Figure  9.  Multi-threaded parallel image processing flowchart

    图  10  CPU-NPU并行计算处理

    Figure  10.  Image processing flow diagram of the CPU-NPU

    图  11  改进后网络的GIoU和mAP曲线变化

    Figure  11.  GIoU and mAP of the improved network

    表  1  网络训练用到的配置参数

    Table  1.   Configurations used for network training

    配置参数
    CPUIntel Core i5-10400
    GPUNVIDIA RTX 2060 SUPER
    内存16 GB
    软件环境Python3.6, CUDA10.1, cuDNN7.6.5, OpenCV3.4.5
    下载: 导出CSV

    表  2  模型改进前后的性能结果

    Table  2.   Performance results before and after model improvements

    模型 权重参数/MByte mAP/(%) 计算量/GFLOPs
    原Yolov5s 15.2 76.29 16.0
    Our-Yolov5s 6.71 78.47 10.5
    下载: 导出CSV

    表  3  不同模型在嵌入式平台的性能结果

    Table  3.   Performance results of different models on embedded platforms

    模型选择 参数量/MByte 处理平台的硬件选择 推理速度/fps mAP/(%)
    原Yolov5s[26] 3.8 Yulong810 A 13.2 69.97
    优化Yolov3[16] CPU-NPU 28 69.79
    优化Yolov5s[27] 2.2 RK3399 pro 50 66.23
    优化Yolov4 s [28] 11.09 RK3399 pro+NPU 35.37 84.79
    本文Yolov5s 2.9 Yulong810 A 47.67 71.25
    下载: 导出CSV
  • [1] 于双铭, 武文波, 窦润江, 等. 基于视觉处理器芯片的遥感图像智能处理系统设计与验证[J]. 航天返回与遥感, 2023, 44(5): 54-64 doi: 10.3969/j.issn.1009-8518.2023.05.007

    YU Shuangming, WU Wenbo, DOU Runjiang, et al. Design and implementation of remote sensing image processing system with intelligent vision processor[J]. Spacecraft Recovery :Times New Roman;">& Remote Sensing, 2023, 44(5): 54-64 doi: 10.3969/j.issn.1009-8518.2023.05.007
    [2] 杜鑫, 钟若飞, 李清扬, 等. 遥感图像星上智能处理地面仿真模拟系统设计与实现[J]. 遥感技术与应用, 2022, 37(5): 1198-1208

    DU Xin, ZHONG Ruofei, LI Qingyang, et al. Design and implementation of ground simulation system for remote sensing image on-board intelligent processing[J]. Remote Sensing Technology and Application, 2022, 37(5): 1198-1208
    [3] 许思源, 吴伟林. 多尺度特征融合的遥感图像目标检测算法研究[J/OL]. 计算机工程与应用, 1-10[2024-07-24]. http://kns.cnki.net/kcms/detail/11.2127.TP.20240625.1708.023.html.

    XU Siyuan, WU Weilin. Research on target detection algorithm based on multi-scale feature fusion in remote sensing images[J/OL]. Computer Engineering and Applications, 1-10[2024-07-24]
    [4] BHAGYA C, SHYNA A. An overview of deep learning based object detection techniques[C]//2019 1st International Conference on Innovations in Information and Communication Technology (ICIICT). Chennai: IEEE, 2019: 1-6. DOI: 10.1109/ICIICT1.2019.8741359
    [5] M R, L A R. Comprehensive investigation on real—time object detection in deep learning[C]//2023 IEEE Fifth International Conference on Advances in Electronics, Computers and Communications (ICAECC). Bengaluru: IEEE, 2023: 1-5. DOI: 10.1109/ICAECC59324.2023.10560332
    [6] KUMAR A S S, MAHESH K. An investigation of deep neural network based techniques for object detection and recognition task in computer vision[C]//2023 2nd International Conference on Edge Computing and Applications (ICECAA). Namakkal: IEEE, 2023: 385-390. DOI: 10.1109/ICECAA58104.2023.10212307
    [7] KUMAR D, Zhang X L. Improving more instance segmentation and better object detection in remote sensing imagery based on cascade mask R-CNN[C]//2021 IEEE International Geoscience and Remote Sensing Symposium IGARSS. Brussels: IEEE, 2021: 4672-4675. DOI: 10.1109/IGARSS47720.2021.9554512
    [8] LE H, NGUYEN T, LE V, et al. Guided anchoring cascade R-CNN: an intensive improvement of R-CNN in Vietnamese document detection[C]//2021 8th NAFOSTED Conference on Information and Computer Science (NICS). Hanoi: IEEE, 2021: 188-193. DOI: 10.1109/NICS54270.2021.9701510
    [9] ZHANG J L, CHEN S X, HOU Y W. Accurate Object detection with relation module on improved R-FCN[C]//2020 Chinese Automation Congress (CAC). Shanghai: IEEE, 2020: 7131-7135. DOI: 10.1109/CAC51589.2020.9326543
    [10] PULIPALUPULA M, PATLOLA S, NAYAKI M, et al. Object detection using You Only Look Once (YOLO) algorithm in Convolution Neural Network (CNN)[C]//2023 IEEE 8th International Conference for Convergence in Technology (I2CT). Lonavla: IEEE, 2023: 1-4. DOI: 10.1109/I2CT57861.2023.10126213
    [11] LU Y H, ZHANG L W, XIE W. YOLO-compact: an efficient YOLO network for single category real-time object detection[C]//2020 Chinese Control and Decision Conference (CCDC). Hefei: IEEE, 2020: 1931-1936. DOI: 10.1109/CCDC49329.2020.9164580
    [12] 邵延华, 张铎, 楚红雨, 等. 基于深度学习的YOLO目标检测综述[J]. 电子与信息学报, 2022, 44(10): 3697-3708 doi: 10.11999/JEIT210790

    SHAO Yanhua, ZHANG Duo, CHU Hongyu, et al. A review of YOLO object detection based on deep learning[J]. Journal of Electronics :Times New Roman;">& Information Technology, 2022, 44(10): 3697-3708 doi: 10.11999/JEIT210790
    [13] 胡焱, 原子昊, 涂晓光, 等. 基于对比学习的改进SSD目标检测算法[J]. 红外技术, 2024, 46(5): 548-555

    HU Yan, YUAN Zihao, TU Xiaoguang, et al. Improved SSD object detection algorithm based on contrastive learning[J]. Infrared Technology, 2024, 46(5): 548-555
    [14] ZHU D R, DAI L F, DU P R. CCE-YOLOv5s: an improved YOLOv5 model for UAV small target detection[C]//2023 IEEE 5th International Conference on Civil Aviation Safety and Information Technology (ICCASIT). Dali: IEEE, 2023: 824-829. DOI: 10.1109/ICCASIT58768.2023.10351744
    [15] BISWAS S, NANDY A, NASKAR A K, et al. Real time gesture recognition using improved YOLOv5 model[C]//2024 11th International Conference on Signal Processing and Integrated Networks (SPIN). Noida: IEEE, 2024: 328-333. DOI: 10.1109/SPIN60856.2024.10511787
    [16] CHEN S B, LIN W. Embedded system real-time vehicle detection based on improved YOLO network[C]//2019 IEEE 3rd Advanced Information Management, Communicates, Electronic and Automation Control Conference (IMCEC). Chongqing: IEEE, 2019: 1400-1403. DOI: 10.1109/IMCEC46724.2019.8984055
    [17] BOLTOV Y, SKARGA-BANDUROVA I, DERKACH M. A comparative analysis of deep learning-based object detectors for embedded systems[C]//2023 IEEE 12th International Conference on Intelligent Data Acquisition and Advanced Computing Systems: Technology and Applications (IDAACS). Dortmund: IEEE, 2023: 1156-1160. DOI: 10.1109/IDAACS58523.2023.10348642
    [18] AI AMIN R, HASAN M, WIESE V, et al. FPGA-based real-time object detection and classification system using YOLO for edge computing[J]. IEEE Access, 2024, 12: 73268-73278. doi: 10.1109/ACCESS.2024.3404623
    [19] KAYMAKCI Z E, AKARSU M, ÖZTÜRK C N. Multiple small-scale object detection in aerial vehicle images using standard or optimized YOLO detectors[C]//2023 International Conference on Innovations in Intelligent Systems and Applications (INISTA). Hammamet: IEEE, 2023: 1-5. DOI: 10.1109/INISTA59065.2023.10310562
    [20] 薛珊, 安宏宇, 吕琼莹, 等. 复杂背景下基于YOLOv7-tiny的图像目标检测算法[J]. 红外与激光工程, 2024, 53(01): 269-280

    XUE Shan, AN Hongyu, LV Qiongying et al. Image object detection algorithm based on YOLOv7-tiny in complex background[J]. Infrared and laser engineering, 2024, 53(01): 269-280
    [21] Wagstaff K , Shu H , Castano R . How to Leverage Existing Spectral Knowledge when Clustering Hyperspectral Data[J]. AGU Fall Meeting Abstracts, 2004.
    [22] XU P, LI Q Y, ZHANG B, et al. On-board real-time ship detection in hisea-1 SAR images based on CFAR and lightweight deep learning[J]. Remote Sensing, 2021, 13(10): 1995. doi: 10.3390/rs13101995
    [23] ZHOU F B, ZHAO H L, NIE Z. Safety helmet detection based on YOLOv5[C]//2021 IEEE International Conference on Power Electronics, Computer Applications (ICPECA). Shenyang: IEEE, 2021: 6-11. DOI: 10.1109/ICPECA51329.2021.9362711
    [24] HAN K, WANG Y H, TIAN Q, et al. GhostNet: more features from cheap operations[C]//2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Seattle: IEEE, 2020: 1577-1586. DOI: 10.1109/CVPR42600.2020.00165
    [25] WOO S, PARK J, LEE J Y, et al. CBAM: Convolutional block attention module[C]//Proceedings of the 15th European Conference on Computer Vision (ECCV). Munich: Springer, 2018: 3-19
    [26] 翁逍然. 面向边缘端NPU平台的深度神经网络端到端部署系统[D]. 成都: 电子科技大学, 2023

    WENG Xiaoran. A Deep Neural Network End-To-End Deployment System for Edge NPU Platforms[D]. Chengdu: University of Electronic Science and Technology of China, 2023
    [27] 张利红, 蔡敬菊. 基于轻量化Yolov5算法的目标检测系统[J]. 计算机技术与发展, 2022, 32(11): 134-139 doi: 10.3969/j.issn.1673-629X.2022.11.020

    ZHANG Lihong, CAI Jingju. Target detection system based on lightweight Yolov5 algorithm[J]. Computer Technology and Development, 2022, 32(11): 134-139 doi: 10.3969/j.issn.1673-629X.2022.11.020
    [28] 吴淼. 酒店卫勤人员规范穿戴检测网络轻量化设计与RK3399pro平台实现[D]. 杭州: 浙江大学, 2023

    WU Miao. Lightweight Design of Wearing Detection Algorithm for Hotel Cleaning Staff and Implementation of RK3399pro Platform[D]. Hangzhou: Zhejiang University, 2023
  • 加载中
图(11) / 表(3)
计量
  • 文章访问数:  305
  • HTML全文浏览量:  31
  • PDF下载量:  10
  • 被引次数: 

    0(来源:Crossref)

    0(来源:其他)

出版历程
  • 收稿日期:  2024-08-20
  • 录用日期:  2025-07-10
  • 修回日期:  2024-12-25
  • 网络出版日期:  2024-12-31

目录

    /

    返回文章
    返回