中国电子学会电子制造与封装技术分会会刊

中国半导体行业协会封测分会会刊

无锡市集成电路学会会刊

导航

电子与封装

• 电路与系统 •    下一篇

基于Zynq FPGA的YOLOv4检测识别算法前向推理部署设计和优化

程虎1,2,3,杨克成1,杨赟辉2,3   

  1. 1. 华中科技大学光学与电子信息学院,武汉  430074;2. 集成电路与微系统全国重点实验室先进集成电路设计中心,江苏 无锡  214215;3. 中国电子科技集团公司第五十八研究所,江苏 无锡  214035
  • 收稿日期:2026-03-11 修回日期:2026-07-15 出版日期:2026-07-17 发布日期:2026-07-17
  • 通讯作者: 程虎

Design and Optimization of YOLOv4 Detection and Recognition Algorithm for Forward Inference Deployment on Zynq FPGAs

CHENG Hu1,2,3, YANG Kecheng1, YANG Yunhui2,3   

  1. 1. School of Optical and Electronic Information, Huazhong University of Science and Technology, Wuhan 430074, China; 2. Design Center of Advance IC, National Key Laboratory of Integrated Circuits and Microsystems, Wuxi 214215, China; 3. China Electronics Technology Group Corporation 58th Research Institute, Wuxi 214035, China
  • Received:2026-03-11 Revised:2026-07-15 Online:2026-07-17 Published:2026-07-17

摘要: 为提升YOLOv4算法在远距离暗弱目标检测场景中的实时应用性能,本文面向大分辨率图像输入,设计了一种基于Zynq FPGA异构平台的YOLOv4前向推理加速器。针对高分辨率输入带来的存储带宽瓶颈问题,提出双路DRAM并行访存架构,并结合流水化任务调度机制,实现权重与特征数据的并发访问以提升带宽利用率。针对卷积层计算密集的特点,采用循环分块与Im2col-GEMM计算映射方法,实现卷积计算吞吐与存储带宽之间的高效匹配。针对特征金字塔网络(FPN)中的上采样结构,提出一种上采样前置的数据流重构方法,通过在数据重排阶段利用地址控制实现输入数据重复读取,从而以数据流方式等效完成上采样操作,避免复杂的跨行访存设计并实现计算与存储访问的时序解耦。实验结果表明,在XilinxZynqUltraScale+ MPSoCs平台上部署优化后的YOLOv4模型,可实现179.4 Gop/s的等效计算性能,768×768尺寸输入下推理帧率达到13.6 FPS。与传统滑动窗口卷积实现相比,各网络层推理速度提升15.9%,整体推理性能提升67.2%,其中FPN结构网络推理性能提升约2倍。同时,在远距离弱小目标场景下,对于成像面积图像占比10-5量级的目标,所提出方法在保持实时性的前提下表现出更好的检测能力,验证了高分辨率输入与结构优化对微弱目标检测的有效性。

关键词: 硬件加速器, 现场可编程门阵列, 检测识别, 特征金字塔网络, 层间存储空间设计

Abstract: To improve the real-time performance ofYOLOv4for long-distance weak target detection, this paper proposes aYOLOv4forward inference accelerator targeting high-resolution image inputs and implements it on a Zynq FPGA heterogeneous platform. To address the memory bandwidth bottleneck caused by high-resolution feature maps, a dual-DRAM parallel memory access architecture is adopted. Combined with a pipelined task scheduling mechanism, the design enables concurrent access to weights and feature data, thereby improving memory bandwidth utilization. For the computation-intensive convolution layers, a loop tiling strategy together with an Im2col–GEMM computation mapping is employed to achieve efficient matching between convolution throughput and memory bandwidth. Furthermore, to accelerate the feature pyramid network (FPN), a dataflow restructuring method with preposed upsampling is proposed. The upsampling operation is implemented by repeated data reads controlled during the data-reordering stage, allowing the upsampling process to be performed implicitly in the dataflow without introducing additional computation units. This design avoids complex cross-row memory access patterns and decouples computation from memory access timing. Experimental results show that the optimizedYOLOv4model deployed on a Xilinx Zynq UltraScale+ MPSoCs platform achieves an equivalent computing performance of 179.4 Gop/s, with an inference frame rate of 13.6 FPS under 768×768 input resolution. Compared with the conventional sliding-window convolution implementation, the inference latency of individual network layers is reduced by 15.9%, the overall inference performance is improved by 67.2%, and the inference performance of the FPN module is improved by approximately 2×. Meanwhile, in long-range dim small-target scenarios, for targets whose image area accounts for approximately 10-5 of the total image, the proposed method achieves improved detection performance while maintaining real-time capability, demonstrating the effectiveness of high-resolution input and structural optimization for weak target detection.

Key words: hardware accelerator, field programmable gate array, detection and recognition, feature pyramid network, inter-layer storage space design