For Cloud (U50/U50LV/U280) - 1.4.1 English

Vitis AI Library User Guide (UG1354)

Document ID
UG1354
Release Date
2021-12-11
Version
1.4.1 English

If you have downloaded Vitis-AI, enter to the Vitis-AI directory, and then start Docker.

  1. Enter the directory of the sample and then compile it. Take resnet50 as an example.
    cd /workspace/demo/Vitis-AI-Library/samples/classification
    bash -x build.sh
  2. Run the sample.
    ./test_jpeg_classification resnet50 sample_classification.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_classification_batch resnet50 <img1_url> [<img2_url> ...]
  3. To run the video example, run the following command:
    ./test_video_classification resnet50 <video_input.mp4> -t 8
    video_input.mp4
    The name of the video file for input. You need to prepare the video file.
    -t
    The number of threads.
  4. To test the performance of the model, run the following command:
    ./test_performance_classification resnet50 test_performance_classification.list -t 8 -s 60 
    -t
    The number of threads.
    -s
    The number of seconds.

    For more parameter information, enter -h for viewing.

    Note: The performance test program is automatically run in batch mode.