- Download the vitis_ai_runtime_r2.5.0_image_video.tar.gz from host to the target
using scp with the following
command.
scp vitis_ai_runtime_r2.5.0_image_video.tar.gz root@[IP_OF_BOARD]:~/ - Unzip the vitis_ai_runtime_r2.5.0_image_video.tar.gz
package.
tar -xzvf vitis_ai_runtime_r2.5.0_image_video.tar.gz -C ~/Vitis-AI/demo/VART - 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/model_zooand download the model of the corresponding platform. Takeresnet50as an example:wget https://www.xilinx.com/bin/public/openDownload?filename=resnet50-zcu102_zcu104_kv260-r2.5.0.tar.gz -O resnet50-zcu102_zcu104_kv260-r2.5.0.tar.gz scp resnet50-zcu102_zcu104_kv260-r2.5.0.tar.gz root@[IP_OF_BOARD]:~/ - Untar the model on the target and install it.Note: If the
/usr/share/vitis_ai_library/modelsfolder does not exist, create it first.mkdir -p /usr/share/vitis_ai_library/modelsTo install the model package, run the following command:
tar -xzvf resnet50-zcu102_zcu104_kv260-r2.5.0.tar.gz cp resnet50 /usr/share/vitis_ai_library/models -r - Enter the directory of samples in the target board. Take resnet50 as an
example.
cd ~/Vitis-AI/examples/VART/resnet50 - Run the
example.
./resnet50 /usr/share/vitis_ai_library/models/resnet50/resnet50.xmodelNote: If the above executable program does not exist, cross-compile it on the host first.Note: Applications can also be compiled natively on the target. Run the following command on the target.sh -x build.sh
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.
| 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 resnet50.py 1 /usr/share/vitis_ai_library/models/resnet50/resnet50.xmodel |
| 5 | inception_v1_mt_py |
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.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 |