- After downloading the Vitis AI Library, navigate to the Vitis-AI directory, and then start Docker.
- Enter the directory of the sample and then compile it. Take
resnet50_pt as an example.
cd /workspace/examples/vai_library/samples/classification bash -x build.sh
- Run the
./test_jpeg_classification resnet50_pt sample_classification.jpgIf you want to run the program in batch mode, which means that the DPU processes multiple images simultaneously, you have to compile the entire Vitis AI Library according to the instructions in the Setting Up the Host section. Then the batch mode program will be generated in the build_dir_default location. Enter build_dir_default, and execute the following command.
./test_classification_batch resnet50_pt <img1_url> [<img2_url> ...]
- To run the video example, run the following
./test_video_classification resnet50_pt <video_input.mp4> -t 8
Here, video_input.mp4 is the video file that you have to prepare for input and
-tis the number of threads.
- To test the performance of the model, run the following
./test_performance_classification resnet50_pt test_performance_classification.list -t 8 -s 60
-tis the number of threads and
-sis the number of seconds.
To view a complete listing of command line options for the executable, run the command with the '
- The performance test program is automatically run in batch mode.
- If you run the examples in a hetergeneous V70 system, configure the SoftMax env using "export XLNX_ENABLE_C_SOFTMAX=1".
To run an example for the Versal V70 card, use these steps: