Acceleration scheme of RXD algorithm based on FPGA for hyperspectral anomaly target detection
-
摘要:
高光谱图像在带来丰富光谱信息的同时,其数据量大和维数高的特性也使得各种目标检测算法进行处理时往往产生庞大的运算量,所以采用可以实现高光谱异常目标检测算法的高速处理方案显得尤为迫切和重要。考虑到现场可编程门阵列(FPGA)强大的并行计算能力和极具灵活的设计方式,针对高光谱异常目标检测RXD算法中协方差矩阵及其逆的计算量过大的问题,以分块并行和正交三角(QR)分解为主要加速思想,利用高层次综合(HLS)工具对算法进行优化,提出了RXD算法在FPGA平台上的加速方案。实验结果表明,所提出的基于FPGA平台的加速方案可以在保持算法检测性能的同时达到相较于CPU实现7.04倍的加速,验证了加速方案的正确有效性。
-
关键词:
- 高光谱异常目标检测 /
- RXD算法 /
- 分块并行 /
- 正交三角(QR)分解 /
- 高层次综合(HLS) /
- 加速方案
Abstract:Hyperspectral images bring abundant spectral information, but their large size and high dimensionality also lead to huge calculation. Therefore, it is particularly urgent to develop a high-speed processing scheme for anomaly target detection algorithms. Considering that the field programmable gate arrays (FPGA) are of powerful parallel capability and highly flexible design, aiming at the problem that the computation of the covariance matrix and its inverse is too large in the Reed-Xiaoli Detector (RXD) algorithm, we propose an acceleration scheme of block parallel and QR decomposition for the RXD algorithm based on the FPGA platform, which is optimized by high level synthesis (HLS). Experimental results show that the processing speed of FPGA-based acceleration scheme proposed in this paper is 7.04 times faster than that of CPU-based implementations with the detection performance preserved simultaneously, which verifies that the proposed acceleration scheme is correct and effective.
-
表 1 添加约束项后2种方法的时序
Table 1. Timing sequence after adding constraints of two methods
方法 最小时延/
clk最大时延/
clk最小数据间隔/clk 最大数据间隔/clk 传统法 4286520030 4286520030 4286520031 4286520031 加速法 733332624 733332624 733332625 733332625 注:clk—一个时钟周期。 表 2 加速法的资源利用情况
Table 2. Resource utilization results of acceleration scheme
资源利用数 BRAM_18K DSP48E FF LUT 表达式资源数 0 74 实例资源数 131 11472 27045 存储资源数 40 0 0 乘法器资源数 1747 寄存器资源数 203 总计 40 131 11675 28866 可用资源数 2060 2800 607200 303600 资源利用率/% 1 4 1 9 表 3 2种方案的时序情况对比
Table 3. Comparison of timing sequence between two schemes
方案 最小时延/
clk最大时延/
clk最小数据间隔/clk 最大数据间隔/clk ① 169502204 354001169 169502205 354001170 ② 57877695 256307850 57877696 256307851 表 4 添加优化前后2种方案的资源利用情况
Table 4. Comparison of resource utilization results before and after optimization between two schemes
资源利用数 BRAM_18K DSP48E FF LUT 实例资源数 512/288 94/88 14 512/21238 20691/61334 存储资源数 768/432 0 0 乘法器资源数 58/418 寄存器资源数 9/9 总计 1280/720 94/88 14521/21247 20749/61752 可用资源数 2060 2800 607200 303600 资源利用率/% 62/34 3/3 2/3 6/20 表 5 基于FPGA的RXD算法实现的时序估计结果
Table 5. Timing sequence estimation results for FPGA-based implementation of RXD algorithn
时钟周期/ns 最小时延/
clk最大时延/
clk最小数据间隔/clk 最大数据间隔/clk 9.78 1552545313 1779318286 1552545314 1779318287 表 6 基于FPGA的RXD算法实现的资源利用情况
Table 6. Resource utilization results for FPGA-based implementation of RXD algorithn
资源利用数 BRAM_18K DSP48E FF LUT 表达式资源数 1 0 5390 实例资源数 40 244 66088 92578 存储资源数 978 0 0 乘法器资源数 10556 寄存器资源数 4109 32 总计 1018 246 70197 108556 可用资源数 2060 2800 607200 303600 资源利用率/% 49 8 11 35 表 7 CPU和FPGA平台实现RXD算法的处理时间对比
Table 7. Comparison of processing time measured for RXD algorithm between CPU and FPGA implementations
CPU
处理时间/sFPGA 加速比 时钟周期/
ns最小时延/
clk处理时间/s 111.29 9.78 1552545313 15.81 7.04 -
[1] QU J H, LEI J, LI Y S, et al.Structure tensor-based algorithm for hyperspectral and panchromatic images fusion[J]. Remote Sensing, 2018, 10(3):373-391. doi: 10.3390/rs10030373 [2] LI Y S, HU J, ZHAO X, et al.Hyperspectral image super-resolution using deep convolutional neural network[J].Neurocomputing, 2017, 266:29-41. doi: 10.1016/j.neucom.2017.05.024 [3] 赵兵.基于FPGA的高光谱图像RX异常检测研究[D].杭州: 杭州电子科技大学, 2012: 1-2.ZHAO B.Research on RX anomaly detection of hyperspectral image based on FPGA[D].Hangzhou: Hangzhou Dianzi University, 2012: 1-2(in Chinese). [4] BIOUCAS-DIAS J M, PLAZA A, CAMPS-VALLS G, et al.Hyperspectral remote sensing data analysis and future challenges[J].IEEE Geoscience & Remote Sensing Magazine, 2013, 1(2):6-36. [5] 贺霖, 潘泉, 邸韡, 等.高光谱图像目标检测研究进展[J].电子学报, 2009, 37(9):2016-2024. doi: 10.3321/j.issn:0372-2112.2009.09.024HE L, PAN Q, DI W, et al.Research advance on target detection for hyperspectral imagery[J].Acta Electronica Sinica, 2009, 37(9):2016-2024(in Chinese). doi: 10.3321/j.issn:0372-2112.2009.09.024 [6] LIU W H, FENG X P, WANG S, et al.Random selection-based adaptive saliency-weighted RXD anomaly detection for hyperspectral imagery[J].International Journal of Remote Sensing, 2018, 39(8):2139-2158. doi: 10.1080/01431161.2017.1420931 [7] REED I S, YU X L.Adaptive multiple-band CFAR detection of an optical pattern with unknown spectral distribution[J].IEEE Transactions on Acoustics Speech & Signal Processing, 1990, 38(10):1760-1770. [8] LIU W M, CHANG C I.A nested spatial window-based approach to target detection for hyperspectral imagery[C]//Proceedings of IEEE International Geoscience and Remote Sensing Symposium, 2004.Piscataway NJ: IEEE Press, 2004: 266-268. [9] KWON H, NASRABADI N M.Kernel adaptive subspace detector for hyperspectral imagery[J].IEEE Geoscience & Remote Sensing Letters, 2006, 3(2):271-275. [10] 何光林, 彭林科.基于FPGA的高光谱图像奇异值分解降维技术[J].中国激光, 2009, 36(11):2983-2988.HE G L, PENG L K.FPGA implement of SVD for dimensionality reduction in hyperspectral images[J].Chinese Journal of Lasers, 2009, 36(11):2983-2988(in Chinese). [11] 于涛, 胡炳樑, 高晓惠, 等.高光谱图像运动误差实时校正处理平台设计与实现[J].光谱学与光谱分析, 2012, 32(8):2275-2279. doi: 10.3964/j.issn.1000-0593(2012)08-2275-05YU T, HU B L, GAO X H, et al.Design and implementation of real-time processing platform for movement error correction of hyperspectrual imaging[J].Spectroscopy and Spectral Analysis, 2012, 32(8):2275-2279(in Chinese). doi: 10.3964/j.issn.1000-0593(2012)08-2275-05 [12] WANG J, CHANG C, CAO M.FPGA design for constrained energy minimization[C]//Proceedings of SPIE-The International Society for Optical Engineering. Bellingham: SPIE, 2004, 5268: 262-273. [13] 赵宝玮, 相里斌, 吕群波, 等.FPGA和多DSP系统的并行RX探测算法[J].西安电子科技大学学报(自然科学版), 2014, 41(3):152-156. doi: 10.3969/j.issn.1001-2400.2014.03.022ZHAO B W, XIANG L B, LÜ Q B, et al.Parallel RX algorithm implementation based on the FPGA and multi-DSP system[J].Journal of Xidian University, 2014, 41(3):152-156(in Chinese). doi: 10.3969/j.issn.1001-2400.2014.03.022 [14] YANG B, YANG M, PLAZA A, et al.Dual-mode FPGA implementation of target and anomaly detection algorithms for real-time hyperspectral imaging[J].IEEE Journal of Selected Topics in Applied Earth Observations & Remote Sensing, 2015, 8(6):2950-2961. [15] 成宝芝.基于光谱特性的高光谱图像异常目标检测算法研究[D].哈尔滨: 哈尔滨工程大学, 2012: 45-48.CHENG B Z.Research on spectral feature based anomaly target detection algorithms in hyperspectral imagery[D].Harbin: Harbin Engineering University, 2012: 45-48(in Chinese). [16] 欧阳征平.高光谱遥感图像局部异常检测算法研究[D].长沙: 国防科学技术大学, 2011: 14-16.OUYANG Z P.Study on algorithms of local anomaly detection for hyperspectral remote sensing imagery[D].Changsha: National University of Defense Technology, 2011: 14-16(in Chinese). [17] CHANG C I.Hyperspectral imaging:Techniques for spectral detection and classification[M]. New York:Kluwer Academic/Plenum Publishers, 2003:89-103. [18] YANG B, YANG M, GAO L, et al.A dual mode FPGA implementation of real-time target detection for hyperspectral imagery[C]//International Workshop on Earth Observation and Remote Sensing Applications. Piscataway, NJ: IEEE Press, 2014: 340-344. [19] LEI J, LI Y S, ZHAO D S, et al.A deep pipelined implementation of hyperspectral target detection algorithm on FPGA using HLS[J].Remote Sensing, 2018, 10(4):516. doi: 10.3390/rs10040516 [20] ZHAO C H, YOU W, WANG Y L, et al.GPU implementation for real-time hyperspectral anomaly detection[C]//IEEE International Conference on Digital Signal Processing. Piscataway, NJ: IEEE Press, 2015: 940-943. [21] 倪涛, 丁海锋, 阮黎婷, 等.基于QR分解算法的任意阶复矩阵求逆的DSP实现[J].电子科技, 2010, 23(4):99-101.NI T, DING H F, RUAN L T, et al.Implementation of arbitrary order complex matrix inversion based on the QR decomposition algorithm in DSP[J]. Electronic Science and Technology, 2010, 23(4):99-101(in Chinese). [22] PAPAKONSTANTINOU A.High-level automation of custom hardware design for high-performance computing[D].Champaign: University of Illinois at Urbana-Champaign, 2012: 5-8. [23] 何宾.Xilinx FPGA设计权威指南[M].北京:清华大学出版社, 2012:183-202.HE B.Xilinx FPGA:Design and application[M].Beijing:Tsinghua University Press, 2012:183-202(in Chinese). [24] WANG Y, LI P, ZHANG P, et al.Memory partitioning for multidimensional arrays in high-level synthesis[C]//Design Automation Conference. Piscataway, NJ: IEEE Press, 2013: 1-8. [25] 赵春晖, 王立国, 齐滨.高光谱遥感图像处理方法及应用[M].北京:电子工业出版社, 2016:300-302.ZHAO C H, WANG L G, QI B.Hyperspectral remote sensing images processing methods and applications[M].Beijing:Publishing House of Electronics Industry, 2016:300-302(in Chinese).