Mario Bergeron recently did a tutorial project on Hackster.io vitis-ai-1-1-flow-for-avnet-vitis-platforms that "provides detailed instructions for targeting the DNNDK samples from the Xilinx Vitis-AI 1.1 flow for Avnet Vitis 2019.2 platforms." The UltraZed-EV is one of the supported platforms. I need an AI component for my roadtest project so this was a very timely tutorial. I decided that since he provided pre-built images that I would do a quick run through of the examples on my board. I'll demo the examples that I think have the most relevance to my roadtest project.
Installation of Vitis-AI embedded package
Installation was straightforward. The sdcard folder is mounted on /run/media/mmcblk1p1.
- cd /run/media/mmcblk1p1
- cp dpu.xclbin /usr/lib/.
- cd runtime/vitis-ai_v1.1_dnndk
- source ./install.sh
The installation fails to install python support but apparently that was expected. It's not required for the tutorial but that means the python examples will not work.
The installation process logs you out so a re-login is required.
Use the dexplorer utility to verify the installation:
List of examples:
The other non-python examples are various different classifiers (inception_v1, mobilenet, resnet50). There are two examples for each classifier. The first displays the image it is classifying and outputs the result on the serial console. This runs very quickly over 500 images so you really can't visually correlate the result but it gives you a feel for the DPU execution time. The second example runs over 1000 images without displaying and records the overall execution time for classification which gives you an effective average frame rate.
Here are the results for mobilenet:
First example - dpu execution time is around 4.5ms per image
Second example - overall execution time for 1000 images is about 5.4s for an average frame rate of around 183fps.
The DPU performance is quite impressive. The Video Analysis example is the type of AI processing that I want for my project - to detect and classify objects in a video stream. Now I need to look at Vitis DNNDK development flow and think about how to integrate this on multiple streams with VCU.
This was a nice respite from working on PetaLinux build problems .
Links to previous posts for this roadtest: