Last active
July 9, 2019 14:59
-
-
Save dingdayu/d80b1c2112366dc5f8fbb325d49704ae to your computer and use it in GitHub Desktop.
Install openvino sdk & test Neural Stick v2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# openvino installer for raspberry pi. This allows you to test the Intel Neural Compute Stick v2 | |
# based on https://software.intel.com/en-us/articles/OpenVINO-Install-RaspberryPI | |
# curl -fsSL "https://gist.githubusercontent.com/dingdayu/d80b1c2112366dc5f8fbb325d49704ae/raw/0095c0b385ec05925b95b3b8b6e1333a8585260f/Install_openvino.sh" | /bin/bash | |
echo "Updating system software..." | |
sudo apt-get update && sudo apt-get upgrade -y | |
sudo apt-get install -y build-essential cmake pkg-config wget lsb-release apt-utils libusb-1.0.0 | |
echo "Downloading OpenVINO SDK..." | |
wget https://download.01.org/opencv/2019/openvinotoolkit/l_openvino_toolkit_raspbi_p_2019.1.094.tgz | |
echo "Unpacking SDK..." | |
sudo mkdir -p /opt/intel/openvino | |
sudo tar -xf l_openvino_toolkit_raspbi_p_2019.1.094.tgz --strip 1 -C /opt/intel/openvino | |
echo "Setting installation directory path..." | |
sudo sed -i "s|<INSTALLDIR>|/opt/intel/openvino|" /opt/intel/openvino/bin/setupvars.sh | |
echo "Setting up environment variables..." | |
source /opt/intel/openvino/bin/setupvars.sh | |
echo "source /opt/intel/openvino/bin/setupvars.sh" >> ~/.bashrc | |
echo "Setting up USB rules..." | |
sudo usermod -a -G users "$(whoami)" | |
echo "Activate Neural Stick 2 USB usage..." | |
sh /opt/intel/openvino/install_dependencies/install_NCS_udev_rules.sh | |
echo "Testing installation using a face detector..." | |
mkdir build && cd build | |
echo "Making the test..." | |
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-march=armv7-a" /opt/intel/openvino/deployment_tools/inference_engine/samples | |
# if make crashes then change to -j2 instead of -j4 | |
make -j2 object_detection_sample_ssd | |
echo "Downloading the face detector test support files..." | |
wget --no-check-certificate https://download.01.org/opencv/2019/open_model_zoo/R1/models_bin/face-detection-adas-0001/FP16/face-detection-adas-0001.bin | |
wget --no-check-certificate https://download.01.org/opencv/2019/open_model_zoo/R1/models_bin/face-detection-adas-0001/FP16/face-detection-adas-0001.xml | |
wget https://github.com/ageitgey/face_recognition/blob/master/examples/obama-1080p.jpg?raw=true -O obama.jpg | |
echo "Running the face detector test using the Neural Stick v2..." | |
./armv7l/Release/object_detection_sample_ssd -m face-detection-adas-0001.xml -d MYRIAD -i obama.jpg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment