Machine Learning on FPGAs: Circuit Architecture and FPGA Implementation

Sdílet
Vložit
  • čas přidán 2. 08. 2024
  • Lecture 3 of the project to implement a small neural network on an FPGA. We derive the architecture of the FPGA circuit from the structure of the neural network. Then we implement it in VHDL and perform hardware verification on a remote lab.
    Please note: At minute 5:00 it should be "binary places" not "decimal places".
    Project Homepage: www.h-brs.de/fpga-vision-lab
    Source Code available at: github.com/Marco-Winzker/NN_R...

Komentáře • 54

  • @ahmedal-musharraf9242
    @ahmedal-musharraf9242 Před 3 lety +5

    This channel is a gold nugget! ,,, keep up the amazing work,, thank you 😊

  • @travhenry3451
    @travhenry3451 Před 3 lety +4

    This is amazing and very helpful. Concepts are explained very well, keep up the great work!

  • @jasonmurphy3731
    @jasonmurphy3731 Před 3 lety +1

    Just awesome ! Thanks for publishing this.

  • @squeakytoyrecords1702
    @squeakytoyrecords1702 Před 2 měsíci +1

    You hit this one out of the park!! Well done, Thank you.

  • @olypphia
    @olypphia Před 2 lety +1

    This video inspired me that it is really possible to implement AI scenarios to hardware, via FPGA. Keep the good work Sir, and thank you for sharing this valuable knowledge.

  • @arunuday6109
    @arunuday6109 Před rokem

    Awesome ! Thanks for publishing this.

  • @m_fadhln
    @m_fadhln Před 3 lety +15

    OMG I just started learning ML and DL implementation on FPGAs and I found your channel. Greetings from Indonesia 🎉

  • @teitoklien
    @teitoklien Před 3 lety +2

    Awesome vid !
    Thanks !

  • @KristianDjukic
    @KristianDjukic Před 5 měsíci +1

    very interesting and thanks for publishing this stuff

  • @bouslahbrahim4168
    @bouslahbrahim4168 Před rokem +1

    Excellent Mr thanks a lot

  • @mbuaesenju8514
    @mbuaesenju8514 Před rokem +1

    thank you. Perfect!

  • @agustinsilva447
    @agustinsilva447 Před 3 lety +2

    Loving this playlist I just started working in fpga-based reinforcement learning implementations and I started looking at in youtube, this is a very good introduction, are you going to talk about RL implementations ? That woul be amazing!

  • @theoryandapplication7197
    @theoryandapplication7197 Před 3 měsíci +1

    thank you sir the video that i am looking for

  • @mehmetburakaykenar
    @mehmetburakaykenar Před 2 lety +2

    Thanks for these great tutoria videos Prof Winzker. I want to ask a question, I am new to NN world and now focused on research of NN HW acceleration structures on FPGA and ASIC. I read that the NN structures you utilized in this example is called as Multilayer Perceptron (MLP). However, I see tons of accelerators for Convolutional Neural Network (CNN) structions. Also CNN is mentioned a lot on image classification. You also work on image processing and NN application on images. Can you give some info about when to use MLP and CNN, or can you refer me a paper about which NN structures are being utilized mostly on ML applications ? Thanks a lot for everything again

    • @marcowinzker3682
      @marcowinzker3682  Před 2 lety +1

      This example uses a single hidden layer to show the principle of an NN. The task is designed that it fits this architecture.
      A CNN is helpful, when you want to identify complex objects with a combination of several features. So you identify four legs, pointy ears, whiskers in the front layers. Then following layer of the CNN concludes that the image shows a cat.
      A hardware accelerator uses the structure that I presented but normally has a complex scheduling. So there is a CPU that gives small pieces of the task to the accelerator hardware. The CPU collects results, and again sends new tasks to the hardware.
      I don't really have a paper that I can point to. Sorrry.

    • @mehmetburakaykenar
      @mehmetburakaykenar Před 2 lety +1

      @@marcowinzker3682 Thanks a lot. I will look for papers and if found a good one write it to here

  • @samyakjain327
    @samyakjain327 Před 3 lety +1

    Great Work. I have question like if I want to perform this on real hardware then how can we check the output aka new modified image by an algorithm?

    • @marcowinzker3682
      @marcowinzker3682  Před 3 lety

      The best approach for verification is simulation! And then you compare the output with another model, for example the Octave result. There is an example for this approach for the FIR filter in the video "FPGA FIR Filter: Verification with VHDL Testbench" and "FPGA FIR Filter: Self-Checking Testbench".
      If you want to check the output on real hardware, you would check the result on a monitor. You can also take the result with a frame grabber and analyze it.
      Our remote lab does this. You can click on the output image and store it on your computer. (However, the image is compressed with JPEG to save bandwidth, so the result is not bit-true.)

    • @samyakjain327
      @samyakjain327 Před 3 lety

      @@marcowinzker3682 Right, but how your simulator get the output image from FPGA. I am trying to make something the same physical.

    • @marcowinzker3682
      @marcowinzker3682  Před 3 lety

      @@samyakjain327 If you want something physical, you need an FPGA board with video input and video output port. Such a sytem is described in the video "Image Processing with Terasic FPGA-Boards"

    • @samyakjain327
      @samyakjain327 Před 3 lety

      Okay, Thank you so much for support

  • @tonydo29
    @tonydo29 Před 3 lety +1

    Dear professor!
    Your lecture very very impressive to me. I'm following your tutorial until the step of load Name filter of Cyclone IV, could you please tell to me which "name filter" did you use in your lab? Warmly thank professor so much~

    • @marcowinzker3682
      @marcowinzker3682  Před 3 lety

      The Cyclone IV is a EP4CE22E22C7. You find this information in the constraints file QSF.
      And it is also in the FAQ: www.h-brs.de/de/emt/frequently-asked-questions-fpga-vision-remote-lab

    • @tonydo29
      @tonydo29 Před 3 lety

      @@marcowinzker3682 Thanks professor for your reply in detail.
      However, I'm facing with a problem when execute bit file in your sever, I receive the output was "no singal". Could you please help me to check your server? thank professor so much~

    • @marcowinzker3682
      @marcowinzker3682  Před 3 lety +1

      @@tonydo29 Please check the FAQ, there is a "no signal" item.
      In 95% of the cases this error is caused by missing pin assignments.

    • @tonydo29
      @tonydo29 Před 3 lety

      @@marcowinzker3682 Warmly thank professor for your information. I'll take a look and check it now~

  • @ANONYMOUS-kv6wu
    @ANONYMOUS-kv6wu Před 3 lety +1

    Thank you for such great content sir!!!.I would like to try this project as part of an academic work. Could you please provide the testbench vhdl code for this for simulation? I am just a beginner. It would be of great help.

    • @marcowinzker3682
      @marcowinzker3682  Před 3 lety

      A complete testbench is available for the FIR filter experiment. If you are a beginner, I recommend that lecture. Then you can adapt that testbench to this design.
      czcams.com/video/o3hk7xAY5-s/video.html
      czcams.com/video/wTIHEX7WWvg/video.html

    • @ANONYMOUS-kv6wu
      @ANONYMOUS-kv6wu Před 3 lety

      @@marcowinzker3682 Thank you sir... i will try

    • @EceEnthusiast
      @EceEnthusiast Před 2 měsíci

      Where you able to write testbench code for this simulation? it would be really helpful for me as I am also a beginner and want to try this as an engineering project but I don't have enough time to try on my own.

  • @aratishah3691
    @aratishah3691 Před 3 lety

    Thank you for video. Can you show how to implement spiking neural network in FPGA board?

    • @marcowinzker3682
      @marcowinzker3682  Před 3 lety +1

      Good idea. I am supported by student thesis and will take this topic on my list.

    • @aratishah3691
      @aratishah3691 Před 3 lety

      @@marcowinzker3682 Thank you, Professor. Hope to see new videos on SNN soon.

  • @mallikarjunumadi2794
    @mallikarjunumadi2794 Před 3 lety

    I couldn't get the input image and image_label in previous video..can you please provide details?

    • @marcowinzker3682
      @marcowinzker3682  Před 3 lety

      You can download the video from our homepage www.h-brs.de/de/fpga-vision-lab with the name "Video with road signs on motorway (CC BY)". Our you can make a screenshot from the remote-lab. Then you have to generate the image label file. Octave script are intended (and have been tested) with image size 720p, i.e. 1280x720 pixel.
      We do not provide the images. You have to generate them on your own.

  • @muhammedfayas5907
    @muhammedfayas5907 Před 2 měsíci

    SIr, Do you know how to access the biult in FPGA block RAM and store the text file?

    • @marcowinzker3682
      @marcowinzker3682  Před 2 měsíci

      Please have a look at the video "Machine Learning on FPGAs: Sigmoid Function and Exercises".
      The sigmoid function is implemented with a built-in block RAM.
      czcams.com/video/dygzrBiDFnk/video.html

  • @LSyedAkram
    @LSyedAkram Před 2 lety

    Why do we need a control block for sync signals

    • @marcowinzker3682
      @marcowinzker3682  Před 2 lety

      The video signal consists of two parts:
      1) image information: red, green, blue
      2) sync signals to indicate when a new frame or a new line begins
      The control block copies the sync signals from input to output. Because the image information needs some clock cycles for processing, the sync signals needs the same delay. So, the control block copies the sync signals with some clock cycles delay.

    • @LSyedAkram
      @LSyedAkram Před 2 lety

      @@marcowinzker3682 Thanks!!!!

  • @yoginiprabhu8048
    @yoginiprabhu8048 Před 3 lety

    How was the user interface prepared?

    • @marcowinzker3682
      @marcowinzker3682  Před 3 lety +1

      The remote lab uses WebLab-Deusto as the management software.

  • @SW-ud1wt
    @SW-ud1wt Před 2 lety

    Nice lecture. Sir i want to implement alexnet cnn arch on FPGA, is it do able or not? Please guide

    • @marcowinzker3682
      @marcowinzker3682  Před 2 lety

      Basically yes, but this is a large project. You need a large FPGA and scheduling of the layers with subsampling. Use of a framework (like czcams.com/video/FFUyRQukGvM/video.html) is recommend.
      A good approach is an architecture with a CPU for scheduling of tasks and FPGA fabris as an accelerator.

    • @SW-ud1wt
      @SW-ud1wt Před 2 lety

      @@marcowinzker3682 can i have your email so that i can email you proposed design. I'm planning to do in parallel as soon as each byte enters into system.

    • @SW-ud1wt
      @SW-ud1wt Před 2 lety

      @@marcowinzker3682 thanks for your response 👍

    • @marcowinzker3682
      @marcowinzker3682  Před 2 lety

      @@SW-ud1wt I am sorry, I can not give individual support.

    • @SW-ud1wt
      @SW-ud1wt Před 2 lety

      @@marcowinzker3682 ok

  • @user-yu3is8kx4e
    @user-yu3is8kx4e Před 3 lety

    Could you disclose the vhdl codes ?

  • @Ali-wf9ef
    @Ali-wf9ef Před 3 lety

    Your code didn't look very pipelined

    • @marcowinzker3682
      @marcowinzker3682  Před 3 lety +2

      Are you joking? At minute 4:45 you see the pipeline stages. There is a lot of pipelining!
      In the code you see it at minute 8:05 inisde the neuron. You get a pipeline stage when you have a signal assignment '