For models based on VART, the samples are located in the ~/Vitis-AI/examples/vai_library/samples folder. For models based on the ONNX Runtime, the samples are located in the ~/Vitis-AI/examples/vai_library/samples_onnx 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.
- Choose one of the following YOLOv3 models before you run the YOLOv3 detection
- Ensure that the following test programs exist:
If the executable program does not exist, cross-compile it on the host, then copy the executable program to the target.
- To test the image data, execute the following
#./test_jpeg_yolov3 yolov3_voc_tf sample_yolov3.jpg
The result is printed on the terminal. You can also view the output image: sample_yolov3_result.jpg.
- To test the video data, execute the following
#./test_video_yolov3 yolov3_voc_tf video_input.mp4 -t 8
- To test the model performance, execute the following
#./test_performance_yolov3 yolov3_voc_tf test_performance_yolov3.list -t 8
The result is printed on the terminal.
- To test the model accuracy, prepare your image dataset, image list file, and
the ground truth of the images. Then execute the following
#./test_accuracy_yolov3_voc_tf [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.