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
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Ralph Yamamoto's Blog DPU-PYNQ on Ultra96v2
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: ralphjy
  • Date Created: 2 Sep 2020 1:24 AM Date Created
  • Views 1902 views
  • Likes 3 likes
  • Comments 1 comment
  • ultra96v2
  • dpu-pynq
Related
Recommended

DPU-PYNQ on Ultra96v2

ralphjy
ralphjy
2 Sep 2020

Back in May Xilinx released DPU-PYNQ which is an upgrade that incorporates DPU overlays and Vitis-AI into PYNQv2.5.

 

Currently the Ultra96(v1 and v2), ZCU104, and ZCU111 boards are supported and with a little work you should be able to upgrade other boards that are running PYNQv2.5.

 

I had hoped to demonstrate DPU-PYNQ using the UltraZed-EV but I ran into a problem with the upgrade process.  I had built the PYNQ image for the UltraZed-EV using the 2019.1 board agnostic image and it appears that the Xilinx runtime (XRT) is not included in that image.  PYNQ runs with an Ubuntu OS, so I'll need to find the correct process to install XRT.

 

In the meantime I decided to try the DPU-PYNQ upgrade on the Ultra96v2.

 

Here are links to the github repo and a Hackster project:

  • https://github.com/Xilinx/DPU-PYNQ
  • https://www.hackster.io/wadulisi/easy-ai-with-python-and-pynq-dd4822

 

 

PYNQ Framework

image

PYNQ is useful for prototyping because you can switch out hardware designs on the fly using overlays and now with the Vitis-AI interface you can control the DPU and switch inference models quickly.  And the Jupyter notebook interface allows programming in Python or C/C++.

 

 

Upgrade process

The process to upgrade PYNQv2.5 to install Vitis-AI is relatively straightforward.  If you use one of the supported boards the DPU overlay file (dpu.bit) has already been built.  For the UltraZed-EV I needed to build the overlay in Vivado - I'll decribe that when I get the UltraZed-EV working with DPU-PYNQ.

 

Here is the process I used for the Ultra96v2:

  1. Create new 16GB SD card using the Avnet Ultra96v2 PYNQv2.5 image http://bit.ly/2MMrXcS
  2. Boot and log into pynq web console (I use a USB3 to Ethernet dongle so I just use the URL: pynq:9090)
  3. Open a new terminal (from the web interface this will open as root)
  4. Clone the DPU-PYNQ github repo to the /home/xilinx directory:  git clone --recursive --shallow-submodules https://github.com/Xilinx/DPU-PYNQ.git
  5. Upgrade PYNQ with Vitis-AI:  cd DPU-PYNQ/upgrade; make  (this step takes about an hour to complete)
  6. Install pynq-dpu:  pip3 install pynq-dpu
  7. Copy the pynq-dpu notebooks into your home folder:  cd $PYNQ_JUPYTER_NOTEBOOKS; pynq get-notebooks pynq-dpu -p .

 

Here are the new files in the jupyter_notebooks directory:

 

A pynq-dpu directory for the new notebooks

image

 

There are 5 inference models included (notebooks and model files)

Inference ModelJupyter notebookModel file
Inception V1dpu_inception_v1.ipynbdpu_inception_v1_0.elf
MNIST Classifierdpu_mnist_classifier.ipynbdpu_mnist_classifier_0.elf
Resnet50dpu_resnet50.ipynbdpu_resnet50_0.elf
VART (Inception V1)dpu_vart_example.ipynbdpu_tf_inceptionv1_0.elf
YOLO V3dpu_yolo_v3.ipynbdpu_tf_yolov3.elf

 

image

 

YOLO V3

I decided that I would give the YOLO V3 example a try.  Since I'm partial to Beagles I used a Beagle image as my sample picture.

image

image

Run the application - classifies a dog with 100% confidence.

image

 

And of course this exercise wouldn't be complete without a frame capture from the webcam.

image

 

At least it knows I am a person image!

 

I'll post again when I've tried running other models and trying some video.  Hopefully, I'll also get this running on the UltraZed-EV.

  • Sign in to reply
Parents
  • AYri
    AYri 1 month ago

    image                                                                                                                                                                                           I'm currently working on a project that involves implementing an AI model on the DPU of the Ultra96v2. I'm using pyxir_dpu after quantizing the model and generating the .xmodel file with Vitis AI 2.5. However, I'm encountering an issue I can't solve: no matter how many times I re-quantize the model, I have the same problem, and attempting to reshape the input format crashes the kernel. Do you have any suggestions???

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • AYri
    AYri 1 month ago

    image                                                                                                                                                                                           I'm currently working on a project that involves implementing an AI model on the DPU of the Ultra96v2. I'm using pyxir_dpu after quantizing the model and generating the .xmodel file with Vitis AI 2.5. However, I'm encountering an issue I can't solve: no matter how many times I re-quantize the model, I have the same problem, and attempting to reshape the input format crashes the kernel. Do you have any suggestions???

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
No Data
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