Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

All of the source code is available on the Xilinx GitHub. After you clone the Vitis AI repository, switch to the v1.3.2 tag. Make sure you’re in your home directory before cloning.

...

Code Block
# Use a jpeg image   as input (ex: image.jpeg, result will be in image_result.jpeg)
$ ./test_jpeg_facedetect  ~/densebox_640_360/densebox_640_360.xmodel image.jpeg
 
# Use USB camera as input (2 is the /dev/videoX index that the camera is detected at)
$ ./test_video_facedetect ~/densebox_640_360/densebox_640_360.xmodel 2

# Use video file as input 
./test_video_facedetect densebox_640_360/densebox_640_360.xmodel video_input.webm -t 8

#  Run the accuracy test - Input is a file with a list of images, results are in results.txt
$ ./test_accuracy_facedetect  ~/densebox_640_360/densebox_640_360.xmodel file_list.txt results.txt

# Run the performance test - Input is a file with a list of images,  -t: Number of threads, -s: Number of seconds to run
$ ./test_performance_facedetect  ~/densebox_640_360/densebox_640_360.xmodel file_list.txt -t 4 -s 10 

...

Info

For more information about the specific test applications supported for each sample, please refer to the readme in the demo/Vitis-AI-Library/samples/<sample app> directory

For more information about running the sample apps, please refer to https://github.com/Xilinx/Vitis-AI/blob/master/tools/Vitis-AI-Library/README.md#running-vitis-ai-library-examples

Sample Images and Videos

Vitis AI provides a test image archive that can be download to the target and used to run the tests above. To download the sample image package, and extract them to the samples directory in your home directory, use the following commands: 

Code Block
wget https://www.xilinx.com/bin/public/openDownload?filename=vitis_ai_library_r1.3.1_images.tar.gz -O ~/vitis_ai_library_r1.3.1_images.tar.gz
tar -xzf vitis_ai_library_r1.3.1_images.tar.gz

To use these images and file lists, change into the subdirectory of the test you want to run, and execute the test app from there.  For example, to use the facedetect sample images, you should run your test from the ~/samples/facedetect directory.