cc2738330d9a04f44e84925fb5c60b25399d2d70
[platform/upstream/dldt.git] / inference-engine / README.md
1 # Build Inference Engine
2
3 ## Contents
4
5 - [Introduction](#introduction)
6 - [Build on Linux* Systems](#build-on-linux-systems)
7   - [Software Requirements](#software-requirements)
8   - [Build Steps](#build-steps)
9   - [Additional Build Options](#additional-build-options)
10 - [Build for Raspbian* Stretch OS](#build-for-raspbian-stretch-os)
11   - [Hardware Requirements](#hardware-requirements)
12   - [Native Compilation](#native-compilation)
13   - [Cross Compilation Using Docker*](#cross-compilation-using-docker)
14   - [Additional Build Options](#additional-build-options-1)
15 - [Build on Windows* Systems](#build-on-windows-systems)
16   - [Software Requirements](#software-requirements-1)
17   - [Build Steps](#build-steps-1)
18   - [Additional Build Options](#additional-build-options-2)
19   - [Building Inference Engine with Ninja* Build System](#building-inference-engine-with-ninja-build-system)
20 - [Build on macOS* Systems](#build-on-macos-systems)
21   - [Software Requirements](#software-requirements-2)
22   - [Build Steps](#build-steps-2)
23   - [Additional Build Options](#additional-build-options-3)
24 - [Use Custom OpenCV Builds for Inference Engine](#use-custom-opencv-builds-for-inference-engine)
25 - [(Optional) Additional Installation Steps for the Intel® Movidius™ Neural Compute Stick and Neural Compute Stick 2](#optional-additional-installation-steps-for-the-intel-movidius-neural-compute-stick-and-neural-compute-stick-2)
26   - [For Linux, Raspbian Stretch* OS](#for-linux-raspbian-stretch-os)
27   - [For Windows](#for-windows-1)
28 - [Next Steps](#next-steps)
29 - [Additional Resources](#additional-resources)
30
31 ## Introduction
32 The Inference Engine can infer models in different formats with various input and output formats.
33
34 The open source version of Inference Engine includes the following plugins:
35
36 | PLUGIN               | DEVICE TYPES |
37 | ---------------------| -------------|
38 | CPU plugin           | Intel® Xeon® with Intel® AVX2 and AVX512, Intel® Core™ Processors with Intel® AVX2, Intel® Atom® Processors with Intel® SSE |
39 | GPU plugin           | Intel® Processor Graphics, including Intel® HD Graphics and Intel® Iris® Graphics |
40 | GNA plugin           | Intel® Speech Enabling Developer Kit, Amazon Alexa* Premium Far-Field Developer Kit, Intel® Pentium® Silver processor J5005, Intel® Celeron® processor J4005, Intel® Core™ i3-8121U processor |
41 | MYRIAD plugin        | Intel® Movidius™ Neural Compute Stick powered by the Intel® Movidius™ Myriad™ 2, Intel® Neural Compute Stick 2 powered by the Intel® Movidius™ Myriad™ X |
42 | Heterogeneous plugin | Heterogeneous plugin enables computing for inference on one network on several Intel® devices. |
43
44 Inference Engine plugin for Intel® FPGA is distributed only in a binary form as a part of [Intel® Distribution of OpenVINO™](https://software.intel.com/en-us/openvino-toolkit).
45
46 ## Build on Linux* Systems
47
48 The software was validated on:
49 - Ubuntu\* 16.04 (64-bit) with default GCC\* 5.4.0
50 - CentOS\* 7.4 (64-bit) with default GCC\* 4.8.5
51
52 ### Software Requirements
53 - [CMake\*](https://cmake.org/download/) 3.5 or higher
54 - GCC\* 4.8 or higher to build the Inference Engine
55 - Python 2.7 or higher for Inference Engine Python API wrapper
56 - (Optional) [Install Intel® Graphics Compute Runtime for OpenCL™ Driver package 19.04.12237](https://github.com/intel/compute-runtime/releases/tag/19.04.12237).
57
58 ### Build Steps
59 1. Clone submodules:
60     ```sh
61     cd dldt/inference-engine
62     git submodule init
63     git submodule update --recursive
64     ```
65 2. Install build dependencies using the `install_dependencies.sh` script in the project root folder.
66 3. By default, the build enables the Inference Engine GPU plugin to infer models on your Intel® Processor Graphics. This requires you to [Install Intel® Graphics Compute Runtime for OpenCL™ Driver package 19.04.12237](https://github.com/intel/compute-runtime/releases/tag/19.04.12237) before running the build. If you don't want to use the GPU plugin, use the `-DENABLE_CLDNN=OFF` CMake build option and skip the installation of the Intel® Graphics Compute Runtime for OpenCL™ Driver.
67 4. Create a build folder:
68 ```sh
69   mkdir build && cd build
70 ```
71 5. Inference Engine uses a CMake-based build system. In the created `build` directory, run `cmake` to fetch project dependencies and create Unix makefiles, then run `make` to build the project:
72 ```sh
73   cmake -DCMAKE_BUILD_TYPE=Release ..
74   make --jobs=$(nproc --all)
75 ```
76
77 ### Additional Build Options
78
79 You can use the following additional build options:
80
81 - Internal JIT GEMM implementation is used by default.
82
83 - To switch to OpenBLAS\* implementation, use the `GEMM=OPENBLAS` option and `BLAS_INCLUDE_DIRS` and `BLAS_LIBRARIES` CMake options to specify path to the OpenBLAS headers and library. For example use the following options on CentOS\*: `-DGEMM=OPENBLAS -DBLAS_INCLUDE_DIRS=/usr/include/openblas -DBLAS_LIBRARIES=/usr/lib64/libopenblas.so.0`.
84
85 - To switch to the optimized MKL-ML\* GEMM implementation, use `-DGEMM=MKL` and `-DMKLROOT=<path_to_MKL>` CMake options to specify a path to unpacked MKL-ML with the `include` and `lib` folders. MKL-ML\* package can be downloaded from the [MKL-DNN repository](https://github.com/intel/mkl-dnn/releases/download/v0.19/mklml_lnx_2019.0.5.20190502.tgz).
86
87 - Threading Building Blocks (TBB) is used by default. To build the Inference Engine with OpenMP* threading, set the `-DTHREADING=OMP` option.
88
89 - Required versions of TBB and OpenCV packages are downloaded automatically by the CMake-based script. If you want to use the automatically downloaded packages but you already have installed TBB or OpenCV packages configured in your environment, you may need to clean the `TBBROOT` and `OpenCV_DIR` environment variables before running the `cmake` command, otherwise they won't be downloaded and the build may fail if incompatible versions were installed. 
90
91 - If the CMake-based build script can not find and download the OpenCV package that is supported on your platform, or if you want to use a custom build of the OpenCV library, refer to the [Use Custom OpenCV Builds](#use-custom-opencv-builds-for-inference-engine) section for details. 
92
93 - To build the Python API wrapper, use the `-DENABLE_PYTHON=ON` option. To specify an exact Python version, use the following options:
94    ```sh
95    -DPYTHON_EXECUTABLE=`which python3.7` \
96    -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.7m.so \
97    -DPYTHON_INCLUDE_DIR=/usr/include/python3.7
98    ```
99
100 - To switch off/on the CPU and GPU plugins, use the `cmake` options `-DENABLE_MKL_DNN=ON/OFF` and `-DENABLE_CLDNN=ON/OFF` respectively. 
101   
102 5. Adding to your project
103
104     For CMake projects, set an environment variable `InferenceEngine_DIR`:
105
106     ```sh
107     export InferenceEngine_DIR=/path/to/dldt/inference-engine/build/
108     ```
109
110     Then you can find Inference Engine by `find_package`:
111
112     ```cmake
113     find_package(InferenceEngine)
114
115     include_directories(${InferenceEngine_INCLUDE_DIRS})
116
117     target_link_libraries(${PROJECT_NAME} ${InferenceEngine_LIBRARIES} dl)
118     ```
119
120 ## Build for Raspbian Stretch* OS
121
122 > **NOTE**: Only the MYRIAD plugin is supported.
123
124 ### Hardware Requirements
125 * Raspberry Pi\* 2 or 3 with Raspbian\* Stretch OS (32-bit). Check that it's CPU supports ARMv7 instruction set (`uname -m` command returns `armv7l`).
126
127   > **NOTE**: Despite the Raspberry Pi\* CPU is ARMv8, 32-bit OS detects ARMv7 CPU instruction set. The default `gcc` compiler applies ARMv6 architecture flag for compatibility with lower versions of boards. For more information, run the `gcc -Q --help=target` command and refer to the description of the `-march=` option.
128
129 You can compile the Inference Engine for Raspberry Pi\* in one of the two ways:
130 * [Native Compilation](#native-compilation), which is the simplest way, but time-consuming
131 * [Cross Compilation Using Docker*](#cross-compilation-using-docker), which is the recommended way
132
133 ### Native Compilation
134 Native compilation of the Inference Engine is the most straightforward solution. However, it might take at least one hour to complete on Raspberry Pi\* 3.
135
136 1. Install dependencies:
137
138   ```bash
139   sudo apt-get update
140   sudo apt-get install -y git cmake libusb-1.0-0-dev
141   ```
142
143 2. Go to the `inference-engine` directory of the cloned `dldt` repository:
144
145   ```bash
146   cd dldt/inference-engine
147   ```
148
149 3. Initialize submodules:
150
151   ```bash
152   git submodule init
153   git submodule update --recursive
154   ```
155
156 4. Create a build folder:
157
158   ```bash
159   mkdir build && cd build
160   ```
161
162 5. Build the Inference Engine:
163
164   ```bash
165   cmake -DCMAKE_BUILD_TYPE=Release \
166         -DENABLE_SSE42=OFF \
167         -DTHREADING=SEQ \
168         -DENABLE_GNA=OFF .. && make
169   ```
170
171 ### Cross Compilation Using Docker*
172
173   This compilation was tested on the following configuration:
174
175   * Host: Ubuntu\* 16.04 (64-bit, Intel® Core™ i7-6700K CPU @ 4.00GHz × 8)
176   * Target: Raspbian\* Stretch (32-bit, ARMv7, Raspberry Pi\* 3)
177
178 1. Install Docker\*:
179
180   ```bash
181   sudo apt-get install -y docker.io
182   ```
183
184 2. Add a current user to `docker` group:
185
186   ```bash
187   sudo usermod -a -G docker $USER
188   ```
189
190   Log out and log in for this to take effect.
191
192 3. Create a directory named `ie_cross_armhf` and add a text file named `Dockerfile`
193 with the following content:
194
195   ```docker
196   FROM debian:stretch
197
198   USER root
199
200   RUN dpkg --add-architecture armhf && \
201       apt-get update && \
202       apt-get install -y --no-install-recommends \
203       build-essential \
204       crossbuild-essential-armhf \
205       git \
206       wget \
207       libusb-1.0-0-dev:armhf \
208       libgtk-3-dev:armhf \
209       libavcodec-dev:armhf \
210       libavformat-dev:armhf \
211       libswscale-dev:armhf \
212       libgstreamer1.0-dev:armhf \
213       libgstreamer-plugins-base1.0-dev:armhf \
214       libpython3-dev:armhf \
215       python3-pip
216       
217   RUN wget https://www.cmake.org/files/v3.14/cmake-3.14.3.tar.gz && \
218       tar xf cmake-3.14.3.tar.gz && \
219       (cd cmake-3.14.3 && ./bootstrap --parallel=$(nproc --all) && make --jobs=$(nproc --all) && make install) && \
220       rm -rf cmake-3.14.3 cmake-3.14.3.tar.gz
221
222   ```
223
224   It uses the Debian\* Stretch (Debian 9) OS for compilation because it is a base of the Raspbian\* Stretch.
225
226 4. Build a Docker\* image:
227
228   ```bash
229   docker image build -t ie_cross_armhf ie_cross_armhf
230   ```
231
232 5. Run Docker\* container with mounted source code folder from host:
233
234   ```bash
235   docker run -it -v /absolute/path/to/dldt:/dldt ie_cross_armhf /bin/bash
236   ```
237
238 6. While in the container:
239
240     1. Go to the `inference-engine` directory of the cloned `dldt` repository:
241
242       ```bash
243       cd dldt/inference-engine
244       ```
245
246     2. Create a build folder:
247
248       ```bash
249       mkdir build && cd build
250       ```
251
252     3. Build the Inference Engine:
253
254       ```bash
255       cmake -DCMAKE_BUILD_TYPE=Release \
256           -DCMAKE_TOOLCHAIN_FILE="../cmake/arm.toolchain.cmake" \
257           -DTHREADS_PTHREAD_ARG="-pthread" \
258           -DENABLE_SSE42=OFF \
259           -DTHREADING=SEQ \
260           -DENABLE_GNA=OFF .. && make --jobs=$(nproc --all)
261       ```
262
263 7. Press "Ctrl"+"D" to exit from Docker\*. You can find the resulting binaries in the `dldt/inference-engine/bin/armv7l/` directory and the OpenCV* installation in the `dldt/inference-engine/temp`.
264    
265 >**NOTE**: Native applications that link to cross-compiled Inference Engine library require an extra compilation flag `-march=armv7-a`.
266
267 ### Additional Build Options
268
269 You can use the following additional build options:
270
271 - Required versions of OpenCV packages are downloaded automatically by the CMake-based script. If you want to use the automatically downloaded packages but you already have installed OpenCV packages configured in your environment, you may need to clean the `OpenCV_DIR` environment variable before running the `cmake` command, otherwise they won't be downloaded and the build may fail if incompatible versions were installed. 
272
273 - If the CMake-based build script can not find and download the OpenCV package that is supported on your platform, or if you want to use a custom build of the OpenCV library, refer to the [Use Custom OpenCV Builds](#use-custom-opencv-builds-for-inference-engine) section for details.
274
275 - To build Python API wrapper, install `libpython3-dev:armhf` and `python3-pip` packages using `apt-get`, then install `numpy` and `cython` python modules using `pip3` command and add the following cmake options:
276 ```sh
277   -DENABLE_PYTHON=ON \
278   -DPYTHON_EXECUTABLE=/usr/bin/python3.5 \
279   -DPYTHON_LIBRARY=/usr/lib/arm-linux-gnueabihf/libpython3.5m.so \
280   -DPYTHON_INCLUDE_DIR=/usr/include/python3.5
281 ```
282
283 ## Build on Windows* Systems
284
285 The software was validated on:
286 - Microsoft\* Windows\* 10 (64-bit) with Visual Studio 2017 and Intel® C++ Compiler 2018 Update 3
287
288 ### Software Requirements
289 - [CMake\*](https://cmake.org/download/) 3.5 or higher
290 - [OpenBLAS\*](https://sourceforge.net/projects/openblas/files/v0.2.14/OpenBLAS-v0.2.14-Win64-int64.zip/download) and [mingw64\* runtime dependencies](https://sourceforge.net/projects/openblas/files/v0.2.14/mingw64_dll.zip/download).
291 - [Intel® C++ Compiler](https://software.intel.com/en-us/intel-parallel-studio-xe) 18.0 to build the Inference Engine on Windows.
292 - (Optional) [Intel® Graphics Driver for Windows* [25.20] driver package](https://downloadcenter.intel.com/download/28646/Intel-Graphics-Windows-10-DCH-Drivers?product=80939).
293 - Python 3.4 or higher for Inference Engine Python API wrapper
294
295 ### Build Steps
296 1. Clone submodules:
297     ```sh
298     git submodule init
299     git submodule update --recursive
300     ```
301 2. Download and install [Intel® C++ Compiler](https://software.intel.com/en-us/intel-parallel-studio-xe) 18.0
302 3. Install OpenBLAS:
303     1. Download [OpenBLAS\*](https://sourceforge.net/projects/openblas/files/v0.2.14/OpenBLAS-v0.2.14-Win64-int64.zip/download)
304     2. Unzip the downloaded package to a directory on your machine. In this document, this directory is referred to as `<OPENBLAS_DIR>`.
305 4. By default, the build enables the Inference Engine GPU plugin to infer models on your Intel® Processor Graphics. This requires you to [download and install the Intel® Graphics Driver for Windows* [25.20] driver package](https://downloadcenter.intel.com/download/28646/Intel-Graphics-Windows-10-DCH-Drivers?product=80939) before running the build. If you don't want to use the GPU plugin, use the `-DENABLE_CLDNN=OFF` CMake build option and skip the installation of the Intel® Graphics Driver.    
306 5. Create build directory:
307     ```sh
308     mkdir build
309     ```
310 6. In the `build` directory, run `cmake` to fetch project dependencies and generate a Visual Studio solution:
311 ```sh
312 cd build
313 cmake -G "Visual Studio 15 2017 Win64" -T "Intel C++ Compiler 18.0" ^
314     -DCMAKE_BUILD_TYPE=Release ^
315     -DICCLIB="C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018\windows\compiler\lib" ..
316 ```
317
318 7. Build generated solution in Visual Studio 2017 or run `cmake --build . --config Release` to build from the command line.
319
320 8. Before running the samples, add paths to TBB and OpenCV binaries used for the build to the `%PATH%` environment variable. By default, TBB binaries are downloaded by the CMake-based script to the `<dldt_repo>/inference-engine/temp/tbb/lib` folder, OpenCV binaries - to the `<dldt_repo>/inference-engine/temp/opencv_4.1.0/bin` folder.
321
322 ### Additional Build Options
323
324 - Internal JIT GEMM implementation is used by default.
325 - To switch to OpenBLAS GEMM implementation, use the `-DGEMM=OPENBLAS` CMake option and specify path to OpenBLAS using the `-DBLAS_INCLUDE_DIRS=<OPENBLAS_DIR>\include` and `-DBLAS_LIBRARIES=<OPENBLAS_DIR>\lib\libopenblas.dll.a` options. Prebuilt OpenBLAS\* package can be downloaded [here](https://sourceforge.net/projects/openblas/files/v0.2.14/OpenBLAS-v0.2.14-Win64-int64.zip/download). mingw64* runtime dependencies can be downloaded [here](https://sourceforge.net/projects/openblas/files/v0.2.14/mingw64_dll.zip/download).
326 - To switch to the optimized MKL-ML\* GEMM implementation, use the `-DGEMM=MKL` and `-DMKLROOT=<path_to_MKL>` CMake options to specify a path to unpacked MKL-ML with the `include` and `lib` folders. MKL-ML\* package can be downloaded from the [MKL-DNN repository](https://github.com/intel/mkl-dnn/releases/download/v0.19/mklml_win_2019.0.5.20190502.zip).
327
328 - Threading Building Blocks (TBB) is used by default. To build the Inference Engine with OpenMP* threading, set the `-DTHREADING=OMP` option.
329
330 - Required versions of TBB and OpenCV packages are downloaded automatically by the CMake-based script. If you want to use the automatically downloaded packages but you already have installed TBB or OpenCV packages configured in your environment, you may need to clean the `TBBROOT` and `OpenCV_DIR` environment variables before running the `cmake` command, otherwise they won't be downloaded and the build may fail if incompatible versions were installed.
331
332 - If the CMake-based build script can not find and download the OpenCV package that is supported on your platform, or if you want to use a custom build of the OpenCV library, refer to the [Use Custom OpenCV Builds](#use-custom-opencv-builds-for-inference-engine) section for details.
333
334 - To switch off/on the CPU and GPU plugins, use the `cmake` options `-DENABLE_MKL_DNN=ON/OFF` and `-DENABLE_CLDNN=ON/OFF` respectively.
335
336 - To build the Python API wrapper, use the `-DENABLE_PYTHON=ON` option. To specify an exact Python version, use the following options:
337    ```sh
338    -DPYTHON_EXECUTABLE="C:\Program Files\Python37\python.exe" ^
339    -DPYTHON_LIBRARY="C:\Program Files\Python37\libs\python37.lib" ^
340    -DPYTHON_INCLUDE_DIR="C:\Program Files\Python37\include"
341    ```
342
343 ### Building Inference Engine with Ninja* Build System
344
345 ```sh
346 call "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018\windows\bin\ipsxe-comp-vars.bat" intel64 vs2017
347 set CXX=icl
348 set CC=icl
349 :: clean TBBROOT value set by ipsxe-comp-vars.bat, required TBB package will be downloaded by dldt cmake script
350 set TBBROOT=
351 cmake -G Ninja -Wno-dev -DCMAKE_BUILD_TYPE=Release ..
352 cmake --build . --config Release
353 ```
354
355 ## Build on macOS* Systems
356
357 > **NOTE**: The current version of the OpenVINO™ toolkit for macOS* supports inference on Intel CPUs only.
358
359 The software was validated on:
360 - macOS\* 10.14, 64-bit
361
362 ### Software Requirements
363 - [CMake\*](https://cmake.org/download/) 3.5 or higher
364 - Clang\* compiler from Xcode\* 10.1
365 - Python\* 3.4 or higher for the Inference Engine Python API wrapper
366
367 ### Build Steps
368 1. Clone submodules:
369     ```sh
370     cd dldt/inference-engine
371     git submodule init
372     git submodule update --recursive
373     ```
374 2. Install build dependencies using the `install_dependencies.sh` script in the project root folder.
375 3. Create a build folder:
376 ```sh
377   mkdir build
378 ```
379 4. Inference Engine uses a CMake-based build system. In the created `build` directory, run `cmake` to fetch project dependencies and create Unix makefiles, then run `make` to build the project:
380 ```sh
381   cmake -DCMAKE_BUILD_TYPE=Release ..
382   make --jobs=$(nproc --all)
383 ```
384 ### Additional Build Options
385
386 You can use the following additional build options:
387 - Internal JIT GEMM implementation is used by default.
388 - To switch to the optimized MKL-ML\* GEMM implementation, use `-DGEMM=MKL` and `-DMKLROOT=<path_to_MKL>` cmake options to specify a path to unpacked MKL-ML with the `include` and `lib` folders. MKL-ML\* package can be downloaded [here](https://github.com/intel/mkl-dnn/releases/download/v0.19/mklml_mac_2019.0.5.20190502.tgz)
389
390 - Threading Building Blocks (TBB) is used by default. To build the Inference Engine with OpenMP* threading, set the `-DTHREADING=OMP` option.
391
392 - Required versions of TBB and OpenCV packages are downloaded automatically by the CMake-based script. If you want to use the automatically downloaded packages but you already have installed TBB or OpenCV packages configured in your environment, you may need to clean the `TBBROOT` and `OpenCV_DIR` environment variables before running the `cmake` command, otherwise they won't be downloaded and the build may fail if incompatible versions were installed.
393
394 - If the CMake-based build script can not find and download the OpenCV package that is supported on your platform, or if you want to use a custom build of the OpenCV library, refer to the [Use Custom OpenCV Builds](#use-custom-opencv-builds-for-inference-engine) section for details.
395
396 - To build the Python API wrapper, use the `-DENABLE_PYTHON=ON` option. To specify an exact Python version, use the following options:
397 ```sh
398   -DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 \
399   -DPYTHON_LIBRARY=/Library/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7m.dylib \
400   -DPYTHON_INCLUDE_DIR=/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m
401 ```
402
403 ## Use Custom OpenCV Builds for Inference Engine
404
405 > **NOTE**: The recommended and tested version of OpenCV is 4.1. The minimum supported version is 3.4.0.  
406
407 Required versions of OpenCV packages are downloaded automatically during the building Inference Engine library. If the build script can not find and download the OpenCV package that is supported on your platform, you can use one of the following options:
408
409 * Download the most suitable version from the list of available pre-build packages from [https://download.01.org/opencv/2019/openvinotoolkit](https://download.01.org/opencv/2019/openvinotoolkit) from the `<release_version>/inference_engine` directory.
410
411 * Use a system provided OpenCV package (e.g with running the `apt install libopencv-dev` command). The following modules must be enabled: `imgcodecs`, `videoio`, `highgui`.
412
413 * Get the OpenCV package using a package manager: pip, conda, conan etc. The package must have the development components included (header files and CMake scripts).
414
415 * Build OpenCV from source using the [build instructions](https://docs.opencv.org/master/df/d65/tutorial_table_of_content_introduction.html) on the OpenCV site. 
416   
417 After you got the built OpenCV library, perform the following preparation steps before running the Inference Engine build:
418   
419 1. Set the `OpenCV_DIR` environment variable to the directory where the `OpenCVConfig.cmake` file of you custom OpenCV build is located.
420 2. Disable the package automatic downloading with using the `-DENABLE_OPENCV=OFF` option for CMake-based build script for Inference Engine.
421
422 ## (Optional) Additional Installation Steps for the Intel® Movidius™ Neural Compute Stick and Neural Compute Stick 2
423
424 > **NOTE**: These steps are only required if you want to perform inference on Intel® Movidius™ Neural Compute Stick or the Intel® Neural Compute Stick 2 using the Inference Engine MYRIAD Plugin. See also [Intel® Neural Compute Stick 2 Get Started](https://software.intel.com/en-us/neural-compute-stick/get-started)
425
426 ### For Linux, Raspbian\* Stretch OS
427
428 1. Add the current Linux user to the `users` group:
429 ```sh
430 sudo usermod -a -G users "$(whoami)"
431 ```
432 Log out and log in for it to take effect.
433
434 2. To perform inference on Intel® Movidius™ Neural Compute Stick and Intel® Neural Compute Stick 2, install the USB rules as follows:
435 ```sh
436 cat <<EOF > 97-myriad-usbboot.rules
437 SUBSYSTEM=="usb", ATTRS{idProduct}=="2150", ATTRS{idVendor}=="03e7", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1"
438 SUBSYSTEM=="usb", ATTRS{idProduct}=="2485", ATTRS{idVendor}=="03e7", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1"
439 SUBSYSTEM=="usb", ATTRS{idProduct}=="f63b", ATTRS{idVendor}=="03e7", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1"
440 EOF
441 ```
442 ```sh
443 sudo cp 97-myriad-usbboot.rules /etc/udev/rules.d/
444 ```
445 ```sh
446 sudo udevadm control --reload-rules
447 ```
448 ```sh
449 sudo udevadm trigger
450 ```
451 ```sh
452 sudo ldconfig
453 ```
454 ```sh
455 rm 97-myriad-usbboot.rules
456 ```
457
458 ### For Windows
459
460 For Intel® Movidius™ Neural Compute Stick and Intel® Neural Compute Stick 2, install the Movidius™ VSC driver:
461 1. Go to the `<DLDT_ROOT_DIR>/inference-engine/thirdparty/movidius/MovidiusDriver` directory, where the `DLDT_ROOT_DIR` is the directory to which the DLDT repository was cloned. 
462 2. Right click on the `Movidius_VSC_Device.inf` file and choose **Install** from the pop up menu.
463
464 You have installed the driver for your Intel® Movidius™ Neural Compute Stick or Intel® Neural Compute Stick 2.
465
466 ## Next Steps
467
468 Congratulations, you have built the Inference Engine. To get started with the OpenVINO™ DLDT, proceed to the Get Started guides:
469
470 * [Get Started with Deep Learning Deployment Toolkit on Linux*](../get-started-linux.md)
471
472 ## Additional Resources
473
474 * [OpenVINO™ Release Notes](https://software.intel.com/en-us/articles/OpenVINO-RelNotes)
475 * [Introduction to Intel® Deep Learning Deployment Toolkit](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Introduction.html)
476 * [Inference Engine Samples Overview](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Samples_Overview.html)
477 * [Inference Engine Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Deep_Learning_Inference_Engine_DevGuide.html)
478 * [Model Optimizer Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html)
479
480 ---
481 \* Other names and brands may be claimed as the property of others.