摘要
针对CNN算法计算量大、运算耗时长、对PC资源依赖程度高的缺点,提出一种基于Vivado高层次综合硬件加速CNN实时图像处理的方法。将训练好的CNN模型中各参数提取并导入Vivado HLS中,利用C++语言按照Vivado HLS处理规范编写CNN识别算法,实现由FPGA的逻辑资源生成CNN算法对应的RTL级硬件电路,通过Vivado HLS仿真窗口进行CNN识别算法的测试,评估硬件加速CNN算法实时图像处理的效果。实验结果表明,该方法识别MNIST库中10000例手写体样本仅需8.69 s,PC端识别相同样本的时间为30 s,该方法有利于实时图像处理算法向硬件化高性能处理平台ZynqSOC移植。
To overcome the shortcomings of CNN algorithm,such as big computational complexity,long computation time,and high dependence on PC resources,a method based on Vivado high-level synthesis to implement hardware accelerated CNN algorithm for real-time image processing was proposed.Parameters were extracted from the trained CNN model and put into the Vivado HLS.The C++language was used to write the CNN recognition algorithm according to the Vivado HLS processing specification for realizing the RTL level hardwire circuit by the logic resources of the FPGA,which was corresponding to the CNN algorithm.The performance of the hardware accelerated CNN algorithm was tested by the hardware circuit from the Vivado HLS simulation window to evaluate the effect of hardware accelerated CNN algorithm for real-time image processing.Experimental results show that it just cost 8.69 s to correctly identify 10000 handwritten samples in the MNIST library using the proposed method,but cost about 30 s using PC-side.This method is helpful for transplanting the real-time image processing algorithms to the hardware high-performance processing platform ZynqSOC.
作者
张强
孙静
王威廉
康立富
ZHANG Qiang;SUN Jing;WANG Wei-lian;KANG Li-fu(School of Information Science and Technology,Yunnan University,Kunming 650500,China;School of Data Science and Engineering,Yunnan Normal University Business School,Kunming 651701,China)
出处
《计算机工程与设计》
北大核心
2020年第6期1581-1585,共5页
Computer Engineering and Design
基金
国家自然科学基金项目(61261008)
云南省重大科技专项基金项目(2018ZF017)。