My project will involve routing a video stream through a neural network element and deriving detection, control and display outputs from the Ultra96v2, so I've been looking for examples that will help me learn how to accomplish this. Unfortunately there are a lot of examples for the ZCU102 and the Ultra96v1 but it seems only a few specifically for the Ultra96v2. I found a project on Hackster: https://www.hackster.io/gaihrekrishna/dpu-trd-for-ultra96-22e426 which used the Ultra96v1. It led me to the Xilinx Edge-AI-Platform-Tutorials on github: https://github.com/Xilinx/Edge-AI-Platform-Tutorials/tree/master/docs/DPU-Integration . This seemed like a very useful example as it uses the Deep Learning Processor (DPU) to do image processing. The Face Detection program specifically takes a webcam input and places a bounding box around any detected faces and outputs the result through the displayport. I decided to try to port (convert) this example for the Ultra96v2.
Creating the new hardware platform was straightforward using Vivado. The example provides the DPU IP and a tcl script to interconnect the design. Just needed to update the script to use 2018.3 and the ultra96v2 and modify UART and memory configurations for the v2.
Similarly the petalinux build just required making the changes required for 2018.3 (the original design was done with 2018.2). The changes are described in the tutorial.
The real problem that I had was trying to regenerate the application software using the SDK. The process is again straightforward but I was having problems with the compiler not finding either include files or library files. As shown below, it can't find the assert.h file even though it was definitely in the proper location (compile stops on the first fatal error).
This problem had me stymied for a while thinking that I had the incorrect path specified for the files. It finally occurred to me that I might be having a problem because the path was very deep (long path name). This was a long shot but I tried relocating the directories and it fixed the problem I was having for the resnet50 program.
When this example installs it is using the following file tree (dpu_integration_lab is my project directory). I had this tree installed under /home/training/petalinux/2018_3/PIIPprojects. I ended up moving the project directory into my home directory.
dpu_integration_lab
└── petalinux
└── images
└── linux
└── sdk
└── sysroots
└── aarch64-xilinx-linux
└── usr
├── bin
├── games
├── include
├── lib
├── libexec
├── local
├── sbin
├── share
└── src
It doesn't seem like the length of the path should be an issue. I don't know if this is a side effect of running in a VM on Windows? Anyway I was able to build a new resnet50.elf.
Building the face_detection program was a much larger problem in that there were many files missing from the SDK, all of them associated with 32 bit structures. E.G. there was a endian-64.h but no endian-32.h in /usr/include/bits. Have not figured this out yet. Maybe there is a version mismatch between the SDK files and the source files. Fortunately there was a face_detection.elf that was provided and I was able to run that using the new hardware files that I had generated.
Here is a demo of the face_detection running the output through the displayport onto my HDMI monitor. Apologies that I couldn't find a better subject, but I got this running late last night.
I'll need to figure out the issues with the SDK files so that I can start to create my own custom applications but it feels like things are coming together. My biggest fear is that the tool and IP version mismatches may be hard to fix. We'll see......
Top Comments