If you have downloaded Vitis-AI, enter to the Vitis-AI directory, and then start Docker.
Thus, Vitis-AI-Library is located in the path of /workspace/Vitis_AI_Library/ in the docker system.
- Enter the directory of sample and then compile it. Take
facedetect as an example.
$cd /workspace/Vitis_AI_Library/overview/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 video file's name for input.You need to prepare the video file.-t: <num_of_threads>
- To test the performance of 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.