Bnn
Training and Implementation of a CNN for image classification with binary weights and activations on FPGA with HLS tools
Install / Use
/learn @ralbertazzi/BnnREADME
Training and Implementation of a CNN for image classification with binary weights and activations on FPGA with HLS tools
This is the repository for the project work of Reconfigurable Embedded Systems at the University of Bologna - Professor Stefano Mattoccia
In this work I first learnt about binary networks with binary weights and activations; I then trained a network on the MNIST dataset, achieving 96% accuracy with a small network (460k weights).
However, the core of the project is the implementation of a Binary Network on a FPGA device (Zynq) using High-Level Synthesis Tools (Vivado HLS). I implemented the core modules (convolution, dense, max pooling, padding), optimizing resources, evaluating results and discussing trade-offs between timing and resources. The whole implementation is pipelined and can achieve a throughput of thousands of images/sec by using less than half the resources available on the FPGA.
You can find additional informations inside the provided slides.
References
- Reference paper for Binary Networks: Binarized Neural Networks: Training Deep Neural Networks with Weights and Activations Constrained to +1 or -1
- Keras implementation of Binary Net: I have adapted my training code from this project
- Papers about implementations of BNNs on FPGA:
Author
Riccardo Albertazzi - University of Bologna - May 2018
Related Skills
node-connect
343.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
90.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
