Before running the samples on the Cloud, ensure that either the Versal VCK5000 evaluation board or an Alveo card, such as U50LV, or U55C, 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 are located in the path of /workspace/demo/VART/ in the docker system.
- Download the vitis_ai_runtime_r2.0.0_image_video.tar.gz package and unzip
it.
tar -xzvf vitis_ai_runtime_r2.0.0_image_video.tar.gz -C /workspace/demo/VART
- 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.
- 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
. Takeresnet50
on U50LV or U55C card as an example:wget https://www.xilinx.com/bin/public/openDownload?filename=resnet50-u50lv-u55c-DPUCAHX8H-r2.0.0.tar.gz -O resnet50-u50lv-u55c-DPUCAHX8H-r2.0.0.tar.gz
- Untar the model on the target and install it.Note: If the
/usr/share/vitis_ai_library/models
folder does not exist, create it.sudo mkdir -p /usr/share/vitis_ai_library/models
Then install the model package.
tar -xzvf resnet50-u50lv-u55c-DPUCAHX8H-r2.0.0.tar.gz sudo cp resnet50 /usr/share/vitis_ai_library/models -r
- 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.
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 | /usr/bin/python3 resnet50.py 1 /usr/share/vitis_ai_library/models/resnet50/resnet50.xmodel |
5 | inception_v1_mt_py | /usr/bin/python3 inception_v1.py 1 /usr/share/vitis_ai_library/models/inception_v1_tf/inception_v1_tf.xmodel |
6 | 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 |
7 | video_analysis | ./video_analysis video/structure.mp4 /usr/share/vitis_ai_library/models/ssd_traffic_pruned_0_9/ssd_traffic_pruned_0_9.xmodel |
8 | adas_detection | ./adas_detection video/adas.avi /usr/share/vitis_ai_library/models/yolov3_adas_pruned_0_9/yolov3_adas_pruned_0_9.xmodel |
9 | segmentation | ./segmentation video/traffic.mp4 /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 |