element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Eye On Intelligence Challenge
  • Challenges & Projects
  • Design Challenges
  • Eye On Intelligence Challenge
  • More
  • Cancel
Eye On Intelligence Challenge
Blog Final Blog: CNN HW Accelerator for Handwriting Recognition
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Eye On Intelligence Challenge to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: yesha98
  • Date Created: 19 Nov 2024 5:09 AM Date Created
  • Views 978 views
  • Likes 8 likes
  • Comments 2 comments
Related
Recommended

Final Blog: CNN HW Accelerator for Handwriting Recognition

yesha98
yesha98
19 Nov 2024

Previous Blogs:

 Blog #1: CNN HW Accelerator for Handwriting Recognition - HDMI and USB Camera Bring-Up 

 Blog #2: CNN HW Accelerator for Handwriting Recognition - Introduction to CNN for Handwritten Digit Recognition 

 Blog #3: CNN HW Accelerator for Handwriting Recognition - Defining the Neuron for Handwritten Digit Recognition 

 Blog #4: CNN HW Accelerator for Handwriting Recognition - Neural Network Architecture for Handwritten Digit Recognition 

 Blog #5: CNN HW Accelerator for Handwriting Recognition - Integrating the HW Accelerator as a PYNQ Overlay      

image

Handwritten Digit Recognition System Setup

This project showcases an innovative and efficient handwritten digit recognition system built for the Element14 Eye on Intelligence Challenge. The system is based on the Digilent Arty Z7, which integrates the AMD Zynq-7000 SoC to combine software programmability with hardware acceleration seamlessly.

System Overview

  1. Hardware Platform: Arty Z7

    • The Arty Z7 board leverages the powerful Zynq-7000 SoC, which includes:
      • PS (Processing System): ARM Cortex-A9 running PYNQ Image.
      • PL (Programmable Logic): Custom-built CNN  hardware accelerator.
    • An SD card is used to boot the system, providing flexibility in deploying the setup.

  2. Custom CNN Hardware Accelerator

    • A Convolutional Neural Network (CNN) was implemented in the FPGA fabric (PL) to efficiently process images of handwritten digits. The hardware accelerator is optimized for MNIST digit recognition, ensuring low-latency and high-accuracy classification.

  3. System Workflow

    • USB Camera Input: The system captures real-time handwritten digits via a USB camera.
    • Preprocessing: The input image is resized and normalized before being fed into the CNN accelerator.
    • CNN Execution: The hardware accelerator performs feature extraction and classification directly in the FPGA, offloading the computational load from the ARM processor.
    • Result Display: The output is sent back to the ARM processor, where it can be viewed on a Jupyter Notebook interface hosted on the Linux-based PYNQ platform.

  4. User Interaction

    • Jupyter Interface: Users can interact with the system through a web browser, using Jupyter Notebooks for visualization and control.
    • Python and PYNQ Framework: The use of PYNQ simplifies hardware-software integration, enabling seamless communication between the PS and PL.

  5. Network Connectivity

    • The system supports Ethernet for connecting the Arty Z7 to a host PC, allowing real-time monitoring and control.

Key Advantages of the System

  • High Efficiency: The hardware accelerator processes MNIST digit recognition tasks with significantly reduced latency compared to software-only implementations.
  • Portability: The compact design of the Arty Z7 makes this solution highly portable, and suitable for both educational and industrial applications.
  • Ease of Use: The integration of Jupyter Notebooks provides a user-friendly interface for developers and non-technical users alike.

HW Setup

image

Flow to capture the image and feed it into the CNN HW Accelerator

image

Converting the image into feedable form for the CNN HW Accelerator

image

Final Result

image

Pre-processing improves the accuracy of detection

image

image

Innovation for the Challenge

While many participants rely on pre-existing hardware accelerators and the Xilinx Deep Processing Unit (DPU), this project takes a different approach by building a custom CNN hardware accelerator from scratch. This deliberate design choice provides a transparent view into how the internals of machine learning (ML) accelerators function, giving developers and learners deeper insight into the underlying principles of AI hardware.

By creating the accelerator from the ground up, this project showcases:

  • Core Building Blocks of ML Hardware: From convolution and activation functions to pooling and fully connected layers, each component of the CNN is meticulously implemented in the FPGA fabric. This approach not only enhances efficiency but also demystifies the operations that drive neural networks in hardware.
  • Fine-Grained Optimization: Unlike generic accelerators, this custom implementation is tailored specifically for the MNIST dataset, leveraging optimizations such as reduced fixed-point data representation and efficient memory utilization to minimize hardware resource usage while maintaining accuracy.
  • Educational Value: By exposing the internal workings of the CNN accelerator, this project serves as an excellent learning tool for understanding the trade-offs and design considerations involved in hardware-based AI systems.

This custom approach demonstrates a mastery of hardware design principles and highlights the effort to go beyond black-box solutions. It not only meets the challenge requirements but also inspires others by illustrating how ML accelerators work at a fundamental level. This sets the project apart as a standout contribution to the Element14 Eye on Intelligence Challenge, showcasing innovation, skill, and a commitment to advancing knowledge in the field of AI and embedded systems.

I thank the Element14 community for giving me this opportunity!

  • Sign in to reply
  • yesha98
    yesha98 10 months ago in reply to DAB

    Thanks DAB!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB 10 months ago

    Nice finish on your project.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube