For Cloud (U50/U50lv/U280) - 1.2 English

Vitis AI Library User Guide (UG1354)

Document ID
UG1354
Release Date
2020-07-21
Version
1.2 English

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.

  1. 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
  2. Run the sample.
    $./test_jpeg_facedetect densebox_320_320 sample_facedetect.jpg
  3. 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> ...]
  4. 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>

  5. 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.