Welcome back to the OpenVINO Channel
Now you can use OpenVINO to run inference on a Raspberry-pi with a Movidius VPU
Let's talk about the Hardware, the installation, and how to use it..
You have created an application on your development system using OpenVINO
We have talked about all the process in the previous videos..
Now, we want to run it on a target IOT platform
I have here a Raspberry Pi and and an NCS, A Neural Compute Stick with a MVD VPU connected via USB
It could be NCS 1 with Myriad 2 or NCS2, which has a myriad - x
Now let's talk about How to get the OpenVINO package
How to set the environment variables and get it to work
How to add USB rules, as the NCS is a USB device
and how to run the face detection sample supplied with OpenVINO, but you can run your own application..
All the stages are described in detail in the link.. And you can use the transcript to copy paste them..
Getting the OpenVINO package is easy
We are getting only the minimal package which includes only the inference-engine, The OpenCV, and a set of sample applications.
Go to Downloads directory (cd ~/OpenVINO/)
Get the OpenVINO Package
( wget --no-check-certificate https://download.01.org/openvinotoolkit/2018_R5/packages/l_openvino_toolkit_ie_p_2018.5.445.tgz )
And Un-Tar
(tar -xf l_openvino_toolkit_ie_p_2018.5.445.tgz)
the setupvars.sh script has a variable of
Let's replace it with our installation directory using this SED command..
( sed -i "s||$(pwd)/inference_engine_vpu_arm|" inference_engine_vpu_arm/bin/setupvars.sh )
Now let's run this script to set our variables.. (source inference_engine_vpu_arm/bin/setupvars.sh)
And you get an indication that the environment variables are ready..
We need to add the current Linux user to the users group:
(sudo usermod -a -G users "$(whoami)") )
You will need to Log out and log in for it to take effect.
I will just skip it..
Now We need to update the USB rules to allow the compute stick to work..
This script will do the trick.. Install NCS_Udev_Rules..
(sh inference_engine_vpu_arm/install_dependencies/install_NCS_udev_rules.sh)
And we are all set..
Now you are all set to run your application with OpenVINO inference-engine..
As an example, let's run one of the supplied samples..
We will need to build the sample and get the required IR files, the model..
Let's go to the samples directory (cd inference_engine_vpu_arm/deployment_tools/inference_engine/samples/ )
Many samples are here..
Create a "build" directory (mkdir build && cd build)
And build the interactive face detection demo CMAKE..
(cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-march=armv7-a")
And Make (make -j2 interactive_face_detection_demo )
The binaries will be under Arm/Release
Now let's get the face detection model, the IR files
Get the bin file (wget --no-check-certificate https://download.01.org/openvinotoolkit/2018_R4/open_model_zoo/face-detection-adas-0001/FP16/face-detection-adas-0001.bin)
And the xml file (wget --no-check-certificate https://download.01.org/openvinotoolkit/2018_R4/open_model_zoo/face-detection-adas-0001/FP16/face-detection-adas-0001.xml)
And they are here..
And now let's run the sample..
Running the interactive face detection demo
Input model is the face detection
Device is MYRIAD
I will use my web cam as an input, so /dev/video0
but you can use any video file you want
(./interactive_face_detection_demo -m face-detection-adas-0001.xml -d MYRIAD -I /dev/video0)
And this is me
This is recorded via VNC and using Myriad-2 so it's pretty slow, but working very nice..
My face detected with a Raspberry-PI..and a Movidius Neural Compute Stick
So you can now use OpenVINO on your Raspberry-PI. How cool is that? Waiting to see your projects..
Subscribe to out channel and we'll send you more videos like this
Thank you.