For Edge (DPUCZDX8G/DPUCVDX8G) - 1.4.1 English

Vitis AI User Guide (UG1414)

Document ID
Release Date
1.4.1 English
  1. Download the vitis_ai_runtime_r2.0.0_image_video.tar.gz from host to the target using scp with the following command.
    scp vitis_ai_runtime_r2.0.0_image_video.tar.gz root@[IP_OF_BOARD]:~/
  2. Unzip the vitis_ai_runtime_r2.0.0_image_video.tar.gz package.
    tar -xzvf vitis_ai_runtime_r2.0.0_image_video.tar.gz -C ~/Vitis-AI/demo/VART
  3. Download the model. The download link of the model is described in the YAML file of the model. You can find the YAML file in Vitis-AI/models/AI-Model-Zoo and download the model of the corresponding platform. Take resnet50 as an example:
    wget -O resnet50-zcu102_zcu104_kv260-r2.0.0.tar.gz
    scp resnet50-zcu102_zcu104_kv260-r2.0.0.tar.gz root@[IP_OF_BOARD]:~/
  4. Untar the model on the target and install it.
    Note: If the /usr/share/vitis_ai_library/models folder does not exist, create it first.
    mkdir -p /usr/share/vitis_ai_library/models

    To install the model package, run the following command:

    tar -xzvf resnet50-zcu102_zcu104_kv260-r2.0.0.tar.gz
    cp resnet50 /usr/share/vitis_ai_library/models -r
  5. Enter the directory of samples in the target board. Take resnet50 as an example.
    cd ~/Vitis-AI/demo/VART/resnet50
  6. Run the example.
    ./resnet50 /usr/share/vitis_ai_library/models/resnet50/resnet50.xmodel
    Note: If the above executable program does not exist, cross-compile it on the host first.
Note: For examples with video input, only `webm` and `raw` format are supported by default with the official system image. If you want to support video data in other formats, install the relevant packages on the system.

The following table shows the run commands for all the Vitis AI samples.

Table 1. Launching Commands for Vitis AI Samples on ZCU102/ZCU104
ID Example Name Command
1 resnet50 ./resnet50 /usr/share/vitis_ai_library/models/resnet50/resnet50.xmodel
2 resnet50_pt ./resnet50_pt /usr/share/vitis_ai_library/models/resnet50_pt/resnet50_pt.xmodel ../images/001.jpg
3 resnet50_ext ./resnet50_ext /usr/share/vitis_ai_library/models/resnet50/resnet50.xmodel ../images/001.jpg
4 resnet50_mt_py python3 1 /usr/share/vitis_ai_library/models/resnet50/resnet50.xmodel
5 inception_v1_mt_py

python3 1 /usr/share/vitis_ai_library/models/inception_v1_tf/inception_v1_tf.xmodel

6 pose_detection ./pose_detection video/pose.webm /usr/share/vitis_ai_library/models/sp_net/sp_net.xmodel /usr/share/vitis_ai_library/models/ssd_pedestrian_pruned_0_97/ssd_pedestrian_pruned_0_97.xmodel
7 video_analysis ./video_analysis video/structure.webm /usr/share/vitis_ai_library/models/ssd_traffic_pruned_0_9/ssd_traffic_pruned_0_9.xmodel
8 adas_detection ./adas_detection video/adas.webm /usr/share/vitis_ai_library/models/yolov3_adas_pruned_0_9/yolov3_adas_pruned_0_9.xmodel
9 segmentation ./segmentation video/traffic.webm /usr/share/vitis_ai_library/models/fpn/fpn.xmodel
10 squeezenet_pytorch ./squeezenet_pytorch /usr/share/vitis_ai_library/models/squeezenet_pt/squeezenet_pt.xmodel