This sample demonstrates gvafpscounter element used to measure overall performance of single-channel or multi-channel video analytics pipelines.
The sample outputs FPS (Frames Per Second) every second and average FPS on exit.
How It Works¶
The sample builds GStreamer pipeline containing video decode, inference and other IO elements, or multiple (N) identical pipelines if number channels parameter set to N>1.
gvafpscounter inserted at the end of each channel pipeline and measures FPS across all channels.
The command-line parameters allow to select decode and inference devices (ex, CPU, GPU).
By default the sample measures performance of video analytics pipeline on
MODEL= line in the script to benchmark pipeline on another model.
Before running samples (including this one), run script
download_models.sh once (the script located in
samples top folder) to download all models required for this and other samples.
You can download video file example by command
curl https://raw.githubusercontent.com/intel-iot-devkit/sample-videos/master/head-pose-face-detection-female-and-male.mp4 --output /path/to/your/video/head-pose-face-detection-female-and-male.mp4
or use any other media/video file.
./benchmark.sh INPUT_VIDEO [DECODE_DEVICE] [INFERENCE_DEVICE] [CHANNELS_COUNT]
The sample takes one to four command-line parameters (last three are optional):
[INPUT_VIDEO] to specify input video file
[DECODE_DEVICE] to specify device for video decode, could be
[INFERENCE_DEVICE] to specify inference device, could be any device supported by OpenVINO™ Toolkit
[CHANNELS_COUNT] number simultaneous channels to benchmark
prints gst-launch command line into console
reports FPS every second and average FPS on exit