Research Article

A hardware-implemented neural network for the analysis of handwritten numerals

Zhuotong Li*
University of California

* Corresponding author: [email protected]

Abstract

This study presents a specialized hardware-accelerated neural network tailored for the recognition of handwritten digits in 28x28 pixel grayscale images. Employing the perceptron model, our single-layer neural network is composed of 10 neurons, each handling inputs from all pixels to generate an output. The digit recognition is determined by the neuron with the highest output value. Implemented in synthesizable Verilog, the design complies with a constraint of 350 multipliers. To achieve this, this paper employs a combination of parallel processing and pipelining, breaking down the 785 multiplications needed for each digit into 8 stages, simultaneously processing 98 data points per clock cycle. In testbench evaluations, the final design exhibits impressive performance, successfully recognizing the majority of the provided images, and attaining a remarkable 99% accuracy rate, all with a minimal delay of just 115 clocks. This accomplishment is achieved using only 99 multipliers and 107 adders, showcasing the efficiency and effectiveness of our hardware-accelerated neural network for handwritten digit recognition.

Keywords: Neural Network; Hardware Acceleration; Handwritten Digits; Machine Learning; Perceptron
Published: May 20, 2024
DOI: 10.54254/2755-2721/62/20240406
Volume: ACE Vol.62
pp. 145-151
Download PDF

References

  1. Viet Huynh T. FPGA-based acceleration for convolutional neural networks on PYNQ-Z2. International Journal Of Computing and Digital System, 2021.
  2. Si J, Harris S L, Yfantis E. Neural networks on an FPGA and hardware-friendly activation functions. Journal of Computer and Communications, 2020, 8(12): 251.
  3. Huynh T V. Evaluation of artificial neural network architectures for pattern recognition on fpga. International Journal of Computing and Digital Systems, 2017, 6(03): 133-138.
  4. Du Y, Du L, Gu X, et al. An analog neural network computing engine using CMOS-compatible charge-trap-transistor (CTT). IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 2018, 38(10): 1811-1819.
  5. Ali S, Shaukat Z, Azeem M, et al. An efficient and improved scheme for handwritten digit recognition based on convolutional neural network. SN Applied Sciences, 2019, 1: 1-9.
  6. Kulkarni S R, Alexiades J M, Rajendran B. Learning and real-time classification of hand-written digits with spiking neural networks. 2017 24th IEEE International Conference on Electronics, Circuits and Systems (ICECS). IEEE, 2017: 128-131.
  7. Liu Y, Sun Y, Xue B, et al. A survey on evolutionary neural architecture search. IEEE transactions on neural networks and learning systems, 2021.
  8. Faghihi F, Alashwal H, Moustafa A A. A synaptic pruning-based spiking neural network for hand-written digits classification. Frontiers in Artificial Intelligence, 2022, 5: 680165.
  9. Faghihi F, Alashwal H, Moustafa A A. Explainable Feature Extraction Using a Neural Network with non-Synaptic Memory for Hand-Written Digit Classification. bioRxiv, 2021: 2021.04. 06.438597.
  10. Abdar M, Yen N Y, Hung J C S. Improving the diagnosis of liver disease using multilayer perceptron neural network and boosted decision trees. Journal of Medical and Biological Engineering, 2018, 38: 953-965.