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网络, 成功构建了一个更轻量快速的目标检测系统.Abstract: With the continuous progress and expansion of space exploration missions, the quantity of remote sensing images that need to be processed has been increased substantially. In such a context, the target detection systems are confronted with ever-higher demands in terms of robustness and timeliness. The traditional approach of transmitting a large volume of remote sensing data back to the ground for processing has become infeasible due to various limitations such as communication bandwidth and time delay. To address this critical issue, this research focuses on the on-orbit target detection system of remote sensing images, which is based on the astronautics-grade Neural Network Processor (NPU). Specifically, the Yolov5s network is taken as the foundation and optimized. The components with relatively low compatibility with the NPU are replaced, and an attention mechanism is incorporated. This not only overcomes the challenges that the complex network structure and excessive computational requirements of deep learning-based object detection algorithms pose for deployment on satellite processing platforms with limited resources, but also compensates for potential losses in network accuracy. The optimized network is trained iteratively on the GPU using the public dataset VOC. After the CPU-NPU parallel co-processing design, the three main aspects of image processing, namely image preprocessing, feature extraction, and target classification and localization, are executed in parallel. This approach maximizes the utilization of the limited computing and storage resources of the Yulong810A platform. Experimental results demonstrate that when the optimized network is deployed on the Yulong810A on-board processing platform, it achieves remarkable improvements. The number of parameters is significantly reduced by 75%, and compared with the original Yolov5s network, the accuracy is enhanced. The mean Average Precision (mAP) value reaches 71.25%, and the target detection speed attains 47.67 frames per second (fps), which is more than twice the speed of the original Yolov5s network. In summary, this research realizes a more lightweight and faster object detection system, which holds great potential for promoting the development and efficiency of space exploration missions.
-
表 1 网络训练用到的配置参数
Table 1. Configurations used for network training
配置 参数 CPU Intel Core i5-10400 GPU NVIDIA RTX 2060 SUPER 内存 16 GB 软件环境 Python3.6, CUDA10.1, cuDNN7.6.5, OpenCV3.4.5 表 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 表 3 不同模型在嵌入式平台的性能结果
Table 3. Performance results of different models on embedded platforms
-
[1] 于双铭, 武文波, 窦润江, 等. 基于视觉处理器芯片的遥感图像智能处理系统设计与验证[J]. 航天返回与遥感, 2023, 44(5): 54-64 doi: 10.3969/j.issn.1009-8518.2023.05.007YU 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-1208DU 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/JEIT210790SHAO 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-555HU 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-280XUE 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]. 成都: 电子科技大学, 2023WENG 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.020ZHANG 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]. 杭州: 浙江大学, 2023WU Miao. Lightweight Design of Wearing Detection Algorithm for Hotel Cleaning Staff and Implementation of RK3399pro Platform[D]. Hangzhou: Zhejiang University, 2023 -
-