This sample displays a visual representation of simultaneous inferences being performed by multiple threads and devices.
The sample starts by loading several images and displaying them in a grid pattern. As the NCS device completes an inference on an image in the grid, the image will light up to signal that the inference on that image is complete as seen in the animation below
By default, the example uses 3 threads per NCS device and creates 6 async inference requests per thread. Also by default, the sample will run 500 inferences using the GoogLeNet network.
This application provides many configurable options on the commandline when running directly with the python interpreter rather than through the Makefile. To see the supported options run
python3 classifier_grid.py help.
The provided Makefile does the following:
- Builds the IR files using the model files from Open Model Zoo.
- Copies the IR files from the model directory to the project base directory.
- Runs the sample.
To run the example code do the following :
- Open a terminal and change directory to the project base directory
- Type the following command in the terminal:
To get a list of commandline options type the following command:
python3 classifier_grid.py help
Note: The CPU device can be used with the example using the command:
make run DEV=CPU
Note: Other models can be used with the example.
Example of running sample on AlexNet:
make run XML=../../caffe/AlexNet/alexnet.xml BIN=../../caffe/AlexNet/alexnet.bin
This program requires:
- 1 or more NCS devices
- OpenVINO 2020.1 Toolkit
*It may run with older versions but you may see some glitches such as the GUI Window not closing when you click the X in the title bar, and other key binding issues.
Note: All development and testing has been done on Ubuntu 16.04 on an x86-64 machine.
Provided Makefile has various targets that help with the above mentioned tasks.
Runs the sample application.
Shows available targets.
Builds and/or gathers all the required files needed to run the application.
Gathers all of the required data need to run the sample.
Builds all of the dependencies needed to run the sample.
Compiles an IR file from a default model to be used when running the sample.
Checks required packages that aren’t installed as part of the OpenVINO installation.
Uninstalls requirements that were installed by the sample program.
Removes all the temporary files that are created by the Makefile.