For Cloud (DPUCAHX8H) - 1.3 English

Vitis AI User Guide (UG1414)

Document ID
UG1414
Release Date
2021-02-03
Version
1.3 English

Before running the samples on the cloud, make sure that the Alveo card, such as U50, U50LV, or U280, is installed on the server and the docker system is loaded and running.

If you have downloaded Vitis-AI, entered Vitis-AI directory, and then started Docker.

Thus, VART examples is located in the path of /workspace/demo/VART/ in the docker system.

  1. Download the vitis_ai_runtime_r1.3.0_image_video.tar.gz package and unzip it.
    tar -xzvf vitis_ai_runtime_r1.3.0_image_video.tar.gz -C /workspace/demo/VART
  2. Compile the sample, take resnet50 as an example.
    cd /workspace/demo/VART/resnet50
    bash –x build.sh

    When the compilation is complete, the executable resnet50 is generated in the current directory.

  3. Download the model. The download link of the model is described in 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 model. Take resnet50 as an example:
    wget https://www.xilinx.com/bin/public/openDownload?filename=resnet50-u50-r1.3.0.tar.gz -O resnet50-u50-r1.3.0.tar.gz
  4. Untar the model on the target and install it.
    If the /usr/share/vitis_ai_library/models folder does not exist, create it first.
    sudo mkdir -p /usr/share/vitis_ai_library/models
    Then install the model package.
    tar -xzvf resnet50-u50-r1.3.0.tar.gz
    sudo cp resnet50 /usr/share/vitis_ai_library/models -r
  5. Run the sample.
    ./resnet50 /usr/share/vitis_ai_library/models/resnet50/resnet50.xmodel

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

Table 1. Launching Commands for Vitis AI Samples on U50/U50LV/U280
ID Example Name Command
1 resnet50 ./resnet50 /usr/share/vitis_ai_library/models/resnet50/resnet50.xmodel
2 resnet50_mt_py /usr/bin/python3 resnet50.py 1 /usr/share/vitis_ai_library/models/resnet50/resnet50.xmodel
3 inception_v1_mt_py /usr/bin/python3 inception_v1.py 1 /usr/share/vitis_ai_library/models/inception_v1_tf/inception_v1_tf.xmodel
4 pose_detection ./pose_detection video/pose.mp4 /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
5 video_analysis ./video_analysis video/structure.mp4 /usr/share/vitis_ai_library/models/ssd_traffic_pruned_0_9/ssd_traffic_pruned_0_9.xmodel
6 adas_detection ./adas_detection video/adas.avi /usr/share/vitis_ai_library/models/yolov3_adas_pruned_0_9/yolov3_adas_pruned_0_9.xmodel
7 segmentation ./segmentation video/traffic.mp4 /usr/share/vitis_ai_library/models/fpn/fpn.xmodel
8 squeezenet_pytorch ./squeezenet_pytorch /usr/share/vitis_ai_library/models/squeezenet_pt/squeezenet_pt.xmodel