"Original link: https: //www.hackster.io/AlbertaBeef/vitis-ai-1-3-flow-for-avnet-vitis-platforms-cd0c51
This article describes how to download and install the SD card image building, and how to perform AI applications on hardware, provide a detailed description of the Xilinx Vitis-AI 1.3 positions the stream to the Avnet Vitis 2020.2 platforms:
Ultra96-V2 Development Board
UltraZed-EV SOM (7EV) + FMC carrier card
UltraZed-EG SOM (3EG) + IO card operators
(Ultra96-V2 Development Board)
(UltraZed-EV SOM (7EV) + FMC carrier card)
(UltraZed-EG SOM (3EG) + IO operator card)
Hardware components:
Ultra96-V2
Camera
DisplayPort Monitor
UltraZed-EV Starter Kit
UltraZed-EG Starter Kit
Design Overview:
A block diagram of the image pre-designed hardware constructs:
These designs are constructed using Vitis stream having the DPU configuration:
u96v2_sbc_base: 1 x B2304 (Low memory usage), 200MHz / 400MHz
uz7ev_evcc_base: 2 x B4096 (Low memory usage), 300MHz / 600MHz
uz3eg_iocc_base: 1 x B2304 (Low memory usage), 150MHz / 300MHz
A pre-constructed image compilation model comprises two different configurations:
B2304_LR: B2304 DPU RAM having a lower usage rate
B4096_LR: B4096 DPU having a low usage RAM
(Note: the same configuration and ZCU104 ZCU102 preformed image configuration of the Xilinx B4096_LR)
Captured with DPU and resource utilization without a DPU according to the resource utilization for each platform:
(U96v2_sbc_base- with DPU (B2304, RAM using low))
(U96v2_sbc_base- without DPU)
(Uz7ev_evcc_base- with DPU (2 * B4096, RAM using low))
(Uz7ev_evcc_base- without DPU)
(Uz3eg_iocc_base- with DPU (B2304, RAM using low))
(Uz3eg_iocc_base- without DPU)
Each platform resource utilization captured with and without placement of resources in the DPU form, as shown:
(U96v2_sbc_base- with DPU (B2304, RAM using low))
(U96v2_sbc_base- without DPU)
(Uz7ev_evcc_base- with DPU (2 * B4096, RAM using low))
(Uz7ev_evcc_base- without DPU)
(Uz3eg_iocc_base- with DPU (B2304, RAM using low))
(Uz3eg_iocc_base- without DPU)
Design steps:
Step one, create SD card
Provides pre-built SD card image Avnet following platforms:
u96v2_sbc_base: Ultra96-V2 Development Board
uz7ev_evcc_base: UltraZed-EV SOM (7EV) + FMC carrier card
uz3eg_iocc_base: UltraZed-EG SOM (3EG) + IO card operators
SD card need to download one of the following pre-built image:
uz96v2_sbc_base :( click to download)
uz7ev_evcc_base :( click to download)
uz3eg_iocc_base :( click to download)
Each motherboard specific image SD card contains: hardware design (BOOT.BIN, dpu.xclbin), petalinux image (boot.scr, image.ub, rootfs.tar.gz), and it is provided with an image (the IMG) format , contains two partitions:
BOOT - FAT partition type (size = 400MB)
ROOTFS - EXT4 type of partition
The first BOOT partition size created for 400MB, which contains the following files:
Bootstrap
boot.scr
image.ub
Initialization file
platform_desc.txt
dpu.xclbin
arch.json
The second partition contains ROOTFS rootfs.tar.gz content, and the package Vitis-AI runtime pre-installed, including:
/ Home / root / dpu_sw_optimize
/ Home / root / Vitis-AI
Pre-built sample VART
Pre-built library of samples Vitis-AI-
Download and unzip the .img file can be programmed to 16GB micro SD card
1. Unzip the file to get the .img file
2, the Board of dedicated SD card image programmed to 16GB (or more) of the micro SD card on a Windows computer, use Balena Etcher or Win32DiskImager (free and open source software)
3, on a Linux machine, or use Balena Etcher dd utility:
$ Sudo dd bs = 4M if = Avnet- {platform} -Vitis-AI-1-3- {date} .img of = / dev / sd {X} status = progress conv = fsync
(Where {X} lowercase letters, the device designation for the SD card may also be used "df -h" to determine which device corresponds to your SD card)
Step two: Perform AI applications on hardware
Some configuration steps need to be performed only once (after the first launch), including the following:
Use on a micro SD card you created to boot the target board
After booting, startup script dpu_sw_optimize.sh
The script performs the following steps:
SD card automatically adjust the second (EXT4) partition size
DDR memory QoS configuration
[Optional] Detailed dmesg output disabled:
You can use the following methods to re-enable it:
Use dexplorer utility Vitis-AI runtime verification.
For u96v2_sbc and uz3eg_iocc goals, which should correspond to the following output:
For uz7ev_evcc goal, it should correspond to the following output:
DISPLAY environment variable is defined:
DP monitor changes the resolution to a lower resolution, for example 640x480:
Based on the sample application VART start, start the application adas_detection
Start pose_detection application:
Start caffe version resnet50 application:
Start subdivision applications;
Start video_analysis application:
Based on the sample application started Vitis-AI-Library using two dense box model variant promoter face_detect application ( "0" is designated as the second argument to specify the USB camera)
Intensive box model properties of each variant:
Segmentation and road detection demonstration run in DRM mode or GUI mode. In GUI mode, demonstration using a matchbox, matchbox which display only a window, but may be selected in the GUI. In DRM mode, matchbox is disabled, and the output will be sent directly to the DRM driver.
Note: segs_and_roadline demo requires higher resolution (1920x1080), which will produce noticeable flicker on Ultra96-V2.
Segmentation and road detection demonstration run in GUI mode
Visible output may be selected from the GUI, as follows:
Segmentation and road detection demonstration run in DRM mode:
Segmentation and pose estimation demo can be run in DRM mode or GUI mode. In GUI mode, demonstration using a matchbox, matchbox which display only a window, but may be selected in the GUI. In DRM mode, matchbox is disabled, and the output will be sent directly to the DRM driver.
Note: seg_and_pose_detect demo requires higher resolution (1920x1080), which will produce noticeable flicker on Ultra96-V2.
In GUI mode segmentation and pose estimation presentations at two video files
Use video files and USB camera running in GUI mode segmentation and pose estimation demo:
DRM mode to split in two video files and pose estimation demo:
Use video files and USB camera running split in DRM mode and pose estimation demo:
Step three, the modified example
Reference Project: Ultra96-V2 head pose estimation
Be
The project describes Xilinx model of how to use the zoo construct face recognition model to implement:
Face Detection: densitybox_640_360
Face Detection mark: facelandmark
Reference Project II: Vitis-AI identify the license plate
Be
The project describes Xilinx model of how to use the zoo model construction license plate recognition:
Vehicle Detection: ssd_traffic
License plate detection: platedetect
License plate number recognition: platenum
problem solved:
One problem, install the python API does not work
Vitis-AI 1.3 runtime package pre-installed python API does not work
The reason for this problem is the presence of the old python API
Vitis-AI 1.3 requires the following documents, and the need to keep the following documents:
The following document is applicable to Vitis-AI 1.2, you must remove it:
You can do this using the following command:
Second problem, the e-Con USB3 camera for use with Ultra96-V2
For some USB3 cameras (such as cameras listed below), Ultra96-V2 will be a problem:
e-con Systems See3CAM_CU30_CHL_TC USB camera
Solution: / spreading unit connected to the hub to which they USB2 mode USB2
Question three, Ultra96-V2 PMIC firmware update
For Ultra96-V2 development board, need to run the firmware update PMIC important to run all AI applications.
If the firmware is not updated PMIC, the following AI application will result in a periodic peak current exceeds the fault threshold default 4A, so that the effective power on reset, so that the circuit board to restart.
adas_detection
inception_v1_mt
resnet50_mt
Segmentation
video_analysis
PMIC firmware update will increase the failure threshold, and prevents restart.
To update the firmware Ultra96-V2 PMIC development board, please refer to the "Ultra96-V2 Getting Started Guide":
Ultra96-V2 product page
Ultra96-V2 Getting Started
Question four, some SSD models lack {model} _officialcfg.prototxt file
In u96v2_sbc_base uz3eg_iocc_base prebuilt and SD card image, you are missing {model} _officialcfg.prototxt file:
The reason for the omission: when compile_modelzoo.sh not exist, copy from zcu102 / zcu104 pre-built archives in {model} _officialcfg.prototxt (Click to view)
Missing files as an archive to provide, in order to build and use a pre-existing images with the SD card, you need to install, copy the image to the SD card, and then run the following command: "
Our other product: