Skip to content

Latest commit

 

History

History
executable file
·
68 lines (45 loc) · 2.84 KB

README.md

File metadata and controls

executable file
·
68 lines (45 loc) · 2.84 KB

classifier_grid

Introduction

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:

  1. Builds the IR files using the model files from Open Model Zoo.
  2. Copies the IR files from the model directory to the project base directory.
  3. Runs the sample.

Running the Example

To run the example code do the following :

  1. Open a terminal and change directory to the project base directory
  2. Type the following command in the terminal: make run

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

Prerequisites

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.

Makefile

Provided Makefile has various targets that help with the above mentioned tasks.

make run or make run_py

Runs the sample application.

make help

Shows available targets.

make all

Builds and/or gathers all the required files needed to run the application.

make data

Gathers all of the required data need to run the sample.

make deps

Builds all of the dependencies needed to run the sample.

make default_model

Compiles an IR file from a default model to be used when running the sample.

make install-reqs

Checks required packages that aren't installed as part of the OpenVINO installation.

make uninstall-reqs

Uninstalls requirements that were installed by the sample program.

make clean

Removes all the temporary files that are created by the Makefile.