Inception is a deep convolutional neural network (CNN) architecture designed by Google during the ImageNet Large-Scale Visual Recognition Challenge 2014 (ILSVRC2014). The main goal behind this model is to improve accuracy by increasing depth and width of the network without affecting the computational requirements. However, the latency of inception based models like GoogLeNet, Inception V1, V2, V3 and V4 is much larger than that of MobileNets.
TensorFlow™ provides different versions of pre-trained inception models trained on ImageNet. The Makefile in this project helps convert these TensorFlow Inception models to an IR format file (Intermediate Representation), which can be deployed on to the Intel® Neural Compute Stick (NCS1/NCS2) for inference.
This code example requires that the following components are available:
- Intel Neural Compute Stick
- Intel OpenVINO 2020.1 Toolkit
- TensorFlow source repo
- TensorFlow models repo
This sample utilizes the OpenVINO Inference Engine from the OpenVINO Deep Learning Development Toolkit and was tested with the 2020.1 release.
- name: ‘input’, shape: [1x3x299x299], Expected color order is BGR. Original model expects RGB, but IR is compiled with the –reverse_input_channels option to convert the IR to expect the BGR color order.
- name: ‘InceptionV3/Predictions/Softmax’, shape: [1, 1001] - Output indexes represent each class probability. This model includes the background class but it is not used for this sample.
You can run the sample with the command:
You can compile the model to an IR using the command:
Provided Makefile describes various targets that help with the above mentioned tasks.
Runs a sample application with the network.
Builds the C++ example program run_cpp which can be executed with make run_cpp.
Runs the provided run_cpp executable program that is built via make cpp. This program sends a single image to the Neural Compute Stick and receives and displays the inference results.
Shows makefile possible targets and brief descriptions.
Makes the follow items: deps, data, compile_model, compile_cpp.
Uses the network description and the trained weights files to generate an IR (intermediate representation) format file. This file is later loaded on the Neural Compute Stick where the inferences on the network can be executed.
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 and target files that are created by the Makefile.
Makefile:31: *** TF_MODELS_PATH is not defined. Run `export TF_MODELS_PATH=path/to/your/tensorflow/models/repo`. Stop.
- Make sure TF_MODELS_PATH is pointing to your tensorflow models directory.
Makefile:46: *** TF_SRC_PATH is not defined. Run `export TF_SRC_PATH=path/to/your/tensorflow/source/repo`. Stop.
- Make sure TF_SRC_PATH is pointing to your tensorflow source directory.