GithubHelp home page GithubHelp logo

debughacker / lenet5_hls Goto Github PK

View Code? Open in Web Editor NEW

This project forked from changwoolee/lenet5_hls

0.0 1.0 0.0 108.36 MB

FPGA Accelerator for CNN using Vivado HLS

C 29.56% C++ 46.05% C# 24.39%

lenet5_hls's Introduction

LeNet-5 in HLS

This repository is about my graduate report, implementing LeNet-5 in Vivado High Level Synthesis 2016.4 & Vivado SDSoC 2016.4

lenet5

Win 10 Test App

You can test the accelerator by your own handwritten digits image.

Youtube Video

Youtube Video Here

If you want to test the app, follow these instruction

  1. Configure the IP address of Zedboard.
	username@Zedboard:~# ifconfig
  1. Start .elf file with port name argument (in here, 5555 is port name)
	username@Zedboard:~# lenet5_test.elf 5555
  1. Start the win 10 test application and input the IP address & port name.
  2. Press connect
  3. Open image file

I did not put a zoom in/out function to the app, so please suit the image size.

Model description

Used model is LeNet5-Like Deep CNN
Input : -1.0 to 1.0
Conv1 : 1x32x32 -> 6x28x28, ksize = 1x6x5x5, stride = 1
Pool1 : 6x28x28 -> 6x14x14, average pooling, window size = 2x2, stride = 2
Conv2 : 6x14x14 -> 16x10x10, ksize = 6x16x25, stride = 1
Pool2 : 16x10x10 -> 16x5x5, average pooling, window size = 2x2, stride = 2
Conv3 : 16x5x5 -> 120x1x1, ksize = 16x120x25, stride = 1
FC1 : 120x84
FC2 : 84x10

Environments

I used Zedboard(Zynq 7z020) for testing.

HW Functions : CONVOLUTION_ LAYER_ 1, CONVOLUTION_ LAYER_ 2, and CONVOLUTION_ LAYER_ 3, Clk freq set as 100MHz.

Accuracy

SW accuracy : 98.63% (single precision fp)    
HW accuracy : 98.63% (single precision fp)  

Runtime

# of images : 10,000, batch size : 1  

SW runtime  : 59.4456 seconds  
HW runtime  : 16.3954 seconds  

speedup : x3.63 faster 

lenet5_hls's People

Contributors

changwoolee avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.