Convolutional neural network(CNN)based arrhythmia diagnosis algorithm can realize real-time monitoring and potential risk warning in mobile terminals,but the scale of CNN limits the deployment in resources-constrained devices.Quantization is a commonly used method of lightweight CNN,which compresses the network with little expense of some algorithm performance loss.With the collaborative design of diagnosis algorithm and quantization algorithm,this study achieves a lightweight arrhythmia diagnosis CNN within a little performance loss.The main work of this thesis includes the following points: 1.A mapping method was established between CNN layer and weight bit width and proposes a layer-wise quantization algorithm base on greedy algorithm.And two quantization modes were proposed to meet actual requirement.2.A CNN based arrhythmia diagnosis algorithm was proposed for the ECG fragment to realize the end-to-end recognition.3.Through the collaborative design of algorithm and neural network accelerator,a CNN accelerator architecture was proposed for arrhythmia diagnosis algorithms.The arrhythmia diagnosis algorithm designed in this thesis achieves a classification accuracy of 95.72% in the MIT-BIH Arrhythmia dataset.After applying the layer-wise quantization,the CNN was compressed 6.83 times and 15.50 times under two quantization modes,and maintained 95.39% and 93.09% recognition accuracy respectively.The algorithm-oriented CNN accelerator achieves a recognition accuracy of 95.39% and compress rate of 4 in Xilinx Zynq-7035 FPGA board. |