If you have downloaded Vitis-AI, enter to the Vitis-AI directory, and then start Docker.
- Enter the directory of the sample and then compile it. Take facedetect as an example.
cd /workspace/demo/Vitis-AI-Library/samples/facedetect bash -x build.sh
- Run the
sample.
./test_jpeg_facedetect densebox_320_320 sample_facedetect.jpg
- If you want to run the program in batch mode, which means that the
DPU processes multiple images at once to prompt for processing performance, you have
to compile the entire Vitis AI Library according
to Setting Up the Host section. Then the batch
program will be generated under build_dir_default. Enter build_dir_default, take facedetect as an example, execute the
following
command.
./test_facedetect_batch densebox_320_320 <img1_url> [<img2_url> ...]
- To run the video example, run the following
command:
./test_video_facedetect densebox_320_320 <video_input.mp4> -t 8
video_input.mp4
: The name of the video file for input. You need to prepare the video file.-t: <num_of_threads>
- To test the performance of the model, run the following
command:
./test_performance_facedetect densebox_320_320 test_performance_facedetect.list -t 8 -s 60
- -t: <num_of_threads>
- -s: <num_of_seconds>
For more parameter information, enter
-h
for viewing.Note: The performance test program is automatically run in batch mode.