openVino installation process

openVino installation process

Reference:
1. Openvino official website installation tutorial
2. openvino Chinese community

1. Download the openVino package

(1) openvino download l_openvino_toolkit_p_2021.2.185.tgz
(2) 解压

tar -zxvf l_openvino_toolkit_p_2021.2.185.tgz
cd l_openvino_toolkit_p_2021.2.185

(3) Install
install_GUI.sh: GUI interface installation (recommended)
install.sh: Command installation (enter...)
installation location, which can be changed

sudo ./install.sh   # sudo安装,默认安装在opt/intel
./install.sh        # /home/<USER>/intel/openvino_<version>/

2. Install external software dependencies

(1) Go to the install_dependencies directory:

cd /opt/intel/openvino_2021/install_dependencies
或者 
cd /home/<user>/intel/openvino_2021.2.185/install_dependencies/

(2) Run the script to download and install external software dependencies:

# 这个必须要sudo权限才行,无改
sudo -E ./install_openvino_dependencies.sh

3. Set environment variables

Several environment variables must be updated before the OpenVINO™ application can be compiled and run. Run the following script to temporarily set environment variables:

source /opt/intel/openvino_2021/bin/setupvars.sh

Or add in ./bashrc

vi ~/.bashrc
# 在文件中添加 source /opt/intel/openvino_2021/bin/setupvars.sh
source ~/.bashrc

The warning sound of the small partner with MobaXtrem:
Add ./bashrc as above on MobaXtrem. Because of the source command, mobaxtrem cannot upload or download files. It cannot be solved for the time being. All you need to receive and run each time:

source /opt/intel/openvino_2021/bin/setupvars.sh

4. Configure the model optimizer

Model Optimizer is a Python*-based command line tool for importing trained models from popular deep learning frameworks (such as Caffe*, TensorFlow*, Apache MXNet*, ONNX* and Kaldi*).

The model optimizer is a key component of the Intel OpenVINO release toolkit. If the model is not run through the Model Optimizer, the trained model cannot be inferred. When you run a pre-trained model through the model optimizer, your output is the intermediate representation (IR) of the network. The middle representation is a pair of files describing the entire model:

.xml: describe the network topology.
bin: include weights and bias binary data

(1) Configure all supported frameworks at the same time.
Install caffe, tf, tf2, mxnet and onnx, tf will conflict.

cd (install-path)/intel/openvino_2021/deployment_tools/model_optimizer/install_prerequisites
sudo ./install_prerequisites.sh

(2) Install the corresponding frame separately

#For Caffe:
sudo ./install_prerequisites_caffe.sh
#For TensorFlow 1.x:
sudo ./install_prerequisites_tf.sh
#For TensorFlow 2.x:
sudo ./install_prerequisites_tf2.sh
#For MXNet:
sudo ./install_prerequisites_mxnet.sh
#For ONNX:
sudo ./install_prerequisites_onnx.sh
#For Kaldi:
sudo ./install_prerequisites_kaldi.sh

5. Verify the demo

(1) Enter the demo script path

cd /(install-path)/intel/openvino_2021.2.185/deployment_tools/demo/
# 如果不添加在bashrc上,需要每次只需一次source
source /opt/intel/openvino_2021/bin/setupvars.sh
./demo_security_barrier_camera.sh

If your Linux system has a GUI interface, cv::imshow will automatically show a result after running, but if your server does not have a GUI interface, an error will be reported:

src/window_gtk.cpp:624:error:(-2:unspecified erreo) can't initialize GTK backend unfunction 'cvInitSystem'

Don’t panic:
in /home/dongyfy/intel/openvino_2021.2.185/deployment_tools/open_model_zoo/demos/security_barrier_camera_demo/main.cpp

// cv::imshow("Detection results", firstGridIt->second.getMat());
slog::info << "save image test.jpg " << slog::endl;
cv::imwrite("/(save-path)/test.jpg",firstGridIt->second.getMat());

Change cv::imshow to cv::imwrite.

If everything is over, openvino is installed successfully, good job.

Guess you like

Origin blog.csdn.net/weixin_40437821/article/details/112861251