Model Samples - Model Samples - 2.5 English - UG1354

Vitis AI Library User Guide (UG1354)

Document_ID
UG1354
Release_Date
2022-06-15
Version
2.5 English

Currently, 50 model samples are located in the ~/Vitis-AI/examples/Vitis-AI-Library/samples folder. Each sample has the following four types of test samples:

  • test_jpeg_[model type]
  • test_video_[model type]
  • test_performance_[model type]
  • test_accuracy_[model type]

Take YOLOv3 as an example.

  1. Choose one of the following YOLOv3 models before you run the YOLOv3 detection example:
    1. yolov3_bdd
    2. yolov3_voc
    3. yolov3_voc_tf
  2. Ensure that the following test programs exist:
    1. test_jpeg_yolov3
    2. test_video_yolov3
    3. test_performance_yolov3
    4. test_accuracy_yolov3_bdd
    5. test_accuracy_yolov3_adas_pruned_0_9
    6. test_accuracy_yolov3_voc
    7. test_accuracy_yolov3_voc_tf

    If the executable program does not exist, cross-compile it on the host, then copy the executable program to the target.

  3. To test the image data, execute the following command:
    #./test_jpeg_yolov3 yolov3_bdd sample_yolov3.jpg

    The result is printed on the terminal. You can also view the output image: sample_yolov3_result.jpg.

  4. To test the video data, execute the following command:
    #./test_video_yolov3 yolov3_bdd video_input.mp4 -t 8
  5. To test the model performance, execute the following command:
    #./test_performance_yolov3 yolov3_bdd test_performance_yolov3.list -t 8

    The result is printed on the terminal.

  6. To test the model accuracy, prepare your image dataset, image list file, and the ground truth of the images. Then execute the following command:
    #./test_accuracy_yolov3_bdd [image_list_file] [output_file]

After the output_file is generated, a script file is needed to automatically compare the results. Finally, the accuracy result can be obtained.