Compare commits
72 Commits
2022.1.0.d
...
2021.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f557dca475 | ||
|
|
185fe44080 | ||
|
|
2a1f43a64a | ||
|
|
f19d1d16f0 | ||
|
|
d98beb796b | ||
|
|
915858198e | ||
|
|
8d4545e1b2 | ||
|
|
e45272c714 | ||
|
|
fe3dc7d176 | ||
|
|
9c297a3174 | ||
|
|
f9c692b885 | ||
|
|
bbce6f5b3a | ||
|
|
2395f9f120 | ||
|
|
c88f838dfa | ||
|
|
ce6ce23eec | ||
|
|
6a32854ec4 | ||
|
|
bece22ac67 | ||
|
|
76606ba2fc | ||
|
|
1c538af62f | ||
|
|
3a720d188b | ||
|
|
70f619b5eb | ||
|
|
0dbaf078d8 | ||
|
|
3c5fa6f4b8 | ||
|
|
31ccf354dc | ||
|
|
bf9b649cdf | ||
|
|
84518964ba | ||
|
|
0b4846cfcc | ||
|
|
950388d9e8 | ||
|
|
f828b16f40 | ||
|
|
261bd3de6b | ||
|
|
31b3e356ab | ||
|
|
607982e79c | ||
|
|
c083e5b146 | ||
|
|
444301a1d6 | ||
|
|
f56ba0daa9 | ||
|
|
cd101085d7 | ||
|
|
2c79f74579 | ||
|
|
d7463eb216 | ||
|
|
74b13a0f74 | ||
|
|
1c8188908e | ||
|
|
86e39a6775 | ||
|
|
2645421df6 | ||
|
|
9b1961502b | ||
|
|
2023a7cd81 | ||
|
|
105cd18d0b | ||
|
|
92d19291c8 | ||
|
|
191e9f7f72 | ||
|
|
126c2600bb | ||
|
|
b922800ae2 | ||
|
|
272b17f5d9 | ||
|
|
b89e7d69dd | ||
|
|
528e6f9328 | ||
|
|
ebf009d1a1 | ||
|
|
d604a03ac0 | ||
|
|
e7e82b9eb7 | ||
|
|
f5bd16990e | ||
|
|
488f2dd916 | ||
|
|
79853baf28 | ||
|
|
6c5e0cfaa4 | ||
|
|
d239b2584c | ||
|
|
28a733b771 | ||
|
|
7bba2a9542 | ||
|
|
9b7e22f49a | ||
|
|
a4dc5c89f3 | ||
|
|
fef1803a86 | ||
|
|
e94393df10 | ||
|
|
2e4f46e1fd | ||
|
|
177906b99a | ||
|
|
6d38488462 | ||
|
|
db5aa551af | ||
|
|
6d90eedbd2 | ||
|
|
a91e256d27 |
118
.ci/azure/linux.yml
Normal file
118
.ci/azure/linux.yml
Normal file
@@ -0,0 +1,118 @@
|
||||
jobs:
|
||||
- job: Lin
|
||||
# About 150% of total time
|
||||
timeoutInMinutes: 85
|
||||
pool:
|
||||
name: LIN_VMSS_VENV_F8S_WU2
|
||||
variables:
|
||||
system.debug: true
|
||||
WORKERS_NUMBER: 8
|
||||
BUILD_TYPE: Release
|
||||
REPO_DIR: $(Build.Repository.LocalPath)
|
||||
WORK_DIR: $(Pipeline.Workspace)/_w
|
||||
BUILD_DIR: $(WORK_DIR)/build
|
||||
BIN_DIR: $(REPO_DIR)/bin/intel64/$(BUILD_TYPE)
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
lfs: false
|
||||
submodules: recursive
|
||||
path: openvino
|
||||
- script: |
|
||||
curl -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2019-06-01"
|
||||
whoami
|
||||
uname -a
|
||||
which python3
|
||||
python3 --version
|
||||
gcc --version
|
||||
lsb_release
|
||||
env
|
||||
cat /proc/cpuinfo
|
||||
cat /proc/meminfo
|
||||
vmstat -s
|
||||
df
|
||||
displayName: 'System info'
|
||||
- script: |
|
||||
rm -rf $(WORK_DIR) ; mkdir $(WORK_DIR)
|
||||
rm -rf $(BUILD_DIR) ; mkdir $(BUILD_DIR)
|
||||
displayName: 'Make dir'
|
||||
- script: |
|
||||
sudo apt --assume-yes install libusb-1.0-0-dev
|
||||
python3 -m pip install -r ./inference-engine/ie_bridges/python/requirements.txt
|
||||
# For running Python API tests
|
||||
python3 -m pip install -r ./inference-engine/ie_bridges/python/src/requirements-dev.txt
|
||||
displayName: 'Install dependencies'
|
||||
- script: |
|
||||
wget https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-linux.zip
|
||||
unzip ninja-linux.zip
|
||||
sudo cp -v ninja /usr/local/bin/
|
||||
workingDirectory: $(WORK_DIR)
|
||||
displayName: 'Install Ninja'
|
||||
- task: CMake@1
|
||||
inputs:
|
||||
# CMake must get Python 3.x version by default
|
||||
cmakeArgs: -GNinja -DVERBOSE_BUILD=ON -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_PYTHON=ON -DPYTHON_EXECUTABLE=/usr/bin/python3.6 -DENABLE_TESTS=ON $(REPO_DIR)
|
||||
workingDirectory: $(BUILD_DIR)
|
||||
- script: ninja
|
||||
workingDirectory: $(BUILD_DIR)
|
||||
displayName: 'Build Lin'
|
||||
- script: ls -alR $(REPO_DIR)/bin/
|
||||
displayName: 'List files'
|
||||
- script: $(BIN_DIR)/unit-test --gtest_print_time=1 --gtest_filter=-backend_api.config_unsupported:*IE_GPU*
|
||||
displayName: 'nGraph UT'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/InferenceEngineUnitTests --gtest_print_time=1
|
||||
displayName: 'IE UT old'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/ieUnitTests
|
||||
displayName: 'IE UT'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/cpuUnitTests
|
||||
displayName: 'CPU UT'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/gnaUnitTests
|
||||
displayName: 'GNA UT'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/vpuUnitTests
|
||||
displayName: 'VPU UT'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/ieFuncTests
|
||||
displayName: 'IE FuncTests'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/cpuFuncTests --gtest_print_time=1
|
||||
displayName: 'CPU FuncTests'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/MklDnnBehaviorTests
|
||||
displayName: 'MklDnnBehaviorTests'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
git clone https://github.com/openvinotoolkit/testdata.git
|
||||
git clone https://github.com/google/gtest-parallel.git
|
||||
workingDirectory: $(WORK_DIR)
|
||||
displayName: 'Clone testdata & gtest-parallel'
|
||||
- script: |
|
||||
export DATA_PATH=$(WORK_DIR)/testdata
|
||||
export MODELS_PATH=$(WORK_DIR)/testdata
|
||||
python3 $(WORK_DIR)/gtest-parallel/gtest-parallel $(BIN_DIR)/MklDnnFunctionalTests --workers=$(WORKERS_NUMBER) --print_test_times --dump_json_test_results=MklDnnFunctionalTests.json -- --gtest_print_time=1
|
||||
workingDirectory: $(WORK_DIR)
|
||||
displayName: 'MklDnnFunctionalTests'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
export DATA_PATH=$(WORK_DIR)/testdata
|
||||
export MODELS_PATH=$(WORK_DIR)/testdata
|
||||
$(BIN_DIR)/InferenceEngineCAPITests
|
||||
displayName: 'IE CAPITests'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
export DATA_PATH=$(WORK_DIR)/testdata
|
||||
export MODELS_PATH=$(WORK_DIR)/testdata
|
||||
export LD_LIBRARY_PATH=$(BIN_DIR)/lib
|
||||
export PYTHONPATH=$(BIN_DIR)/lib/python_api/python3.6
|
||||
env
|
||||
cd $(REPO_DIR)/inference-engine/ie_bridges/python/tests
|
||||
pytest
|
||||
displayName: 'Python API Tests'
|
||||
continueOnError: false
|
||||
enabled: false
|
||||
|
||||
102
.ci/azure/mac.yml
Normal file
102
.ci/azure/mac.yml
Normal file
@@ -0,0 +1,102 @@
|
||||
jobs:
|
||||
- job: Mac
|
||||
# About 200% of total time (perfomace of Mac hosts is unstable)
|
||||
timeoutInMinutes: 180
|
||||
pool:
|
||||
vmImage: 'macOS-10.15'
|
||||
variables:
|
||||
system.debug: true
|
||||
WORKERS_NUMBER: 3
|
||||
BUILD_TYPE: Release
|
||||
REPO_DIR: $(Build.Repository.LocalPath)
|
||||
WORK_DIR: $(Pipeline.Workspace)/_w
|
||||
BUILD_DIR: $(WORK_DIR)/build
|
||||
BIN_DIR: $(REPO_DIR)/bin/intel64/$(BUILD_TYPE)
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
lfs: false
|
||||
submodules: recursive
|
||||
path: openvino
|
||||
- script: |
|
||||
whoami
|
||||
uname -a
|
||||
which python3
|
||||
python3 --version
|
||||
gcc --version
|
||||
xcrun --sdk macosx --show-sdk-version
|
||||
env
|
||||
sysctl -a
|
||||
displayName: 'System info'
|
||||
- script: |
|
||||
rm -rf $(WORK_DIR) ; mkdir $(WORK_DIR)
|
||||
rm -rf $(BUILD_DIR) ; mkdir $(BUILD_DIR)
|
||||
displayName: 'Make dir'
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
versionSpec: '3.7'
|
||||
- script: |
|
||||
brew install cython
|
||||
brew install automake
|
||||
displayName: 'Install dependencies'
|
||||
- script: brew install ninja
|
||||
displayName: 'Install Ninja'
|
||||
- script: |
|
||||
export PATH="/usr/local/opt/cython/bin:$PATH"
|
||||
export CC=gcc
|
||||
export CXX=g++
|
||||
# Disable errors with Ninja
|
||||
export CXXFLAGS="-Wno-error=unused-command-line-argument"
|
||||
export CFLAGS="-Wno-error=unused-command-line-argument"
|
||||
cmake -GNinja -DVERBOSE_BUILD=ON -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_PYTHON=ON -DENABLE_TESTS=ON $(REPO_DIR)
|
||||
workingDirectory: $(BUILD_DIR)
|
||||
displayName: 'CMake'
|
||||
- script: ninja
|
||||
workingDirectory: $(BUILD_DIR)
|
||||
displayName: 'Build Mac'
|
||||
- script: ls -alR $(REPO_DIR)/bin/
|
||||
displayName: 'List files'
|
||||
- script: $(BIN_DIR)/unit-test --gtest_print_time=1 --gtest_filter=-backend_api.config_unsupported:*IE_GPU*:IE_CPU.onnx_model_sigmoid
|
||||
displayName: 'nGraph UT'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/InferenceEngineUnitTests --gtest_print_time=1
|
||||
displayName: 'IE UT old'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/ieUnitTests
|
||||
displayName: 'IE UT'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/cpuUnitTests
|
||||
displayName: 'CPU UT'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/vpuUnitTests
|
||||
displayName: 'VPU UT'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/ieFuncTests
|
||||
displayName: 'IE FuncTests'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/cpuFuncTests --gtest_print_time=1
|
||||
displayName: 'CPU FuncTests'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/MklDnnBehaviorTests
|
||||
displayName: 'MklDnnBehaviorTests'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
git clone https://github.com/openvinotoolkit/testdata.git
|
||||
git clone https://github.com/google/gtest-parallel.git
|
||||
workingDirectory: $(WORK_DIR)
|
||||
displayName: 'Clone testdata & gtest-parallel'
|
||||
- script: |
|
||||
export DATA_PATH=$(WORK_DIR)/testdata
|
||||
export MODELS_PATH=$(WORK_DIR)/testdata
|
||||
python3 $(WORK_DIR)/gtest-parallel/gtest-parallel $(BIN_DIR)/MklDnnFunctionalTests --workers=$(WORKERS_NUMBER) --print_test_times --dump_json_test_results=MklDnnFunctionalTests.json --gtest_filter=-smoke_MobileNet/ModelTransformationsTest.LPT/mobilenet_v2_tf_depthwise_batch1_inPluginDisabled_inTestDisabled_asymmetric* -- --gtest_print_time=1
|
||||
workingDirectory: $(WORK_DIR)
|
||||
displayName: 'MklDnnFunctionalTests'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
export DATA_PATH=$(WORK_DIR)/testdata
|
||||
export MODELS_PATH=$(WORK_DIR)/testdata
|
||||
$(BIN_DIR)/InferenceEngineCAPITests
|
||||
displayName: 'IE CAPITests'
|
||||
continueOnError: false
|
||||
|
||||
133
.ci/azure/windows.yml
Normal file
133
.ci/azure/windows.yml
Normal file
@@ -0,0 +1,133 @@
|
||||
jobs:
|
||||
- job: Win
|
||||
# About 150% of total time
|
||||
timeoutInMinutes: 120
|
||||
pool:
|
||||
name: WIN_VMSS_VENV_F8S_WU2
|
||||
variables:
|
||||
system.debug: true
|
||||
WORKERS_NUMBER: 8
|
||||
BUILD_TYPE: Release
|
||||
REPO_DIR: $(Build.Repository.LocalPath)
|
||||
WORK_DIR: $(Pipeline.Workspace)\_w
|
||||
BUILD_DIR: D:\build
|
||||
BIN_DIR: $(REPO_DIR)\bin\intel64
|
||||
MSVS_VARS_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
|
||||
MSVC_COMPILER_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.24.28314\bin\Hostx64\x64\cl.exe
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
lfs: false
|
||||
submodules: recursive
|
||||
path: openvino
|
||||
- script: |
|
||||
powershell -command "Invoke-RestMethod -Headers @{\"Metadata\"=\"true\"} -Method GET -Uri http://169.254.169.254/metadata/instance/compute?api-version=2019-06-01 | format-custom"
|
||||
where python3
|
||||
where python
|
||||
python --version
|
||||
wmic computersystem get TotalPhysicalMemory
|
||||
wmic cpu list
|
||||
wmic logicaldisk get description,name
|
||||
wmic VOLUME list
|
||||
set
|
||||
displayName: 'System info'
|
||||
- script: |
|
||||
rd /Q /S $(WORK_DIR) & mkdir $(WORK_DIR)
|
||||
rd /Q /S $(BUILD_DIR) & mkdir $(BUILD_DIR)
|
||||
displayName: 'Make dir'
|
||||
- script: |
|
||||
certutil -urlcache -split -f https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-win.zip ninja-win.zip
|
||||
powershell -command "Expand-Archive -Force ninja-win.zip"
|
||||
workingDirectory: $(WORK_DIR)
|
||||
displayName: Install Ninja
|
||||
- script: |
|
||||
certutil -urlcache -split -f https://incredibuilddiag1wu2.blob.core.windows.net/incredibuild/IBSetupConsole_9_5_0.exe IBSetupConsole_9_5_0.exe
|
||||
call IBSetupConsole_9_5_0.exe /Install /Components=Agent,oneuse /Coordinator=11.1.0.4 /AGENT:OPENFIREWALL=ON /AGENT:AUTOSELECTPORTS=ON /ADDTOPATH=ON /AGENT:INSTALLADDINS=OFF
|
||||
workingDirectory: $(WORK_DIR)
|
||||
displayName: Install IncrediBuild
|
||||
- script: |
|
||||
echo Stop IncrediBuild_Agent && net stop IncrediBuild_Agent
|
||||
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Xoreax\IncrediBuild\Builder /f /v LastEnabled /d 0 && echo Start IncrediBuild_Agent && net start IncrediBuild_Agent
|
||||
displayName: Start IncrediBuild
|
||||
- script: |
|
||||
set PATH=$(WORK_DIR)\ninja-win;%PATH%
|
||||
call "$(MSVS_VARS_PATH)" && cmake -GNinja -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_TESTS=ON -DCMAKE_C_COMPILER:PATH="$(MSVC_COMPILER_PATH)" -DCMAKE_CXX_COMPILER:PATH="$(MSVC_COMPILER_PATH)" $(REPO_DIR)
|
||||
workingDirectory: $(BUILD_DIR)
|
||||
displayName: 'CMake'
|
||||
- script: |
|
||||
set PATH=$(WORK_DIR)\ninja-win;%PATH%
|
||||
call "$(MSVS_VARS_PATH)" && "C:\Program Files (x86)\IncrediBuild\BuildConsole.exe" /COMMAND="ninja" /MaxCPUS=40
|
||||
workingDirectory: $(BUILD_DIR)
|
||||
displayName: 'Build Win'
|
||||
- script: echo Stop IncrediBuild_Agent && net stop IncrediBuild_Agent
|
||||
displayName: Stop IncrediBuild
|
||||
continueOnError: true
|
||||
- script: dir $(REPO_DIR)\bin\ /s /b
|
||||
displayName: 'List files'
|
||||
- script: |
|
||||
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;%PATH%
|
||||
$(BIN_DIR)\unit-test --gtest_print_time=1 --gtest_filter=-backend_api.config_unsupported:*IE_GPU*
|
||||
displayName: 'nGraph UT'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;%PATH%
|
||||
$(BIN_DIR)\InferenceEngineUnitTests --gtest_print_time=1
|
||||
displayName: 'IE UT old'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;%PATH%
|
||||
$(BIN_DIR)\ieUnitTests
|
||||
displayName: 'IE UT'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;%PATH%
|
||||
$(BIN_DIR)\cpuUnitTests
|
||||
displayName: 'CPU UT'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;%PATH%
|
||||
$(BIN_DIR)\gnaUnitTests
|
||||
displayName: 'GNA UT'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;%PATH%
|
||||
$(BIN_DIR)\vpuUnitTests
|
||||
displayName: 'VPU UT'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;%PATH%
|
||||
$(BIN_DIR)\ieFuncTests
|
||||
displayName: 'IE FuncTests'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;%PATH%
|
||||
$(BIN_DIR)\cpuFuncTests --gtest_print_time=1
|
||||
displayName: 'CPU FuncTests'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;%PATH%
|
||||
$(BIN_DIR)\MklDnnBehaviorTests
|
||||
displayName: 'MklDnnBehaviorTests'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
git clone https://github.com/openvinotoolkit/testdata.git
|
||||
git clone https://github.com/google/gtest-parallel.git
|
||||
workingDirectory: $(BUILD_DIR)
|
||||
displayName: 'Clone testdata & gtest-parallel'
|
||||
# Add for gtest-parallel, it hangs now (CVS-33386)
|
||||
#python $(BUILD_DIR)\gtest-parallel\gtest-parallel $(BIN_DIR)\MklDnnFunctionalTests --workers=$(WORKERS_NUMBER) --print_test_times --dump_json_test_results=MklDnnFunctionalTests.json -- --gtest_print_time=1
|
||||
- script: |
|
||||
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;$(REPO_DIR)\inference-engine\temp\opencv_4.5.0\opencv\bin;%PATH%
|
||||
set DATA_PATH=$(BUILD_DIR)\testdata
|
||||
set MODELS_PATH=$(BUILD_DIR)\testdata
|
||||
$(BIN_DIR)\MklDnnFunctionalTests --gtest_print_time=1
|
||||
displayName: 'MklDnnFunctionalTests'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;$(REPO_DIR)\inference-engine\temp\opencv_4.5.0\opencv\bin;%PATH%
|
||||
set DATA_PATH=$(BUILD_DIR)\testdata
|
||||
set MODELS_PATH=$(BUILD_DIR)\testdata
|
||||
$(BIN_DIR)\InferenceEngineCAPITests
|
||||
displayName: 'IE CAPITests'
|
||||
continueOnError: false
|
||||
@@ -79,5 +79,5 @@ ENV NGRAPH_CPP_BUILD_PATH=/openvino/dist
|
||||
ENV LD_LIBRARY_PATH=/openvino/dist/lib
|
||||
ENV NGRAPH_ONNX_IMPORT_ENABLE=TRUE
|
||||
ENV PYTHONPATH=/openvino/bin/intel64/Release/lib/python_api/python3.8:${PYTHONPATH}
|
||||
RUN git clone --recursive https://github.com/pybind/pybind11.git
|
||||
RUN git clone --recursive https://github.com/pybind/pybind11.git -b v2.5.0 --depth 1
|
||||
CMD tox
|
||||
|
||||
@@ -8,17 +8,7 @@ cmake_policy(SET CMP0054 NEW)
|
||||
# it allows to install targets created outside of current projects
|
||||
# See https://blog.kitware.com/cmake-3-13-0-available-for-download/
|
||||
|
||||
if (APPLE)
|
||||
if(CMAKE_GENERATOR STREQUAL "Xcode")
|
||||
# due to https://gitlab.kitware.com/cmake/cmake/issues/14254
|
||||
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
|
||||
else()
|
||||
# due to https://cmake.org/cmake/help/v3.12/policy/CMP0068.html
|
||||
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
|
||||
endif()
|
||||
else()
|
||||
cmake_minimum_required(VERSION 3.7.2 FATAL_ERROR)
|
||||
endif()
|
||||
cmake_minimum_required(VERSION 3.13 FATAL_ERROR)
|
||||
|
||||
project(OpenVINO)
|
||||
|
||||
|
||||
1
Jenkinsfile
vendored
1
Jenkinsfile
vendored
@@ -6,5 +6,4 @@ properties([
|
||||
name: 'failFast')
|
||||
])
|
||||
])
|
||||
|
||||
dldtPipelineEntrypoint(this)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# [OpenVINO™ Toolkit](https://01.org/openvinotoolkit) - Deep Learning Deployment Toolkit repository
|
||||
[](https://github.com/openvinotoolkit/openvino/releases/tag/2020.4.0)
|
||||
[](https://github.com/openvinotoolkit/openvino/releases/tag/2021.1)
|
||||
[](LICENSE)
|
||||
|
||||
This toolkit allows developers to deploy pre-trained deep learning models
|
||||
|
||||
@@ -1,351 +0,0 @@
|
||||
jobs:
|
||||
- job: Lin
|
||||
# About 150% of total time
|
||||
timeoutInMinutes: 85
|
||||
pool:
|
||||
name: LIN_VMSS_VENV_F8S_WU2
|
||||
variables:
|
||||
system.debug: true
|
||||
WORKERS_NUMBER: 8
|
||||
BUILD_TYPE: Release
|
||||
REPO_DIR: $(Build.Repository.LocalPath)
|
||||
WORK_DIR: $(Pipeline.Workspace)/_w
|
||||
BUILD_DIR: $(WORK_DIR)/build
|
||||
BIN_DIR: $(REPO_DIR)/bin/intel64/$(BUILD_TYPE)
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
lfs: false
|
||||
submodules: recursive
|
||||
path: openvino
|
||||
- script: |
|
||||
curl -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2019-06-01"
|
||||
whoami
|
||||
uname -a
|
||||
which python3
|
||||
python3 --version
|
||||
gcc --version
|
||||
lsb_release
|
||||
env
|
||||
cat /proc/cpuinfo
|
||||
cat /proc/meminfo
|
||||
vmstat -s
|
||||
df
|
||||
displayName: 'System properties'
|
||||
- script: |
|
||||
rm -rf $(WORK_DIR) ; mkdir $(WORK_DIR)
|
||||
rm -rf $(BUILD_DIR) ; mkdir $(BUILD_DIR)
|
||||
displayName: 'Make dir'
|
||||
- script: |
|
||||
sudo apt --assume-yes install libusb-1.0-0-dev
|
||||
python3 -m pip install -r ./inference-engine/ie_bridges/python/requirements.txt
|
||||
# For running Python API tests
|
||||
python3 -m pip install -r ./inference-engine/ie_bridges/python/src/requirements-dev.txt
|
||||
displayName: 'Install dependencies'
|
||||
- script: |
|
||||
wget https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-linux.zip
|
||||
unzip ninja-linux.zip
|
||||
sudo cp -v ninja /usr/local/bin/
|
||||
workingDirectory: $(WORK_DIR)
|
||||
displayName: 'Install Ninja'
|
||||
- task: CMake@1
|
||||
inputs:
|
||||
# CMake must get Python 3.x version by default
|
||||
cmakeArgs: -GNinja -DVERBOSE_BUILD=ON -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_PYTHON=ON -DPYTHON_EXECUTABLE=/usr/bin/python3.6 -DENABLE_TESTS=ON $(REPO_DIR)
|
||||
workingDirectory: $(BUILD_DIR)
|
||||
- script: ninja
|
||||
workingDirectory: $(BUILD_DIR)
|
||||
displayName: 'Build Lin'
|
||||
- script: ls -alR $(REPO_DIR)/bin/
|
||||
displayName: 'List files'
|
||||
- script: $(BIN_DIR)/unit-test --gtest_print_time=1 --gtest_filter=-backend_api.config_unsupported:*IE_GPU*
|
||||
displayName: 'nGraph UT'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/InferenceEngineUnitTests --gtest_print_time=1
|
||||
displayName: 'IE UT old'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/ieUnitTests
|
||||
displayName: 'IE UT'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/cpuUnitTests
|
||||
displayName: 'CPU UT'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/gnaUnitTests
|
||||
displayName: 'GNA UT'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/vpuUnitTests
|
||||
displayName: 'VPU UT'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/ieFuncTests
|
||||
displayName: 'IE FuncTests'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/cpuFuncTests --gtest_print_time=1
|
||||
displayName: 'CPU FuncTests'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/MklDnnBehaviorTests
|
||||
displayName: 'MklDnnBehaviorTests'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
git clone https://github.com/openvinotoolkit/testdata.git
|
||||
git clone https://github.com/google/gtest-parallel.git
|
||||
workingDirectory: $(WORK_DIR)
|
||||
displayName: 'Clone testdata & gtest-parallel'
|
||||
- script: |
|
||||
export DATA_PATH=$(WORK_DIR)/testdata
|
||||
export MODELS_PATH=$(WORK_DIR)/testdata
|
||||
python3 $(WORK_DIR)/gtest-parallel/gtest-parallel $(BIN_DIR)/MklDnnFunctionalTests --workers=$(WORKERS_NUMBER) --print_test_times --dump_json_test_results=MklDnnFunctionalTests.json -- --gtest_print_time=1
|
||||
workingDirectory: $(WORK_DIR)
|
||||
displayName: 'MklDnnFunctionalTests'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
export DATA_PATH=$(WORK_DIR)/testdata
|
||||
export MODELS_PATH=$(WORK_DIR)/testdata
|
||||
$(BIN_DIR)/InferenceEngineCAPITests
|
||||
displayName: 'IE CAPITests'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
export DATA_PATH=$(WORK_DIR)/testdata
|
||||
export MODELS_PATH=$(WORK_DIR)/testdata
|
||||
export LD_LIBRARY_PATH=$(BIN_DIR)/lib
|
||||
export PYTHONPATH=$(BIN_DIR)/lib/python_api/python3.6
|
||||
env
|
||||
cd $(REPO_DIR)/inference-engine/ie_bridges/python/tests
|
||||
pytest
|
||||
displayName: 'Python API Tests'
|
||||
continueOnError: false
|
||||
enabled: false
|
||||
|
||||
- job: Mac
|
||||
# About 200% of total time (perfomace of Mac hosts is unstable)
|
||||
timeoutInMinutes: 180
|
||||
pool:
|
||||
vmImage: 'macOS-10.15'
|
||||
variables:
|
||||
system.debug: true
|
||||
WORKERS_NUMBER: 3
|
||||
BUILD_TYPE: Release
|
||||
REPO_DIR: $(Build.Repository.LocalPath)
|
||||
WORK_DIR: $(Pipeline.Workspace)/_w
|
||||
BUILD_DIR: $(WORK_DIR)/build
|
||||
BIN_DIR: $(REPO_DIR)/bin/intel64/$(BUILD_TYPE)
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
lfs: false
|
||||
submodules: recursive
|
||||
path: openvino
|
||||
- script: |
|
||||
whoami
|
||||
uname -a
|
||||
which python3
|
||||
python3 --version
|
||||
gcc --version
|
||||
xcrun --sdk macosx --show-sdk-version
|
||||
env
|
||||
sysctl -a
|
||||
displayName: 'System properties'
|
||||
- script: |
|
||||
rm -rf $(WORK_DIR) ; mkdir $(WORK_DIR)
|
||||
rm -rf $(BUILD_DIR) ; mkdir $(BUILD_DIR)
|
||||
displayName: 'Make dir'
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
versionSpec: '3.7'
|
||||
- script: |
|
||||
brew install cython
|
||||
brew install automake
|
||||
displayName: 'Install dependencies'
|
||||
- script: brew install ninja
|
||||
displayName: 'Install Ninja'
|
||||
- script: |
|
||||
export PATH="/usr/local/opt/cython/bin:$PATH"
|
||||
export CC=gcc
|
||||
export CXX=g++
|
||||
# Disable errors with Ninja
|
||||
export CXXFLAGS="-Wno-error=unused-command-line-argument"
|
||||
export CFLAGS="-Wno-error=unused-command-line-argument"
|
||||
cmake -GNinja -DVERBOSE_BUILD=ON -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_PYTHON=ON -DENABLE_TESTS=ON $(REPO_DIR)
|
||||
workingDirectory: $(BUILD_DIR)
|
||||
displayName: 'CMake'
|
||||
- script: ninja
|
||||
workingDirectory: $(BUILD_DIR)
|
||||
displayName: 'Build Mac'
|
||||
- script: ls -alR $(REPO_DIR)/bin/
|
||||
displayName: 'List files'
|
||||
- script: $(BIN_DIR)/unit-test --gtest_print_time=1 --gtest_filter=-backend_api.config_unsupported:*IE_GPU*:IE_CPU.onnx_model_sigmoid
|
||||
displayName: 'nGraph UT'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/InferenceEngineUnitTests --gtest_print_time=1
|
||||
displayName: 'IE UT old'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/ieUnitTests
|
||||
displayName: 'IE UT'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/cpuUnitTests
|
||||
displayName: 'CPU UT'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/vpuUnitTests
|
||||
displayName: 'VPU UT'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/ieFuncTests
|
||||
displayName: 'IE FuncTests'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/cpuFuncTests --gtest_print_time=1
|
||||
displayName: 'CPU FuncTests'
|
||||
continueOnError: false
|
||||
- script: $(BIN_DIR)/MklDnnBehaviorTests
|
||||
displayName: 'MklDnnBehaviorTests'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
git clone https://github.com/openvinotoolkit/testdata.git
|
||||
git clone https://github.com/google/gtest-parallel.git
|
||||
workingDirectory: $(WORK_DIR)
|
||||
displayName: 'Clone testdata & gtest-parallel'
|
||||
- script: |
|
||||
export DATA_PATH=$(WORK_DIR)/testdata
|
||||
export MODELS_PATH=$(WORK_DIR)/testdata
|
||||
python3 $(WORK_DIR)/gtest-parallel/gtest-parallel $(BIN_DIR)/MklDnnFunctionalTests --workers=$(WORKERS_NUMBER) --print_test_times --dump_json_test_results=MklDnnFunctionalTests.json --gtest_filter=-smoke_MobileNet/ModelTransformationsTest.LPT/mobilenet_v2_tf_depthwise_batch1_inPluginDisabled_inTestDisabled_asymmetric* -- --gtest_print_time=1
|
||||
workingDirectory: $(WORK_DIR)
|
||||
displayName: 'MklDnnFunctionalTests'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
export DATA_PATH=$(WORK_DIR)/testdata
|
||||
export MODELS_PATH=$(WORK_DIR)/testdata
|
||||
$(BIN_DIR)/InferenceEngineCAPITests
|
||||
displayName: 'IE CAPITests'
|
||||
continueOnError: false
|
||||
|
||||
- job: Win
|
||||
# About 150% of total time
|
||||
timeoutInMinutes: 120
|
||||
pool:
|
||||
name: WIN_VMSS_VENV_F8S_WU2
|
||||
variables:
|
||||
system.debug: true
|
||||
WORKERS_NUMBER: 8
|
||||
BUILD_TYPE: Release
|
||||
REPO_DIR: $(Build.Repository.LocalPath)
|
||||
WORK_DIR: $(Pipeline.Workspace)\_w
|
||||
BUILD_DIR: D:\build
|
||||
BIN_DIR: $(REPO_DIR)\bin\intel64
|
||||
MSVS_VARS_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
|
||||
MSVC_COMPILER_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.24.28314\bin\Hostx64\x64\cl.exe
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
fetchDepth: 1
|
||||
lfs: false
|
||||
submodules: recursive
|
||||
path: openvino
|
||||
- script: |
|
||||
powershell -command "Invoke-RestMethod -Headers @{\"Metadata\"=\"true\"} -Method GET -Uri http://169.254.169.254/metadata/instance/compute?api-version=2019-06-01 | format-custom"
|
||||
where python3
|
||||
where python
|
||||
python --version
|
||||
wmic computersystem get TotalPhysicalMemory
|
||||
wmic cpu list
|
||||
wmic logicaldisk get description,name
|
||||
wmic VOLUME list
|
||||
set
|
||||
displayName: 'System properties'
|
||||
- script: |
|
||||
rd /Q /S $(WORK_DIR) & mkdir $(WORK_DIR)
|
||||
rd /Q /S $(BUILD_DIR) & mkdir $(BUILD_DIR)
|
||||
displayName: 'Make dir'
|
||||
- script: |
|
||||
certutil -urlcache -split -f https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-win.zip ninja-win.zip
|
||||
powershell -command "Expand-Archive -Force ninja-win.zip"
|
||||
workingDirectory: $(WORK_DIR)
|
||||
displayName: Install Ninja
|
||||
- script: |
|
||||
certutil -urlcache -split -f https://incredibuilddiag1wu2.blob.core.windows.net/incredibuild/IBSetupConsole_9_5_0.exe IBSetupConsole_9_5_0.exe
|
||||
call IBSetupConsole_9_5_0.exe /Install /Components=Agent,oneuse /Coordinator=11.1.0.4 /AGENT:OPENFIREWALL=ON /AGENT:AUTOSELECTPORTS=ON /ADDTOPATH=ON /AGENT:INSTALLADDINS=OFF
|
||||
workingDirectory: $(WORK_DIR)
|
||||
displayName: Install IncrediBuild
|
||||
- script: |
|
||||
echo Stop IncrediBuild_Agent && net stop IncrediBuild_Agent
|
||||
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Xoreax\IncrediBuild\Builder /f /v LastEnabled /d 0 && echo Start IncrediBuild_Agent && net start IncrediBuild_Agent
|
||||
displayName: Start IncrediBuild
|
||||
- script: |
|
||||
set PATH=$(WORK_DIR)\ninja-win;%PATH%
|
||||
call "$(MSVS_VARS_PATH)" && cmake -GNinja -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_TESTS=ON -DCMAKE_C_COMPILER:PATH="$(MSVC_COMPILER_PATH)" -DCMAKE_CXX_COMPILER:PATH="$(MSVC_COMPILER_PATH)" $(REPO_DIR)
|
||||
workingDirectory: $(BUILD_DIR)
|
||||
displayName: 'CMake'
|
||||
- script: |
|
||||
set PATH=$(WORK_DIR)\ninja-win;%PATH%
|
||||
call "$(MSVS_VARS_PATH)" && "C:\Program Files (x86)\IncrediBuild\BuildConsole.exe" /COMMAND="ninja" /MaxCPUS=40
|
||||
workingDirectory: $(BUILD_DIR)
|
||||
displayName: 'Build Win'
|
||||
- script: echo Stop IncrediBuild_Agent && net stop IncrediBuild_Agent
|
||||
displayName: Stop IncrediBuild
|
||||
continueOnError: true
|
||||
- script: dir $(REPO_DIR)\bin\ /s /b
|
||||
displayName: 'List files'
|
||||
- script: |
|
||||
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;%PATH%
|
||||
$(BIN_DIR)\unit-test --gtest_print_time=1 --gtest_filter=-backend_api.config_unsupported:*IE_GPU*
|
||||
displayName: 'nGraph UT'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;%PATH%
|
||||
$(BIN_DIR)\InferenceEngineUnitTests --gtest_print_time=1
|
||||
displayName: 'IE UT old'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;%PATH%
|
||||
$(BIN_DIR)\ieUnitTests
|
||||
displayName: 'IE UT'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;%PATH%
|
||||
$(BIN_DIR)\cpuUnitTests
|
||||
displayName: 'CPU UT'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;%PATH%
|
||||
$(BIN_DIR)\gnaUnitTests
|
||||
displayName: 'GNA UT'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;%PATH%
|
||||
$(BIN_DIR)\vpuUnitTests
|
||||
displayName: 'VPU UT'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;%PATH%
|
||||
$(BIN_DIR)\ieFuncTests
|
||||
displayName: 'IE FuncTests'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;%PATH%
|
||||
$(BIN_DIR)\cpuFuncTests --gtest_print_time=1
|
||||
displayName: 'CPU FuncTests'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;%PATH%
|
||||
$(BIN_DIR)\MklDnnBehaviorTests
|
||||
displayName: 'MklDnnBehaviorTests'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
git clone https://github.com/openvinotoolkit/testdata.git
|
||||
git clone https://github.com/google/gtest-parallel.git
|
||||
workingDirectory: $(BUILD_DIR)
|
||||
displayName: 'Clone testdata & gtest-parallel'
|
||||
# Add for gtest-parallel, it hangs now (CVS-33386)
|
||||
#python $(BUILD_DIR)\gtest-parallel\gtest-parallel $(BIN_DIR)\MklDnnFunctionalTests --workers=$(WORKERS_NUMBER) --print_test_times --dump_json_test_results=MklDnnFunctionalTests.json -- --gtest_print_time=1
|
||||
- script: |
|
||||
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;$(REPO_DIR)\inference-engine\temp\opencv_4.3.0\opencv\bin;%PATH%
|
||||
set DATA_PATH=$(BUILD_DIR)\testdata
|
||||
set MODELS_PATH=$(BUILD_DIR)\testdata
|
||||
$(BIN_DIR)\MklDnnFunctionalTests --gtest_print_time=1
|
||||
displayName: 'MklDnnFunctionalTests'
|
||||
continueOnError: false
|
||||
- script: |
|
||||
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;$(REPO_DIR)\inference-engine\temp\opencv_4.3.0\opencv\bin;%PATH%
|
||||
set DATA_PATH=$(BUILD_DIR)\testdata
|
||||
set MODELS_PATH=$(BUILD_DIR)\testdata
|
||||
$(BIN_DIR)\InferenceEngineCAPITests
|
||||
displayName: 'IE CAPITests'
|
||||
continueOnError: false
|
||||
@@ -46,21 +46,19 @@ The open source version of Inference Engine includes the following plugins:
|
||||
| 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 |
|
||||
| Heterogeneous plugin | Heterogeneous plugin enables computing for inference on one network on several Intel® devices. |
|
||||
|
||||
Inference Engine plugin for Intel® FPGA is distributed only in a binary form,
|
||||
as a part of [Intel® Distribution of OpenVINO™].
|
||||
|
||||
## Build on Linux\* Systems
|
||||
|
||||
The software was validated on:
|
||||
- Ubuntu\* 18.04 (64-bit) with default GCC\* 7.5.0
|
||||
- Ubuntu\* 16.04 (64-bit) with default GCC\* 5.4.0
|
||||
- CentOS\* 7.4 (64-bit) with default GCC\* 4.8.5
|
||||
- Ubuntu\* 20.04 (64-bit) with default GCC\* 9.3.0
|
||||
- CentOS\* 7.6 (64-bit) with default GCC\* 4.8.5
|
||||
|
||||
### Software Requirements
|
||||
- [CMake]\* 3.11 or higher
|
||||
- [CMake]\* 3.13 or higher
|
||||
- GCC\* 4.8 or higher to build the Inference Engine
|
||||
- Python 3.5 or higher for Inference Engine Python API wrapper
|
||||
- Python 3.6 or higher for Inference Engine Python API wrapper
|
||||
- (Optional) [Install Intel® Graphics Compute Runtime for OpenCL™ Driver package 19.41.14441].
|
||||
> **NOTE**: Building samples and demos from the Intel® Distribution of OpenVINO™ toolkit package requires CMake\* 3.10 or higher.
|
||||
|
||||
### Build Steps
|
||||
1. Clone submodules:
|
||||
@@ -331,14 +329,14 @@ You can use the following additional build options:
|
||||
## Build on Windows* Systems
|
||||
|
||||
The software was validated on:
|
||||
- Microsoft\* Windows\* 10 (64-bit) with Visual Studio 2017 and Intel® C++
|
||||
Compiler 2018 Update 3
|
||||
- Microsoft\* Windows\* 10 (64-bit) with Visual Studio 2019
|
||||
|
||||
### Software Requirements
|
||||
- [CMake]\*3.11 or higher
|
||||
- Microsoft\* Visual Studio 2017, 2019 or [Intel® C++ Compiler] 18.0
|
||||
- [CMake]\*3.13 or higher
|
||||
- Microsoft\* Visual Studio 2017, 2019
|
||||
- (Optional) Intel® Graphics Driver for Windows* (26.20) [driver package].
|
||||
- Python 3.5 or higher for Inference Engine Python API wrapper
|
||||
- Python 3.6 or higher for Inference Engine Python API wrapper
|
||||
> **NOTE**: Building samples and demos from the Intel® Distribution of OpenVINO™ toolkit package requires CMake\* 3.10 or higher.
|
||||
|
||||
### Build Steps
|
||||
|
||||
@@ -369,20 +367,13 @@ cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE=Release ..
|
||||
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=Release ..
|
||||
```
|
||||
|
||||
For Intel® C++ Compiler 18:
|
||||
```sh
|
||||
cmake -G "Visual Studio 15 2017 Win64" -T "Intel C++ Compiler 18.0" ^
|
||||
-DCMAKE_BUILD_TYPE=Release ^
|
||||
-DICCLIB="C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018\windows\compiler\lib" ..
|
||||
```
|
||||
|
||||
5. Build generated solution in Visual Studio or run
|
||||
`cmake --build . --config Release` to build from the command line.
|
||||
|
||||
6. Before running the samples, add paths to the 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 `<openvino_repo>/inference-engine/temp/tbb/bin`
|
||||
folder, OpenCV binaries to the `<openvino_repo>/inference-engine/temp/opencv_4.3.0/opencv/bin`
|
||||
folder, OpenCV binaries to the `<openvino_repo>/inference-engine/temp/opencv_4.5.0/opencv/bin`
|
||||
folder.
|
||||
|
||||
### Additional Build Options
|
||||
@@ -448,13 +439,14 @@ cmake --build . --config Release
|
||||
inference on Intel CPUs only.
|
||||
|
||||
The software was validated on:
|
||||
- macOS\* 10.14, 64-bit
|
||||
- macOS\* 10.15, 64-bit
|
||||
|
||||
### Software Requirements
|
||||
|
||||
- [CMake]\* 3.11 or higher
|
||||
- [CMake]\* 3.13 or higher
|
||||
- Clang\* compiler from Xcode\* 10.1 or higher
|
||||
- Python\* 3.5 or higher for the Inference Engine Python API wrapper
|
||||
- Python\* 3.6 or higher for the Inference Engine Python API wrapper
|
||||
> **NOTE**: Building samples and demos from the Intel® Distribution of OpenVINO™ toolkit package requires CMake\* 3.10 or higher.
|
||||
|
||||
### Build Steps
|
||||
|
||||
@@ -463,19 +455,11 @@ The software was validated on:
|
||||
cd openvino
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
2. Install build dependencies using the `install_dependencies.sh` script in the
|
||||
project root folder:
|
||||
```sh
|
||||
chmod +x install_dependencies.sh
|
||||
```
|
||||
```sh
|
||||
./install_dependencies.sh
|
||||
```
|
||||
3. Create a build folder:
|
||||
2. Create a build folder:
|
||||
```sh
|
||||
mkdir build
|
||||
mkdir build && cd build
|
||||
```
|
||||
4. Inference Engine uses a CMake-based build system. In the created `build`
|
||||
3. 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:
|
||||
```sh
|
||||
@@ -511,12 +495,17 @@ You can use the following additional build options:
|
||||
|
||||
- To build the Python API wrapper, use the `-DENABLE_PYTHON=ON` option. To
|
||||
specify an exact Python version, use the following options:
|
||||
```sh
|
||||
-DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 \
|
||||
-DPYTHON_LIBRARY=/Library/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7m.dylib \
|
||||
-DPYTHON_INCLUDE_DIR=/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m
|
||||
```
|
||||
|
||||
- If you installed Python through Homebrew*, set the following flags:
|
||||
```sh
|
||||
-DPYTHON_EXECUTABLE=/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/bin/python3.7m \
|
||||
-DPYTHON_LIBRARY=/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7m.dylib \
|
||||
-DPYTHON_INCLUDE_DIR=/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/include/python3.7m
|
||||
```
|
||||
- If you installed Python another way, you can use the following commands to find where the `dylib` and `include_dir` are located, respectively:
|
||||
```sh
|
||||
find /usr/ -name 'libpython*m.dylib'
|
||||
find /usr/ -type d -name python3.7m
|
||||
```
|
||||
- nGraph-specific compilation options:
|
||||
`-DNGRAPH_ONNX_IMPORT_ENABLE=ON` enables the building of the nGraph ONNX importer.
|
||||
`-DNGRAPH_DEBUG_ENABLE=ON` enables additional debug prints.
|
||||
@@ -527,8 +516,9 @@ This section describes how to build Inference Engine for Android x86 (64-bit) op
|
||||
|
||||
### Software Requirements
|
||||
|
||||
- [CMake]\* 3.11 or higher
|
||||
- [CMake]\* 3.13 or higher
|
||||
- Android NDK (this guide has been validated with r20 release)
|
||||
> **NOTE**: Building samples and demos from the Intel® Distribution of OpenVINO™ toolkit package requires CMake\* 3.10 or higher.
|
||||
|
||||
### Build Steps
|
||||
|
||||
@@ -698,5 +688,4 @@ This target collects all dependencies, prepares the nGraph package and copies it
|
||||
[build instructions]:https://docs.opencv.org/master/df/d65/tutorial_table_of_content_introduction.html
|
||||
[driver package]:https://downloadcenter.intel.com/download/29335/Intel-Graphics-Windows-10-DCH-Drivers
|
||||
[Intel® Neural Compute Stick 2 Get Started]:https://software.intel.com/en-us/neural-compute-stick/get-started
|
||||
[Intel® C++ Compiler]:https://software.intel.com/en-us/intel-parallel-studio-xe
|
||||
[OpenBLAS]:https://sourceforge.net/projects/openblas/files/v0.2.14/OpenBLAS-v0.2.14-Win64-int64.zip/download
|
||||
|
||||
@@ -45,3 +45,6 @@ ie_dependent_option (ENABLE_AVX2 "Enable AVX2 optimizations" ON "X86_64 OR X86"
|
||||
ie_dependent_option (ENABLE_AVX512F "Enable AVX512 optimizations" ON "X86_64 OR X86" OFF)
|
||||
|
||||
ie_dependent_option (ENABLE_PROFILING_ITT "ITT tracing of IE and plugins internals" ON "NOT CMAKE_CROSSCOMPILING" OFF)
|
||||
|
||||
# Documentation build
|
||||
ie_option (ENABLE_DOCS "build docs using Doxygen" OFF)
|
||||
|
||||
@@ -2,59 +2,187 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
add_subdirectory(examples)
|
||||
if(NOT ENABLE_DOCKER)
|
||||
add_subdirectory(examples)
|
||||
|
||||
# Detect nGraph
|
||||
find_package(ngraph QUIET)
|
||||
if(NOT ngraph_FOUND)
|
||||
set(ngraph_DIR ${CMAKE_BINARY_DIR}/ngraph)
|
||||
endif()
|
||||
|
||||
# Detect InferenceEngine
|
||||
find_package(InferenceEngine QUIET)
|
||||
if(NOT InferenceEngine_FOUND)
|
||||
set(InferenceEngine_DIR ${CMAKE_BINARY_DIR})
|
||||
endif()
|
||||
|
||||
add_subdirectory(template_extension)
|
||||
|
||||
set(all_docs_targets
|
||||
ie_docs_examples
|
||||
template_extension
|
||||
templatePlugin TemplateBehaviorTests TemplateFunctionalTests)
|
||||
foreach(target_name IN LISTS all_docs_targets)
|
||||
if (TARGET ${target_name})
|
||||
set_target_properties(${target_name} PROPERTIES FOLDER docs)
|
||||
# Detect nGraph
|
||||
find_package(ngraph QUIET)
|
||||
if(NOT ngraph_FOUND)
|
||||
set(ngraph_DIR ${CMAKE_BINARY_DIR}/ngraph)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# OpenVINO docs
|
||||
# Detect InferenceEngine
|
||||
find_package(InferenceEngine QUIET)
|
||||
if(NOT InferenceEngine_FOUND)
|
||||
set(InferenceEngine_DIR ${CMAKE_BINARY_DIR})
|
||||
endif()
|
||||
|
||||
set(OPENVINO_DOCS_PATH "" CACHE PATH "Path to openvino-documentation local repository")
|
||||
set(args "")
|
||||
add_subdirectory(template_extension)
|
||||
|
||||
if(OPENVINO_DOCS_PATH)
|
||||
set(args "${args} ovinodoc_path:${OPENVINO_DOCS_PATH}")
|
||||
set(all_docs_targets
|
||||
ie_docs_examples
|
||||
template_extension
|
||||
templatePlugin TemplateBehaviorTests TemplateFunctionalTests)
|
||||
foreach(target_name IN LISTS all_docs_targets)
|
||||
if (TARGET ${target_name})
|
||||
set_target_properties(${target_name} PROPERTIES FOLDER docs)
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
file(GLOB_RECURSE docs_files "${OpenVINO_MAIN_SOURCE_DIR}/docs")
|
||||
file(GLOB_RECURSE include_files "${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/include")
|
||||
file(GLOB_RECURSE ovino_files "${OPENVINO_DOCS_PATH}")
|
||||
function(build_docs)
|
||||
find_package(Doxygen REQUIRED dot)
|
||||
find_package(Python3 COMPONENTS Interpreter)
|
||||
find_package(LATEX)
|
||||
|
||||
add_custom_target(ie_docs
|
||||
COMMAND ./build_docs.sh ${args}
|
||||
WORKING_DIRECTORY "${OpenVINO_MAIN_SOURCE_DIR}/docs/build_documentation"
|
||||
COMMENT "Generating OpenVINO documentation"
|
||||
SOURCES ${docs_files} ${include_files} ${ovino_files}
|
||||
VERBATIM)
|
||||
set_target_properties(ie_docs PROPERTIES FOLDER docs)
|
||||
if(NOT DOXYGEN_FOUND)
|
||||
message(FATAL_ERROR "Doxygen is required to build the documentation")
|
||||
endif()
|
||||
|
||||
find_program(browser NAMES xdg-open)
|
||||
if(browser)
|
||||
add_custom_target(ie_docs_open
|
||||
COMMAND ${browser} "${OpenVINO_MAIN_SOURCE_DIR}/doc/html/index.html"
|
||||
DEPENDS ie_docs
|
||||
COMMENT "Open OpenVINO documentation"
|
||||
if(NOT Python3_FOUND)
|
||||
message(FATAL_ERROR "Python3 is required to build the documentation")
|
||||
endif()
|
||||
|
||||
if(NOT LATEX_FOUND)
|
||||
message(FATAL_ERROR "LATEX is required to build the documentation")
|
||||
endif()
|
||||
|
||||
set(DOCS_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
set(DOXYGEN_DIR "${OpenVINO_MAIN_SOURCE_DIR}/docs/doxygen")
|
||||
set(IE_SOURCE_DIR "${OpenVINO_MAIN_SOURCE_DIR}/inference-engine")
|
||||
set(PYTHON_API_IN "${IE_SOURCE_DIR}/ie_bridges/python/src/openvino/inference_engine/ie_api.pyx")
|
||||
set(PYTHON_API_OUT "${DOCS_BINARY_DIR}/python_api/ie_api.pyx")
|
||||
set(C_API "${IE_SOURCE_DIR}/ie_bridges/c/include")
|
||||
set(PLUGIN_API_DIR "${DOCS_BINARY_DIR}/IE_PLUGIN_DG")
|
||||
|
||||
# Preprocessing scripts
|
||||
set(DOXY_MD_FILTER "${DOXYGEN_DIR}/doxy_md_filter.py")
|
||||
set(PYX_FILTER "${DOXYGEN_DIR}/pyx_filter.py")
|
||||
|
||||
file(GLOB_RECURSE doc_source_files
|
||||
LIST_DIRECTORIES true RELATIVE ${OpenVINO_MAIN_SOURCE_DIR}
|
||||
"${OpenVINO_MAIN_SOURCE_DIR}/docs/*.md"
|
||||
"${OpenVINO_MAIN_SOURCE_DIR}/docs/*.png"
|
||||
"${OpenVINO_MAIN_SOURCE_DIR}/docs/*.gif"
|
||||
"${OpenVINO_MAIN_SOURCE_DIR}/docs/*.jpg"
|
||||
"${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.md"
|
||||
"${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.png"
|
||||
"${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.gif"
|
||||
"${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.jpg")
|
||||
|
||||
configure_file(${PYTHON_API_IN} ${PYTHON_API_OUT} @ONLY)
|
||||
|
||||
set(IE_CONFIG_SOURCE "${DOXYGEN_DIR}/ie_docs.config")
|
||||
set(C_CONFIG_SOURCE "${DOXYGEN_DIR}/ie_c_api.config")
|
||||
set(PY_CONFIG_SOURCE "${DOXYGEN_DIR}/ie_py_api.config")
|
||||
set(PLUGIN_CONFIG_SOURCE "${DOXYGEN_DIR}/ie_plugin_api.config")
|
||||
|
||||
set(IE_CONFIG_BINARY "${DOCS_BINARY_DIR}/ie_docs.config")
|
||||
set(C_CONFIG_BINARY "${DOCS_BINARY_DIR}/ie_c_api.config")
|
||||
set(PY_CONFIG_BINARY "${DOCS_BINARY_DIR}/ie_py_api.config")
|
||||
set(PLUGIN_CONFIG_BINARY "${DOCS_BINARY_DIR}/ie_plugin_api.config")
|
||||
|
||||
set(IE_LAYOUT_SOURCE "${DOXYGEN_DIR}/ie_docs.xml")
|
||||
set(C_LAYOUT_SOURCE "${DOXYGEN_DIR}/ie_c_api.xml")
|
||||
set(PY_LAYOUT_SOURCE "${DOXYGEN_DIR}/ie_py_api.xml")
|
||||
set(PLUGIN_LAYOUT_SOURCE "${DOXYGEN_DIR}/ie_plugin_api.xml")
|
||||
|
||||
set(IE_LAYOUT_BINARY "${DOCS_BINARY_DIR}/ie_docs.xml")
|
||||
set(C_LAYOUT_BINARY "${DOCS_BINARY_DIR}/ie_c_api.xml")
|
||||
set(PY_LAYOUT_BINARY "${DOCS_BINARY_DIR}/ie_py_api.xml")
|
||||
set(PLUGIN_LAYOUT_BINARY "${DOCS_BINARY_DIR}/ie_plugin_api.xml")
|
||||
|
||||
# Tables of contents
|
||||
configure_file(${IE_LAYOUT_SOURCE} ${IE_LAYOUT_BINARY} @ONLY)
|
||||
configure_file(${C_LAYOUT_SOURCE} ${C_LAYOUT_BINARY} @ONLY)
|
||||
configure_file(${PY_LAYOUT_SOURCE} ${PY_LAYOUT_BINARY} @ONLY)
|
||||
configure_file(${PLUGIN_LAYOUT_SOURCE} ${PLUGIN_LAYOUT_BINARY} @ONLY)
|
||||
|
||||
# Doxygen config files
|
||||
configure_file(${IE_CONFIG_SOURCE} ${IE_CONFIG_BINARY} @ONLY)
|
||||
configure_file(${C_CONFIG_SOURCE} ${C_CONFIG_BINARY} @ONLY)
|
||||
configure_file(${PY_CONFIG_SOURCE} ${PY_CONFIG_BINARY} @ONLY)
|
||||
configure_file(${PLUGIN_CONFIG_SOURCE} ${PLUGIN_CONFIG_BINARY} @ONLY)
|
||||
|
||||
# Preprocessing scripts
|
||||
set(DOXY_MD_FILTER "${DOXYGEN_DIR}/doxy_md_filter.py")
|
||||
set(PYX_FILTER "${DOXYGEN_DIR}/pyx_filter.py")
|
||||
|
||||
# C API
|
||||
|
||||
add_custom_target(c_api
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${C_CONFIG_BINARY}
|
||||
WORKING_DIRECTORY ${DOCS_BINARY_DIR}
|
||||
COMMENT "Generating C API Reference"
|
||||
VERBATIM)
|
||||
set_target_properties(ie_docs_open PROPERTIES FOLDER docs)
|
||||
|
||||
# Python API
|
||||
|
||||
add_custom_target(py_api
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${PY_CONFIG_BINARY}
|
||||
WORKING_DIRECTORY ${DOCS_BINARY_DIR}
|
||||
COMMENT "Generating Python API Reference"
|
||||
VERBATIM)
|
||||
|
||||
add_custom_command(TARGET py_api
|
||||
PRE_BUILD
|
||||
COMMAND ${Python3_EXECUTABLE} ${PYX_FILTER} ${PYTHON_API_OUT}
|
||||
COMMENT "Pre-process Python API")
|
||||
|
||||
# Plugin API
|
||||
|
||||
add_custom_target(plugin_api
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${PLUGIN_CONFIG_BINARY}
|
||||
WORKING_DIRECTORY ${DOCS_BINARY_DIR}
|
||||
COMMENT "Generating Plugin API Reference"
|
||||
VERBATIM)
|
||||
|
||||
# Preprocess docs
|
||||
|
||||
add_custom_target(preprocess_docs
|
||||
COMMENT "Pre-process docs"
|
||||
VERBATIM)
|
||||
|
||||
foreach(source_file ${doc_source_files})
|
||||
list(APPEND commands COMMAND ${CMAKE_COMMAND} -E copy
|
||||
"${OpenVINO_MAIN_SOURCE_DIR}/${source_file}" "${DOCS_BINARY_DIR}/${source_file}")
|
||||
endforeach()
|
||||
|
||||
add_custom_command(TARGET preprocess_docs
|
||||
PRE_BUILD
|
||||
${commands}
|
||||
COMMAND ${Python3_EXECUTABLE} ${DOXY_MD_FILTER} ${DOCS_BINARY_DIR}
|
||||
COMMENT "Pre-process markdown and image links")
|
||||
|
||||
# IE dev guide and C++ API
|
||||
|
||||
add_custom_target(ie_docs
|
||||
DEPENDS preprocess_docs
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${IE_CONFIG_BINARY}
|
||||
WORKING_DIRECTORY ${DOCS_BINARY_DIR}
|
||||
VERBATIM)
|
||||
|
||||
# Umbrella OpenVINO target
|
||||
|
||||
add_custom_target(openvino_docs
|
||||
DEPENDS c_api py_api ie_docs plugin_api
|
||||
COMMENT "Generating OpenVINO documentation"
|
||||
VERBATIM)
|
||||
|
||||
set_target_properties(openvino_docs ie_docs c_api py_api preprocess_docs plugin_api
|
||||
PROPERTIES FOLDER docs)
|
||||
|
||||
find_program(browser NAMES xdg-open)
|
||||
if(browser)
|
||||
add_custom_target(ie_docs_open
|
||||
COMMAND ${browser} "${OpenVINO_MAIN_SOURCE_DIR}/docs/html/index.html"
|
||||
DEPENDS ie_docs
|
||||
COMMENT "Open OpenVINO documentation"
|
||||
VERBATIM)
|
||||
set_target_properties(ie_docs_open PROPERTIES FOLDER docs)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
if(ENABLE_DOCS)
|
||||
build_docs()
|
||||
endif()
|
||||
|
||||
@@ -21,11 +21,11 @@ The original format will be a supported framework such as TensorFlow, Caffe, or
|
||||
|
||||
## Custom Layer Overview
|
||||
|
||||
The [Model Optimizer](https://docs.openvinotoolkit.org/2019_R1.1/_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html) searches the list of known layers for each layer contained in the input model topology before building the model's internal representation, optimizing the model, and producing the Intermediate Representation files.
|
||||
The [Model Optimizer](../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md) searches the list of known layers for each layer contained in the input model topology before building the model's internal representation, optimizing the model, and producing the Intermediate Representation files.
|
||||
|
||||
The [Inference Engine](https://docs.openvinotoolkit.org/2019_R1.1/_docs_IE_DG_Deep_Learning_Inference_Engine_DevGuide.html) loads the layers from the input model IR files into the specified device plugin, which will search a list of known layer implementations for the device. If your topology contains layers that are not in the list of known layers for the device, the Inference Engine considers the layer to be unsupported and reports an error. To see the layers that are supported by each device plugin for the Inference Engine, refer to the [Supported Devices](https://docs.openvinotoolkit.org/2019_R1.1/_docs_IE_DG_supported_plugins_Supported_Devices.html) documentation.
|
||||
The [Inference Engine](../IE_DG/Deep_Learning_Inference_Engine_DevGuide.md) loads the layers from the input model IR files into the specified device plugin, which will search a list of known layer implementations for the device. If your topology contains layers that are not in the list of known layers for the device, the Inference Engine considers the layer to be unsupported and reports an error. To see the layers that are supported by each device plugin for the Inference Engine, refer to the [Supported Devices](../IE_DG/supported_plugins/Supported_Devices.md) documentation.
|
||||
<br>
|
||||
**Note:** If a device doesn't support a particular layer, an alternative to creating a new custom layer is to target an additional device using the HETERO plugin. The [Heterogeneous Plugin](https://docs.openvinotoolkit.org/2019_R1.1/_docs_IE_DG_supported_plugins_HETERO.html) may be used to run an inference model on multiple devices allowing the unsupported layers on one device to "fallback" to run on another device (e.g., CPU) that does support those layers.
|
||||
> **NOTE:** If a device doesn't support a particular layer, an alternative to creating a new custom layer is to target an additional device using the HETERO plugin. The [Heterogeneous Plugin](../IE_DG/supported_plugins/HETERO.md) may be used to run an inference model on multiple devices allowing the unsupported layers on one device to "fallback" to run on another device (e.g., CPU) that does support those layers.
|
||||
|
||||
## Custom Layer Implementation Workflow
|
||||
|
||||
@@ -40,7 +40,7 @@ The following figure shows the basic processing steps for the Model Optimizer hi
|
||||
|
||||
The Model Optimizer first extracts information from the input model which includes the topology of the model layers along with parameters, input and output format, etc., for each layer. The model is then optimized from the various known characteristics of the layers, interconnects, and data flow which partly comes from the layer operation providing details including the shape of the output for each layer. Finally, the optimized model is output to the model IR files needed by the Inference Engine to run the model.
|
||||
|
||||
The Model Optimizer starts with a library of known extractors and operations for each [supported model framework](https://docs.openvinotoolkit.org/2019_R1.1/_docs_MO_DG_prepare_model_Supported_Frameworks_Layers.html) which must be extended to use each unknown custom layer. The custom layer extensions needed by the Model Optimizer are:
|
||||
The Model Optimizer starts with a library of known extractors and operations for each [supported model framework](../MO_DG/prepare_model/Supported_Frameworks_Layers.md) which must be extended to use each unknown custom layer. The custom layer extensions needed by the Model Optimizer are:
|
||||
|
||||
- Custom Layer Extractor
|
||||
- Responsible for identifying the custom layer operation and extracting the parameters for each instance of the custom layer. The layer parameters are stored per instance and used by the layer operation before finally appearing in the output IR. Typically the input layer parameters are unchanged, which is the case covered by this tutorial.
|
||||
@@ -182,10 +182,10 @@ There are two options to convert your MXNet* model that contains custom layers:
|
||||
2. If you have sub-graphs that should not be expressed with the analogous sub-graph in the Intermediate Representation, but another sub-graph should appear in the model, the Model Optimizer provides such an option. In MXNet the function is actively used for ssd models provides an opportunity to for the necessary subgraph sequences and replace them. To read more, see [Sub-graph Replacement in the Model Optimizer](../MO_DG/prepare_model/customize_model_optimizer/Subgraph_Replacement_Model_Optimizer.md).
|
||||
|
||||
## Kaldi\* Models with Custom Layers <a name="Kaldi-models-with-custom-layers"></a>
|
||||
For information on converting your Kaldi* model containing custom layers see [Converting a Kaldi Model in the Model Optimizer Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_Kaldi.html).
|
||||
For information on converting your Kaldi* model containing custom layers see [Converting a Kaldi Model in the Model Optimizer Developer Guide](../MO_DG/prepare_model/convert_model/Convert_Model_From_Kaldi.md).
|
||||
|
||||
## ONNX\* Models with Custom Layers <a name="ONNX-models-with-custom-layers"></a>
|
||||
For information on converting your ONNX* model containing custom layers see [Converting an ONNX Model in the Model Optimizer Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_ONNX.html).
|
||||
For information on converting your ONNX* model containing custom layers see [Converting an ONNX Model in the Model Optimizer Developer Guide](../MO_DG/prepare_model/convert_model/Convert_Model_From_ONNX.md).
|
||||
|
||||
## Step-by-Step Custom Layers Tutorial
|
||||
For a step-by-step walk-through creating and executing a custom layer, see [Custom Layer Implementation Tutorial for Linux and Windows.](https://github.com/david-drew/OpenVINO-Custom-Layers/tree/master/2019.r2.0)
|
||||
@@ -194,10 +194,10 @@ For a step-by-step walk-through creating and executing a custom layer, see [Cust
|
||||
|
||||
- Intel® Distribution of OpenVINO™ toolkit home page: [https://software.intel.com/en-us/openvino-toolkit](https://software.intel.com/en-us/openvino-toolkit)
|
||||
- OpenVINO™ toolkit online documentation: [https://docs.openvinotoolkit.org](https://docs.openvinotoolkit.org)
|
||||
- [Model Optimizer Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html)
|
||||
- [Kernel Extensivility in the Inference Engine Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Integrate_your_kernels_into_IE.html)
|
||||
- [Inference Engine Samples Overview](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Samples_Overview.html)
|
||||
- [Overview of OpenVINO™ Toolkit Pre-Trained Models](https://docs.openvinotoolkit.org/latest/_intel_models_index.html)
|
||||
- [Model Optimizer Developer Guide](../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md)
|
||||
- [Kernel Extensivility in the Inference Engine Developer Guide](../IE_DG/Integrate_your_kernels_into_IE.md)
|
||||
- [Inference Engine Samples Overview](../IE_DG/Samples_Overview.md)
|
||||
- [Overview of OpenVINO™ Toolkit Pre-Trained Models](@ref omz_models_intel_index)
|
||||
- [Inference Engine Tutorials](https://github.com/intel-iot-devkit/inference-tutorials-generic)
|
||||
- For IoT Libraries and Code Samples see the [Intel® IoT Developer Kit](https://github.com/intel-iot-devkit).
|
||||
|
||||
|
||||
@@ -2,23 +2,6 @@
|
||||
|
||||
The sections below contain detailed list of changes made to the Inference Engine API in recent releases.
|
||||
|
||||
## Deprecation Notice
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><strong>Deprecation Begins</strong></td>
|
||||
<td>June 1, 2020</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Removal Date</strong></td>
|
||||
<td>December 1, 2020</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Starting with the OpenVINO™ toolkit 2020.2 release, all of the features previously available through nGraph have been merged into the OpenVINO™ toolkit. As a result, all the features previously available through ONNX RT Execution Provider for nGraph have been merged with ONNX RT Execution Provider for OpenVINO™ toolkit.
|
||||
|
||||
Therefore, ONNX RT Execution Provider for nGraph will be deprecated starting June 1, 2020 and will be completely removed on December 1, 2020. Users are recommended to migrate to the ONNX RT Execution Provider for OpenVINO™ toolkit as the unified solution for all AI inferencing on Intel® hardware.
|
||||
|
||||
## 2021.1
|
||||
|
||||
### Deprecated API
|
||||
|
||||
@@ -22,7 +22,7 @@ The OpenVINO™ toolkit includes the following components:
|
||||
TensorFlow*, MXNet*, Kaldi*, ONNX* models.
|
||||
- [Deep Learning Inference Engine](inference_engine_intro.md) — A unified API to allow high performance inference on many hardware types
|
||||
including Intel® CPU, Intel® Processor Graphics, Intel® FPGA, Intel® Neural Compute Stick 2.
|
||||
- [nGraph](nGraph_Flow.md) — graph representation and manipulation engine which is used to represent a model inside Inference Engine and allows the run-time model construction without using Model Optimizer.
|
||||
- [nGraph](../nGraph_DG/nGraph_dg.md) — graph representation and manipulation engine which is used to represent a model inside Inference Engine and allows the run-time model construction without using Model Optimizer.
|
||||
* [OpenCV](https://docs.opencv.org/) — OpenCV* community version compiled for Intel® hardware.
|
||||
Includes PVL libraries for computer vision.
|
||||
* Drivers and runtimes for OpenCL™ version 2.1
|
||||
@@ -48,8 +48,6 @@ inference of a pre-trained and optimized deep learning model and a set of sample
|
||||
|
||||
* [Introduction to Inference Engine](inference_engine_intro.md)
|
||||
|
||||
* [Introduction to nGraph Flow](nGraph_Flow.md)
|
||||
|
||||
* [Understanding Inference Engine Memory Primitives](Memory_primitives.md)
|
||||
|
||||
* [Introduction to Inference Engine Device Query API](InferenceEngine_QueryAPI.md)
|
||||
@@ -78,7 +76,6 @@ inference of a pre-trained and optimized deep learning model and a set of sample
|
||||
* [Supported Devices](supported_plugins/Supported_Devices.md)
|
||||
* [GPU](supported_plugins/CL_DNN.md)
|
||||
* [CPU](supported_plugins/CPU.md)
|
||||
* [FPGA](supported_plugins/FPGA.md)
|
||||
* [VPU](supported_plugins/VPU.md)
|
||||
* [MYRIAD](supported_plugins/MYRIAD.md)
|
||||
* [HDDL](supported_plugins/HDDL.md)
|
||||
|
||||
@@ -16,6 +16,8 @@ To add your custom nGraph operation, create a new class that extends `ngraph::Op
|
||||
|
||||
5. Override the `visit_attributes` method, which allows serialization and deserialization of attributes. An `AttributeVisitor` is passed to the method, and the implementation is expected to walk over all the attributes in the op using the type-aware `on_attribute` helper. Helpers are already implemented for standard C++ types like `int64_t`, `float`, `bool`, `vector` and for existing nGraph defined types.
|
||||
|
||||
6. Override `evaluate`, which is an optional method that enables the application of constant folding if there is a custom operation on the constant branch.
|
||||
|
||||
Based on that, declaration of a operation class can look as follows:
|
||||
|
||||
@snippet op.hpp op:header
|
||||
@@ -51,6 +53,12 @@ nGraph operation contains two constructors: a default constructor, which allows
|
||||
|
||||
@snippet op.cpp op:visit_attributes
|
||||
|
||||
### `evaluate()`
|
||||
|
||||
`ngraph::Node::evaluate` method allows to apply constant folding to an operation.
|
||||
|
||||
@snippet op.cpp op:evaluate
|
||||
|
||||
## Register Custom Operations in Extension Class
|
||||
|
||||
To add custom operations to the [Extension](Extension.md) class, create an operation set with custom operations and implement the `InferenceEngine::IExtension::getOpSets` method:
|
||||
@@ -70,20 +78,3 @@ When specifying opset names, follow the rules below:
|
||||
Operations from the default opset cannot be redefined.
|
||||
|
||||
Use a custom opset to create a new operation or extend functionality of an existing operation from another opset.
|
||||
|
||||
## Deprecation Notice
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><strong>Deprecation Begins</strong></td>
|
||||
<td>June 1, 2020</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Removal Date</strong></td>
|
||||
<td>December 1, 2020</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
*Starting with the OpenVINO™ toolkit 2020.2 release, all of the features previously available through nGraph have been merged into the OpenVINO™ toolkit. As a result, all the features previously available through ONNX RT Execution Provider for nGraph have been merged with ONNX RT Execution Provider for OpenVINO™ toolkit.*
|
||||
|
||||
*Therefore, ONNX RT Execution Provider for nGraph will be deprecated starting June 1, 2020 and will be completely removed on December 1, 2020. Users are recommended to migrate to the ONNX RT Execution Provider for OpenVINO™ toolkit as the unified solution for all AI inferencing on Intel® hardware.*
|
||||
|
||||
@@ -64,7 +64,7 @@ Glossary of terms used in the Inference Engine
|
||||
| :--- | :--- |
|
||||
| Batch | Number of images to analyze during one call of infer. Maximum batch size is a property of the network and it is set before loading of the network to the plugin. In NHWC, NCHW and NCDHW image data layout representation, the N refers to the number of images in the batch |
|
||||
| Blob | Memory container used for storing inputs, outputs of the network, weights and biases of the layers |
|
||||
| Device (Affinitity) | A preferred Intel(R) hardware device to run the inference (CPU, GPU, FPGA, etc.) |
|
||||
| Device (Affinitity) | A preferred Intel(R) hardware device to run the inference (CPU, GPU, etc.) |
|
||||
| Extensibility mechanism, Custom layers | The mechanism that provides you with capabilities to extend the Inference Engine and Model Optimizer so that they can work with topologies containing layers that are not yet supported |
|
||||
| <code>ICNNNetwork</code> | An Interface of the Convolutional Neural Network that Inference Engine reads from IR. Consists of topology, weights and biases |
|
||||
| <code>IExecutableNetwork</code> | An instance of the loaded network which allows the Inference Engine to request (several) infer requests and perform inference synchronously or asynchronously |
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
# Graph Debug Capabilities {#openvino_docs_IE_DG_Graph_debug_capabilities}
|
||||
|
||||
Inference Engine supports two different objects for a graph representation: the nGraph function and
|
||||
CNNNetwork. Both representations provide an API to get detailed information about the graph structure.
|
||||
|
||||
## nGraph Function
|
||||
|
||||
To receive additional messages about applied graph modifications, rebuild the nGraph library with
|
||||
the `-DNGRAPH_DEBUG_ENABLE=ON` option.
|
||||
|
||||
To visualize the nGraph function to the xDot format or to an image file, use the
|
||||
`ngraph::pass::VisualizeTree` graph transformation pass:
|
||||
```cpp
|
||||
#include <ngraph/pass/visualize_tree.hpp>
|
||||
|
||||
std::shared_ptr<ngraph::Function> nGraph;
|
||||
...
|
||||
ngraph::pass::VisualizeTree("after.png").run_on_function(nGraph); // Visualize the nGraph function to an image
|
||||
```
|
||||
|
||||
## CNNNetwork
|
||||
|
||||
To serialize the CNNNetwork to the Inference Engine Intermediate Representation (IR) format, use the
|
||||
`CNNNetwork::serialize(...)` method:
|
||||
```cpp
|
||||
std::shared_ptr<ngraph::Function> nGraph;
|
||||
...
|
||||
CNNNetwork network(nGraph);
|
||||
network.serialize("test_ir.xml", "test_ir.bin");
|
||||
```
|
||||
> **NOTE**: CNNNetwork created from the nGraph function might differ from the original nGraph
|
||||
> function because the Inference Engine applies some graph transformation.
|
||||
|
||||
## Deprecation Notice
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><strong>Deprecation Begins</strong></td>
|
||||
<td>June 1, 2020</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Removal Date</strong></td>
|
||||
<td>December 1, 2020</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
*Starting with the OpenVINO™ toolkit 2020.2 release, all of the features previously available through nGraph have been merged into the OpenVINO™ toolkit. As a result, all the features previously available through ONNX RT Execution Provider for nGraph have been merged with ONNX RT Execution Provider for OpenVINO™ toolkit.*
|
||||
|
||||
*Therefore, ONNX RT Execution Provider for nGraph will be deprecated starting June 1, 2020 and will be completely removed on December 1, 2020. Users are recommended to migrate to the ONNX RT Execution Provider for OpenVINO™ toolkit as the unified solution for all AI inferencing on Intel® hardware.*
|
||||
@@ -269,7 +269,7 @@ build/ - build directory
|
||||
```
|
||||
|
||||
2. **Include Inference Engine, nGraph and OpenCV libraries** in `project/CMakeLists.txt`
|
||||
[OpenCV](https://docs.opencv.org/master/db/df5/tutorial_linux_gcc_cmake.html) integration is needed mostly for pre-processing input data and ngraph for more complex applications using [ngraph API](nGraph_Flow.md).
|
||||
[OpenCV](https://docs.opencv.org/master/db/df5/tutorial_linux_gcc_cmake.html) integration is needed mostly for pre-processing input data and ngraph for more complex applications using [ngraph API](../nGraph_DG/nGraph_dg.md).
|
||||
``` cmake
|
||||
cmake_minimum_required(VERSION 3.0.0)
|
||||
project(project_name)
|
||||
@@ -298,20 +298,3 @@ Redistributable and Intel® C++ Compiler 2017 Redistributable packages are insta
|
||||
application folder or accessible via `%PATH%` environment variable.
|
||||
|
||||
[integration_process]: img/integration_process.png
|
||||
|
||||
## Deprecation Notice
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><strong>Deprecation Begins</strong></td>
|
||||
<td>June 1, 2020</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Removal Date</strong></td>
|
||||
<td>December 1, 2020</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
*Starting with the OpenVINO™ toolkit 2020.2 release, all of the features previously available through nGraph have been merged into the OpenVINO™ toolkit. As a result, all the features previously available through ONNX RT Execution Provider for nGraph have been merged with ONNX RT Execution Provider for OpenVINO™ toolkit.*
|
||||
|
||||
*Therefore, ONNX RT Execution Provider for nGraph will be deprecated starting June 1, 2020 and will be completely removed on December 1, 2020. Users are recommended to migrate to the ONNX RT Execution Provider for OpenVINO™ toolkit as the unified solution for all AI inferencing on Intel® hardware.*
|
||||
|
||||
@@ -27,7 +27,7 @@ latency penalty. So, for more real-time oriented usages, lower batch sizes (as l
|
||||
Refer to the [Benchmark App](../../inference-engine/samples/benchmark_app/README.md) sample, which allows latency vs. throughput measuring.
|
||||
|
||||
## Using Async API
|
||||
To gain better performance on accelerators, such as VPU or FPGA, the Inference Engine uses the asynchronous approach (see
|
||||
To gain better performance on accelerators, such as VPU, the Inference Engine uses the asynchronous approach (see
|
||||
[Integrating Inference Engine in Your Application (current API)](Integrate_with_customer_application_new_API.md)).
|
||||
The point is amortizing the costs of data transfers, by pipe-lining, see [Async API explained](@ref omz_demos_object_detection_demo_ssd_async_README).
|
||||
Since the pipe-lining relies on the availability of the parallel slack, running multiple inference requests in parallel is essential.
|
||||
|
||||
@@ -94,24 +94,7 @@ Refer to a dedicated description about [Intermediate Representation and Operatio
|
||||
OpenVINO toolkit is powered by nGraph capabilities for Graph construction API, Graph transformation engine and Reshape.
|
||||
nGraph Function is used as an intermediate representation for a model in the run-time underneath the CNNNetwork API.
|
||||
The conventional representation for CNNNetwork is still available if requested for backward compatibility when some conventional API methods are used.
|
||||
Please refer to the [Overview of nGraph Flow](nGraph_Flow.md) describing the details of nGraph integration into the Inference Engine and co-existence with the conventional representation.
|
||||
|
||||
**Deprecation Notice**
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><strong>Deprecation Begins</strong></td>
|
||||
<td>June 1, 2020</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Removal Date</strong></td>
|
||||
<td>December 1, 2020</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
*Starting with the OpenVINO™ toolkit 2020.2 release, all of the features previously available through nGraph have been merged into the OpenVINO™ toolkit. As a result, all the features previously available through ONNX RT Execution Provider for nGraph have been merged with ONNX RT Execution Provider for OpenVINO™ toolkit.*
|
||||
|
||||
*Therefore, ONNX RT Execution Provider for nGraph will be deprecated starting June 1, 2020 and will be completely removed on December 1, 2020. Users are recommended to migrate to the ONNX RT Execution Provider for OpenVINO™ toolkit as the unified solution for all AI inferencing on Intel® hardware.*
|
||||
Please refer to the [Overview of nGraph](../nGraph_DG/nGraph_dg.md) describing the details of nGraph representation.
|
||||
|
||||
## Inference Engine <a name = "IE"></a>
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ Refer to the sections below for details.
|
||||
> ```
|
||||
|
||||
Once you create the `ng_function`, you can use it to run computation on the Inference Engine.
|
||||
As it was shown in [Build a Model with nGraph Library](nGraphTutorial.md), `std::shared_ptr<ngraph::Function>` can be transformed into a `CNNNetwork`.
|
||||
As it was shown in [Build a Model with nGraph Library](../nGraph_DG/build_function.md), `std::shared_ptr<ngraph::Function>` can be transformed into a `CNNNetwork`.
|
||||
|
||||
|
||||
### <a name="stream">Stream as Input</a>
|
||||
@@ -98,21 +98,3 @@ const std::shared_ptr<ngraph::Function> ng_function = ngraph::onnx_import::impor
|
||||
|
||||
[onnx_header]: https://github.com/NervanaSystems/ngraph/blob/master/src/ngraph/frontend/onnx_import/onnx.hpp
|
||||
[onnx_model_zoo]: https://github.com/onnx/models
|
||||
|
||||
|
||||
## Deprecation Notice
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><strong>Deprecation Begins</strong></td>
|
||||
<td>June 1, 2020</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Removal Date</strong></td>
|
||||
<td>December 1, 2020</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
*Starting with the OpenVINO™ toolkit 2020.2 release, all of the features previously available through nGraph have been merged into the OpenVINO™ toolkit. As a result, all the features previously available through ONNX RT Execution Provider for nGraph have been merged with ONNX RT Execution Provider for OpenVINO™ toolkit.*
|
||||
|
||||
*Therefore, ONNX RT Execution Provider for nGraph will be deprecated starting June 1, 2020 and will be completely removed on December 1, 2020. Users are recommended to migrate to the ONNX RT Execution Provider for OpenVINO™ toolkit as the unified solution for all AI inferencing on Intel® hardware.*
|
||||
@@ -49,9 +49,11 @@ You can download the [pre-trained models](@ref omz_models_intel_index) using the
|
||||
|
||||
The officially supported Linux* build environment is the following:
|
||||
|
||||
* Ubuntu* 16.04 LTS 64-bit or CentOS* 7.4 64-bit
|
||||
* GCC* 5.4.0 (for Ubuntu* 16.04) or GCC* 4.8.5 (for CentOS* 7.4)
|
||||
* CMake* version 2.8.12 or higher
|
||||
* Ubuntu* 18.04 LTS 64-bit or CentOS* 7.6 64-bit
|
||||
* GCC* 7.5.0 (for Ubuntu* 18.04) or GCC* 4.8.5 (for CentOS* 7.6)
|
||||
* CMake* version 3.10 or higher
|
||||
|
||||
> **NOTE**: For building samples from the open-source version of OpenVINO™ toolkit, see the [build instructions on GitHub](https://github.com/openvinotoolkit/openvino/blob/master/build-instruction.md).
|
||||
|
||||
To build the C or C++ sample applications for Linux, go to the `<INSTALL_DIR>/inference_engine/samples/c` or `<INSTALL_DIR>/inference_engine/samples/cpp` directory, respectively, and run the `build_samples.sh` script:
|
||||
```sh
|
||||
@@ -99,7 +101,7 @@ for the debug configuration — in `<path_to_build_directory>/intel64/Debug/`.
|
||||
The recommended Windows* build environment is the following:
|
||||
* Microsoft Windows* 10
|
||||
* Microsoft Visual Studio* 2017, or 2019
|
||||
* CMake* version 2.8.12 or higher
|
||||
* CMake* version 3.10 or higher
|
||||
|
||||
> **NOTE**: If you want to use Microsoft Visual Studio 2019, you are required to install CMake 3.14.
|
||||
|
||||
|
||||
@@ -1,38 +1,61 @@
|
||||
Using Shape Inference {#openvino_docs_IE_DG_ShapeInference}
|
||||
==========================================
|
||||
|
||||
Inference Engine takes two kinds of model description as an input: [Intermediate Representation (IR)](../MO_DG/IR_and_opsets.md) and [nGraph::Function](nGraph_Flow.md) objects.
|
||||
Both should have fixed input shapes to be successfully loaded to the Inference Engine.
|
||||
To feed input data of a shape that is different from the model input shape, resize the model first.
|
||||
Inference Engine takes three kinds of a model description as an input, which are converted into an `InferenceEngine::CNNNetwork` object:
|
||||
1. [Intermediate Representation (IR)](../MO_DG/IR_and_opsets.md) through `InferenceEngine::Core::ReadNetwork`
|
||||
2. [ONNX model](../IE_DG/OnnxImporterTutorial.md) through `InferenceEngine::Core::ReadNetwork`
|
||||
3. [nGraph::Function](../nGraph_DG/nGraph_dg.md) through the constructor of `InferenceEngine::CNNNetwork`
|
||||
|
||||
Model resizing on the stage of <a href="_docs_MO_DG_prepare_model_convert_model_Converting_Model_General.html#when_to_specify_input_shapes">IR generation</a> or [nGraph::Function creation](nGraphTutorial.md) is the recommended approach.
|
||||
OpenVINO™ provides the following experimental methods for runtime model reshaping:
|
||||
`InferenceEngine::CNNNetwork` keeps an `ngraph::Function` object with the model description internally.
|
||||
The object should have fully defined input shapes to be successfully loaded to the Inference Engine plugins.
|
||||
To resolve undefined input dimensions of a model, call the `CNNNetwork::reshape` method providing new input shapes before loading to the Inference Engine plugin.
|
||||
|
||||
1. Setting a new input shape with the `InferenceEngine::CNNNetwork::reshape` method
|
||||
|
||||
`InferenceEngine::CNNNetwork::reshape` method updates input shapes and propagates them down to the outputs of the model through all intermediate layers.
|
||||
|
||||
Shape propagation for `InferenceEngine::CNNNetwork` objects created from `nGraph::Function` or IR of the version 10 works through the `nGraph` shape inference mechanism.
|
||||
`InferenceEngine::CNNNetwork` objects created from lower IR versions are considered deprecated and may be reshaped incorrectly or give unexpected results.
|
||||
|
||||
To keep the v10 IR resizable by the `InferenceEngine::CNNNetwork::reshape` method, convert the model with the additional Model Optimizer key `--keep_shape_ops`.
|
||||
|
||||
2. Setting a new batch dimension value with the `InferenceEngine::CNNNetwork::setBatchSize` method
|
||||
|
||||
The meaning of a model batch may vary depending on choices you made during the model designing.
|
||||
The `InferenceEngine::CNNNetwork::setBatchSize` method deduces index of batch dimension relying only on the input rank.
|
||||
This method does not work for models with a non-zero index batch placement or models with inputs without a batch dimension.
|
||||
Run the following code right after `InferenceEngine::CNNNetwork` creation to explicitly check for model input names and shapes:
|
||||
```cpp
|
||||
CNNNetwork network = ... // read IR / ONNX model or create from nGraph::Function explicitly
|
||||
const auto parameters = network.getFunction()->get_parameters();
|
||||
for (const auto & parameter : parameters) {
|
||||
std::cout << "name: " << parameter->get_friendly_name() << " shape: " << parameter->get_partial_shape() << std::endl;
|
||||
if (parameter->get_partial_shape().is_dynamic())
|
||||
std::cout << "ATTENTION: Input shape is not fully defined. Use the CNNNetwork::reshape method to resolve it." << std::endl;
|
||||
}
|
||||
```
|
||||
|
||||
Batch-setting algorithm does not involve shape inference mechanism.
|
||||
Batch of input and output shapes for all layers is set to a new batch value without layer validation.
|
||||
It may cause both positive and negative side effects.
|
||||
|
||||
Due to the limitations described above, the current method is recommended for simple image processing models only.
|
||||
To feed input data of a shape that is different from the model input shape, reshape the model first.
|
||||
|
||||
OpenVINO™ provides the following methods for runtime model reshaping:
|
||||
|
||||
Practically, some models are not ready to be resized. In this case, a new input shape cannot be set with the Model Optimizer or the `InferenceEngine::CNNNetwork::reshape` method.
|
||||
* **Set a new input shape** with the `InferenceEngine::CNNNetwork::reshape` method.<br>
|
||||
The `InferenceEngine::CNNNetwork::reshape` method updates input shapes and propagates them down to the outputs of the model through all intermediate layers.
|
||||
You can reshape a model multiple times like in this application scheme:
|
||||
```
|
||||
ReadNetwork -> reshape(input_1_shape) -> LoadNetwork -> infer(input_1)
|
||||
\
|
||||
-> reshape(input_2_shape) -> LoadNetwork -> infer(input_2)
|
||||
```
|
||||
> **NOTES**:
|
||||
> - Starting with the 2021.1 release, the Model Optimizer converts topologies keeping shape-calculating sub-graphs by default, which enables correct shape propagation during reshaping.
|
||||
> - Older versions of IRs are not guaranteed to reshape successfully. Please regenerate them with the Model Optimizer of the latest version of OpenVINO™.<br>
|
||||
> - If an ONNX model does not have a fully defined input shape and the model was imported with the ONNX importer, reshape the model before loading it to the plugin.
|
||||
* **Set a new batch dimension value** with the `InferenceEngine::CNNNetwork::setBatchSize` method.<br>
|
||||
The meaning of a model batch may vary depending on the model design.
|
||||
The `InferenceEngine::CNNNetwork::setBatchSize` method deduces the index of a batch dimension based only on the input rank.
|
||||
This method does not work for models with a non-zero index batch placement or models with inputs without a batch dimension.
|
||||
The batch-setting algorithm does not involve the shape inference mechanism.
|
||||
Batch of input and output shapes for all layers is set to a new batch value without layer validation.
|
||||
It may cause both positive and negative side effects.
|
||||
Due to the limitations described above, the current method is not recommended to use.
|
||||
If you need to set a new batch size for the model, use the `CNNNetwork::reshape` method instead.
|
||||
|
||||
## Troubleshooting Resize Errors
|
||||
Do not use runtime reshaping methods simultaneously, especially do not call the `CNNNetwork::reshape` method after you use `InferenceEngine::CNNNetwork::setBatchSize`.
|
||||
The `InferenceEngine::CNNNetwork::setBatchSize` method causes irreversible conversion of the internal model representation into the legacy model representation.
|
||||
The method does not use nGraph for shape inference which leads to reduced reshape opportunities and may affect the performance of the model.
|
||||
|
||||
There are other approaches to reshape the model during the stage of <a href="_docs_MO_DG_prepare_model_convert_model_Converting_Model_General.html#when_to_specify_input_shapes">IR generation</a> or [nGraph::Function creation](../nGraph_DG/build_function.md).
|
||||
|
||||
Practically, some models are not ready to be reshaped. In this case, a new input shape cannot be set with the Model Optimizer or the `InferenceEngine::CNNNetwork::reshape` method.
|
||||
|
||||
## Troubleshooting Reshape Errors
|
||||
|
||||
Operation semantics may impose restrictions on input shapes of the operation.
|
||||
Shape collision during shape propagation may be a sign that a new shape does not satisfy the restrictions.
|
||||
@@ -42,7 +65,7 @@ Examples of such operations:
|
||||
- <a href="_docs_MO_DG_prepare_model_convert_model_IR_V10_opset1.html#Reshape">`Reshape` operation</a> with a hard-coded output shape value
|
||||
- <a href="_docs_MO_DG_prepare_model_convert_model_IR_V10_opset1.html#MatMul">`MatMul` operation</a> with the `Const` second input cannot be resized by spatial dimensions due to operation semantics
|
||||
|
||||
Model structure and logic should not change significantly after resizing.
|
||||
Model structure and logic should not change significantly after model reshaping.
|
||||
- The Global Pooling operation is commonly used to reduce output feature map of classification models output.
|
||||
Having the input of the shape [N, C, H, W], Global Pooling returns the output of the shape [N, C, 1, 1].
|
||||
Model architects usually express Global Pooling with the help of the `Pooling` operation with the fixed kernel size [H, W].
|
||||
@@ -50,12 +73,12 @@ During spatial reshape, having the input of the shape [N, C, H1, W1], Pooling wi
|
||||
It breaks the classification model structure.
|
||||
For example, [publicly available Inception family models from TensorFlow*](https://github.com/tensorflow/models/tree/master/research/slim#pre-trained-models) have this issue.
|
||||
|
||||
- Resizing the model input shape may significantly affect its accuracy.
|
||||
- Changing the model input shape may significantly affect its accuracy.
|
||||
For example, Object Detection models from TensorFlow have resizing restrictions by design.
|
||||
To keep the model valid after the reshape, choose a new input shape that satisfies conditions listed in the `pipeline.config` file.
|
||||
For details, refer to the <a href="_docs_MO_DG_prepare_model_convert_model_tf_specific_Convert_Object_Detection_API_Models.html#tf_od_custom_input_shape">Tensorflow Object Detection API models resizing techniques</a>.
|
||||
|
||||
## Usage of Reshape Method
|
||||
## Usage of Reshape Method <a name="usage_of_reshape_method"></a>
|
||||
|
||||
The primary method of the feature is `InferenceEngine::CNNNetwork::reshape`.
|
||||
It gets new input shapes and propagates it from input to output for all intermediates layers of the given network.
|
||||
@@ -110,20 +133,3 @@ Shape Inference feature is used in [Smart classroom sample](@ref omz_demos_smart
|
||||
|
||||
Inference Engine provides a special mechanism that allows to add the support of shape inference for custom operations.
|
||||
This mechanism is described in the [Extensibility documentation](Extensibility_DG/Intro.md)
|
||||
|
||||
## Deprecation Notice
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><strong>Deprecation Begins</strong></td>
|
||||
<td>June 1, 2020</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Removal Date</strong></td>
|
||||
<td>December 1, 2020</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
*Starting with the OpenVINO™ toolkit 2020.2 release, all of the features previously available through nGraph have been merged into the OpenVINO™ toolkit. As a result, all the features previously available through ONNX RT Execution Provider for nGraph have been merged with ONNX RT Execution Provider for OpenVINO™ toolkit.*
|
||||
|
||||
*Therefore, ONNX RT Execution Provider for nGraph will be deprecated starting June 1, 2020 and will be completely removed on December 1, 2020. Users are recommended to migrate to the ONNX RT Execution Provider for OpenVINO™ toolkit as the unified solution for all AI inferencing on Intel® hardware.*
|
||||
|
||||
@@ -3,7 +3,7 @@ Introduction to Inference Engine {#openvino_docs_IE_DG_inference_engine_intro}
|
||||
|
||||
After you have used the Model Optimizer to create an Intermediate Representation (IR), use the Inference Engine to infer the result for a given input data.
|
||||
|
||||
Inference Engine is a set of C++ libraries providing a common API to deliver inference solutions on the platform of your choice: CPU, GPU, VPU, or FPGA. Use the Inference Engine API to read the Intermediate Representation, set the input and output formats, and execute the model on devices. While the C++ libraries is the primary implementation, C libraries and Python bindings are also available.
|
||||
Inference Engine is a set of C++ libraries providing a common API to deliver inference solutions on the platform of your choice: CPU, GPU, or VPU. Use the Inference Engine API to read the Intermediate Representation, set the input and output formats, and execute the model on devices. While the C++ libraries is the primary implementation, C libraries and Python bindings are also available.
|
||||
|
||||
For Intel® Distribution of OpenVINO™ toolkit, Inference Engine binaries are delivered within release packages.
|
||||
|
||||
@@ -13,7 +13,7 @@ To learn about how to use the Inference Engine API for your application, see the
|
||||
|
||||
For complete API Reference, see the [API Reference](usergroup29.html) section.
|
||||
|
||||
Inference Engine uses a plugin architecture. Inference Engine plugin is a software component that contains complete implementation for inference on a certain Intel® hardware device: CPU, GPU, VPU, FPGA, etc. Each plugin implements the unified API and provides additional hardware-specific APIs.
|
||||
Inference Engine uses a plugin architecture. Inference Engine plugin is a software component that contains complete implementation for inference on a certain Intel® hardware device: CPU, GPU, VPU, etc. Each plugin implements the unified API and provides additional hardware-specific APIs.
|
||||
|
||||
Modules in the Inference Engine component
|
||||
---------------------------------------
|
||||
@@ -53,7 +53,6 @@ For each supported target device, Inference Engine provides a plugin — a DLL/s
|
||||
| ------------- | ------------- |
|
||||
|CPU| Intel® Xeon® with Intel® AVX2 and AVX512, Intel® Core™ Processors with Intel® AVX2, Intel® Atom® Processors with Intel® SSE |
|
||||
|GPU| Intel® Processor Graphics, including Intel® HD Graphics and Intel® Iris® Graphics
|
||||
|FPGA| Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA, Intel® Vision Accelerator Design with an Intel® Arria 10 FPGA (Speed Grade 2) |
|
||||
|MYRIAD| Intel® Neural Compute Stick 2 powered by the Intel® Movidius™ Myriad™ X|
|
||||
|GNA| Intel® Speech Enabling Developer Kit, Amazon Alexa* Premium Far-Field Developer Kit, Intel® Pentium® Silver J5005 Processor, Intel® Pentium® Silver N5000 Processor, Intel® Celeron® J4005 Processor, Intel® Celeron® J4105 Processor, Intel® Celeron® Processor N4100, Intel® Celeron® Processor N4000, Intel® Core™ i3-8121U Processor, Intel® Core™ i7-1065G7 Processor, Intel® Core™ i7-1060G7 Processor, Intel® Core™ i5-1035G4 Processor, Intel® Core™ i5-1035G7 Processor, Intel® Core™ i5-1035G1 Processor, Intel® Core™ i5-1030G7 Processor, Intel® Core™ i5-1030G4 Processor, Intel® Core™ i3-1005G1 Processor, Intel® Core™ i3-1000G1 Processor, Intel® Core™ i3-1000G4 Processor
|
||||
|HETERO|Automatic splitting of a network inference between several devices (for example if a device doesn't support certain layers|
|
||||
@@ -65,7 +64,6 @@ The table below shows the plugin libraries and additional dependencies for Linux
|
||||
|--------|------------------------|-------------------------------------------------|--------------------------|--------------------------------------------------------------------------------------------------------|
|
||||
| CPU | `libMKLDNNPlugin.so` | `libinference_engine_lp_transformations.so` | `MKLDNNPlugin.dll` | `inference_engine_lp_transformations.dll` |
|
||||
| GPU | `libclDNNPlugin.so` | `libinference_engine_lp_transformations.so`, `libOpenCL.so` | `clDNNPlugin.dll` | `OpenCL.dll`, `inference_engine_lp_transformations.dll` |
|
||||
| FPGA | `libdliaPlugin.so` | `libdla_compiler_core.so`, `libdla_runtime_core.so`, `libcrypto.so`, `libalteracl.so`, `liblpsolve5525.so`, `libprotobuf.so`, `libacl_emulator_kernel_rt.so` | `dliaPlugin.dll` | `dla_compiler_core.dll`, `dla_runtime_core.dll`, `crypto.dll`, `alteracl.dll`, `lpsolve5525.dll`, `protobuf.dll`, `acl_emulator_kernel_rt.dll`
|
||||
| MYRIAD | `libmyriadPlugin.so` | `libusb.so`, `libinference_engine_lp_transformations.so` | `myriadPlugin.dll` | `usb.dll`, `inference_engine_lp_transformations.dll` |
|
||||
| HDDL | `libHDDLPlugin.so` | `libbsl.so`, `libhddlapi.so`, `libmvnc-hddl.so`, `libinference_engine_lp_transformations.so`| `HDDLPlugin.dll` | `bsl.dll`, `hddlapi.dll`, `json-c.dll`, `libcrypto-1_1-x64.dll`, `libssl-1_1-x64.dll`, `mvnc-hddl.dll`, `inference_engine_lp_transformations.dll` |
|
||||
| GNA | `libGNAPlugin.so` | `libgna.so`, `libinference_engine_lp_transformations.so` | `GNAPlugin.dll` | `gna.dll`, `inference_engine_lp_transformations.dll` |
|
||||
|
||||
@@ -1,81 +0,0 @@
|
||||
# Build a Model with nGraph Library {#openvino_docs_IE_DG_nGraphTutorial}
|
||||
|
||||
This section illustrates how to construct an nGraph function
|
||||
composed of operations from the `opset3` namespace. Once created,
|
||||
it can wrap into a `CNNNetwork`, creating utility for data scientists
|
||||
or app developers to define a deep-learning model in a neutral way
|
||||
that does not depend on existing Deep Learning (DL) frameworks.
|
||||
|
||||
Operation Set `opsetX` integrates a list of nGraph pre-compiled operations that work
|
||||
for this purpose. In other words, `opsetX` defines a set of operations for building a graph.
|
||||
|
||||
For a complete list of operation sets supported by Inference Engine, see [Available Operations Sets](../ops/opset.md).
|
||||
|
||||
To add custom nGraph operations to an existing `CNNNetwork`, see
|
||||
the [Add Custom nGraph Operations](Extensibility_DG/Intro.md) document.
|
||||
|
||||
Now that you can build graphs with anything from the `opset3` definition, some
|
||||
parameters for shape-relevant (or shape-specific) inputs can be added. The
|
||||
following code prepares a graph for shape-relevant parameters.
|
||||
|
||||
> **NOTE**: `validate_nodes_and_infer_types(ops)` must be included for partial shape inference.
|
||||
|
||||
```cpp
|
||||
#include "ngraph/opsets/opset.hpp"
|
||||
#include "ngraph/opsets/opset3.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace ngraph;
|
||||
|
||||
auto arg0 = make_shared<opset3::Parameter>(element::f32, Shape{7});
|
||||
auto arg1 = make_shared<opset3::Parameter>(element::f32, Shape{7});
|
||||
// Create an 'Add' operation with two inputs 'arg0' and 'arg1'
|
||||
auto add0 = make_shared<opset3::Add>(arg0, arg1);
|
||||
auto abs0 = make_shared<opset3::Abs>(add0);
|
||||
// Create a node whose inputs/attributes will be specified later
|
||||
auto acos0 = make_shared<opset3::Acos>();
|
||||
// Create a node using opset factories
|
||||
auto add1 = shared_ptr<Node>(get_opset3().create("Add"));
|
||||
// Set inputs to nodes explicitly
|
||||
acos0->set_argument(0, add0);
|
||||
add1->set_argument(0, acos0);
|
||||
add1->set_argument(1, abs0);
|
||||
|
||||
// Run shape inference on the nodes
|
||||
NodeVector ops{arg0, arg1, add0, abs0, acos0, add1};
|
||||
validate_nodes_and_infer_types(ops);
|
||||
|
||||
// Create a graph with one output (add1) and four inputs (arg0, arg1)
|
||||
auto ng_function = make_shared<Function>(OutputVector{add1}, ParameterVector{arg0, arg1});
|
||||
|
||||
```
|
||||
|
||||
To wrap it into a CNNNetwork, use:
|
||||
```cpp
|
||||
CNNNetwork net (ng_function);
|
||||
```
|
||||
|
||||
## Deprecation Notice
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><strong>Deprecation Begins</strong></td>
|
||||
<td>June 1, 2020</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Removal Date</strong></td>
|
||||
<td>December 1, 2020</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
*Starting with the OpenVINO™ toolkit 2020.2 release, all of the features previously available through nGraph have been merged into the OpenVINO™ toolkit. As a result, all the features previously available through ONNX RT Execution Provider for nGraph have been merged with ONNX RT Execution Provider for OpenVINO™ toolkit.*
|
||||
|
||||
*Therefore, ONNX RT Execution Provider for nGraph will be deprecated starting June 1, 2020 and will be completely removed on December 1, 2020. Users are recommended to migrate to the ONNX RT Execution Provider for OpenVINO™ toolkit as the unified solution for all AI inferencing on Intel® hardware.*
|
||||
|
||||
## See Also
|
||||
|
||||
* [Available Operation Sets](../ops/opset.md)
|
||||
* [Operation Set `opset1` Specification](../ops/opset1.md)
|
||||
* [Operation Set `opset2` Specification](../ops/opset2.md)
|
||||
* [Operation Set `opset3` Specification](../ops/opset3.md)
|
||||
* [Inference Engine Extensibility Developer Guide](Extensibility_DG/Intro.md)
|
||||
@@ -1,151 +0,0 @@
|
||||
# Introduction to nGraph Flow in Inference Engine {#openvino_docs_IE_DG_nGraph_Flow}
|
||||
|
||||
## New Run-Time Intermediate Representation (IR): nGraph
|
||||
|
||||
Starting from the OpenVINO™ release 2020.1, the Inference Engine integrates the
|
||||
nGraph Core.
|
||||
That implies that the Inference Engine uses a new way to represent a model in run time underneath of
|
||||
the conventional `CNNNetwork` API, which is an instance of `ngraph::Function`.
|
||||
|
||||
Besides the representation update, nGraph integration resulted in the following changes and new features:
|
||||
|
||||
1. New operations sets. When operations from the nGraph Core were combined with conventional layers
|
||||
from `CNNNetwork`, there were created a [new sets of operations called `opset1`, `opset2` and etc.](../ops/opset.md),
|
||||
which covered both interfaces except several not very important cases.
|
||||
Operations from `opset3` are generated by the Model Optimizer and are accepted in the Inference Engine.
|
||||
|
||||
2. New version approach that attaches a version to each operation rather than to the entire IR file format.
|
||||
IR is still versioned but has a different meaning. For details, see [Deep Learning Network Intermediate Representation and Operation Sets in OpenVINO™](../MO_DG/IR_and_opsets.md).
|
||||
|
||||
3. Creating models in run-time without loading IR from an xml/binary file. You can enable it by creating
|
||||
`ngraph::Function` passing it to `CNNNetwork`.
|
||||
|
||||
4. Run-time reshape capability and constant folding are implemented through the nGraph code for more operations compared to previous releases.
|
||||
As a result, more models can be reshaped. For details, see the [dedicated guide about the reshape capability](ShapeInference.md).
|
||||
|
||||
5. Loading model from ONNX format without converting it to the Inference Engine IR.
|
||||
|
||||
The conventional flow that is not based on nGraph is still available.
|
||||
The complete picture of co-existence of legacy and new flows is presented below.
|
||||
The rest of the document describes the coexistence of legacy and new flows showed in the picture below:
|
||||
|
||||

|
||||
|
||||
|
||||
## Read the Intermediate Representation to `CNNNetwork`
|
||||
|
||||
As the new operation set is introduced, the Model Optimizer generates the IR version 10 using the new operations by default.
|
||||
Each layer generated in the IR has a semantics matching to the corresponding operation from the nGraph namespaces `opset1`, `opset2` etc.
|
||||
The IR version 10 automatically triggers the nGraph flow inside the Inference Engine.
|
||||
When such IR is read in an application, the Inference Engine IR reader produces `CNNNetwork` that encapsulates the `ngraph::Function` instance underneath.
|
||||
Thus the OpenVINO IR becomes a new serialization format for the nGraph IR, and it can be deserialized reading the `CNNNetwork`.
|
||||
|
||||
> **IMPORTANT**: Conventional interfaces are used (`CNNNetwork`, the reader), so no changes required in most applications.
|
||||
|
||||
> **NOTE**: While you still can use old APIs, there is an independent process of continuous improvements in the Inference Engine API.
|
||||
> These changes are independent of nGraph integration and do not enable or disable new features.
|
||||
|
||||
Interpretation of the IR version 10 differs from the old IR version.
|
||||
Besides having a different operations set, the IR version 10 ignores the shapes and data types assigned to the ports in an XML file.
|
||||
Both shapes and types are reinferred while loading to the Inference Engine using the nGraph shape and type propagation function that is a part of each nGraph operation.
|
||||
|
||||
### Legacy IR Versions
|
||||
|
||||
Starting from the OpenVINO™ release 2021.1 you cannot read IR version 7 and lower in the Inference Engine.
|
||||
|
||||
## Build a Model in the Application
|
||||
|
||||
Alternative method to feed the Inference Engine with a model is to create the model in the run time.
|
||||
It is achieved by creation of the `ngraph::Function` construction using nGraph operation classes and optionally user-defined operations.
|
||||
For details, see [Add Custom nGraph Operations](Extensibility_DG/AddingNGraphOps.md) and [examples](nGraphTutorial.md).
|
||||
At this stage, the code is completely independent of the rest of the Inference Engine code and can be built separately.
|
||||
After you construct an instance of `ngraph::Function`, you can use it to create `CNNNetwork` by passing it to the new constructor for this class.
|
||||
|
||||
Initializing `CNNNetwork` from the nGraph Function means encapsulating the object and not converting it to a conventional representation.
|
||||
Going to low-level details, technically it is achieved by using another class for the `CNNNetwork` internals.
|
||||
The old representation that is used for former versions of IR before version 10 uses `CNNNetworkImpl`.
|
||||
The new representation that is built around nGraph uses `CNNNetworkNGraphImpl`.
|
||||
|
||||

|
||||
|
||||
## Automatic Conversion to the Old Representation
|
||||
|
||||
The old representation is still required in the cases listed below.
|
||||
When old representation is required, the conversion from the `ngraph::Function` to the old representation is called automatically.
|
||||
The following methods lead to the automatic conversion:
|
||||
|
||||
1. Using the old API, which is expected to produce an old representation. Guaranteed to be read-only. Once you call such a method, the original nGraph representation is preserved and continues to be used in the successive calls.
|
||||
|
||||
1.1. `CNNNetwork::serialize`. Dumps the old representation after automatically called conversion. Cannot be used to dump IR V10. For details, see [Graph Debug Capabilities](Graph_debug_capabilities.md).
|
||||
|
||||
2. Calling `CNNNetwork` methods that modify the model. After that nGraph representation is lost and cannot be used afterwards.
|
||||
|
||||
1.1. `CNNNetwork::addLayer`
|
||||
|
||||
1.2. CNNNetwork::setBatchSize. Still implemented through old logic for backward compatibility without using nGraph capabilities.
|
||||
For details, see [Using Shape Inference](ShapeInference.md).
|
||||
|
||||
3. Using methods that return objects inside an old representation.
|
||||
Using these methods does not mean modification of the model, but you are not limited by the API to make read-only changes.
|
||||
These methods should be used in the read-only mode with respect to a model representation.
|
||||
If the model is changed, for example attribute of some layer is changed or layers are reconnected, the modification is lost whenever any method that uses nGraph is called, including methods inside plugins like CNNNetwork::reshape.
|
||||
It is hard to predict whether the nGraph function is used in a plugin or other methods of CNNNetworks, so modifying a network using the following methods is *strongly not recommended*.
|
||||
This is an important limitation that is introduced for the old API calls listed below:
|
||||
|
||||
1.1. `Data::getInputTo`
|
||||
|
||||
1.2. `Data::getCreatorLayer`
|
||||
|
||||
1.3. `CNNNetwork::getLayerByName`
|
||||
|
||||
1.4. Iterating over `CNNLayer` objects in `CNNNetwork`: `CNNNetwork::begin`, `details::CNNNetworkIterator` class.
|
||||
|
||||
4. Using a conventional plugin that accepts the old representation only.
|
||||
|
||||
Though the conversion is always a one-way process, which means there is no method to convert back, there are important caveats.
|
||||
|
||||
In the cases [1] and [3], both representations are held underneath and you should use the old representation in the read-only mode only from the caller side.
|
||||
It is hard to track from the Inference Engine side whether the API is used in the read-only mode or for modification of the model.
|
||||
|
||||
That is why when using potentially modifying methods listed in section [3] above, you should not modify the model via those methods.
|
||||
Use a direct manipulation of the nGraph function instead.
|
||||
|
||||
## Conversion Function
|
||||
|
||||
Inference Engine implements the conversion function that is used when the nGraph function is transformed to the old `CNNNetworkImpl` representation.
|
||||
This conversion function is hidden and you cannot call it directly from the application.
|
||||
Nevertheless, it is an important component of the model transformation pipeline in the Inference Engine.
|
||||
Some issues of models may be caught during the conversion process in this function.
|
||||
Exceptions are thrown in this function, and you should know what this function does to find a root cause.
|
||||
|
||||
The conversion function performs the following steps:
|
||||
|
||||
1. Convert and decompose some operations as the first step of the nGraph function preparation for optimization.
|
||||
Reduce operation set to easily optimize it at the next stages.
|
||||
For example, decomposing of BatchNormInference happens at this stage.
|
||||
|
||||
2. Optimizing transformations that usually happen in the Model Optimizer are called here, because the nGraph function is not always read from an already optimized IR.
|
||||
|
||||
3. Changing operation set from `opsetX` to legacy layer semantics described in the [Legacy Layers Catalog](../MO_DG/prepare_model/convert_model/Legacy_IR_Layers_Catalog_Spec.md).
|
||||
The model is still represented as the nGraph function at this stage, but the operation set is completely different.
|
||||
|
||||
4. One-to-one conversion of nGraph representation to the corresponding `CNNNetworkImpl` without changing its semantics.
|
||||
You can see the result of the conversion by calling the `CNNNetwork::serialize` method, which produces legacy IR semantics, which is not nGraph-based even if it is applied to `CNNNetwork` constructed from the nGraph Function.
|
||||
It may help in debugging, see [Graph Debug Capabilities](Graph_debug_capabilities.md) to view all options for dumping new and old IR representations.
|
||||
|
||||
## Deprecation Notice
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><strong>Deprecation Begins</strong></td>
|
||||
<td>June 1, 2020</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Removal Date</strong></td>
|
||||
<td>December 1, 2020</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
*Starting with the OpenVINO™ toolkit 2020.2 release, all of the features previously available through nGraph have been merged into the OpenVINO™ toolkit. As a result, all the features previously available through ONNX RT Execution Provider for nGraph have been merged with ONNX RT Execution Provider for OpenVINO™ toolkit.*
|
||||
|
||||
*Therefore, ONNX RT Execution Provider for nGraph will be deprecated starting June 1, 2020 and will be completely removed on December 1, 2020. Users are recommended to migrate to the ONNX RT Execution Provider for OpenVINO™ toolkit as the unified solution for all AI inferencing on Intel® hardware.*
|
||||
@@ -63,9 +63,9 @@ CNNNetwork network = core.ReadNetwork(strModel, make_shared_blob<uint8_t>({Preci
|
||||
|
||||
- Intel® Distribution of OpenVINO™ toolkit home page: [https://software.intel.com/en-us/openvino-toolkit](https://software.intel.com/en-us/openvino-toolkit)
|
||||
- OpenVINO™ toolkit online documentation: [https://docs.openvinotoolkit.org](https://docs.openvinotoolkit.org)
|
||||
- Model Optimizer Developer Guide: [Model Optimizer Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html)
|
||||
- Inference Engine Developer Guide: [Inference Engine Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Deep_Learning_Inference_Engine_DevGuide.html)
|
||||
- For more information on Sample Applications, see the [Inference Engine Samples Overview](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Samples_Overview.html)
|
||||
- Model Optimizer Developer Guide: [Model Optimizer Developer Guide](../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md)
|
||||
- Inference Engine Developer Guide: [Inference Engine Developer Guide](Deep_Learning_Inference_Engine_DevGuide.md)
|
||||
- For more information on Sample Applications, see the [Inference Engine Samples Overview](Samples_Overview.html)
|
||||
- For information on a set of pre-trained models, see the [Overview of OpenVINO™ Toolkit Pre-Trained Models](@ref omz_models_intel_index)
|
||||
- For information on Inference Engine Tutorials, see the [Inference Tutorials](https://github.com/intel-iot-devkit/inference-tutorials-generic)
|
||||
- For IoT Libraries and Code Samples see the [Intel® IoT Developer Kit](https://github.com/intel-iot-devkit).
|
||||
|
||||
@@ -14,8 +14,8 @@ OpenVINO™ toolkit is officially supported and validated on the following platf
|
||||
|
||||
| Host | OS (64-bit) |
|
||||
| :--- | :--- |
|
||||
| Development | Ubuntu* 16.04/CentOS* 7.4/MS Windows* 10 |
|
||||
| Target | Ubuntu* 16.04/CentOS* 7.4/MS Windows* 10 |
|
||||
| Development | Ubuntu* 18.04, CentOS* 7.5, MS Windows* 10 |
|
||||
| Target | Ubuntu* 18.04, CentOS* 7.5, MS Windows* 10 |
|
||||
|
||||
The CPU Plugin supports inference on Intel® Xeon® with Intel® Advanced Vector Extensions 2 (Intel® AVX2), Intel® Advanced Vector Extensions 512 (Intel® AVX-512), and AVX512_BF16, Intel® Core™
|
||||
Processors with Intel® AVX2, Intel Atom® Processors with Intel® Streaming SIMD Extensions (Intel® SSE).
|
||||
|
||||
@@ -19,294 +19,4 @@ Intel will be transitioning to the next-generation programmable deep-learning so
|
||||
|
||||
Intel® Distribution of OpenVINO™ toolkit 2020.3.X LTS release will continue to support Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA and the Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA. For questions about next-generation programmable deep-learning solutions based on FPGAs, please talk to your sales representative or contact us to get the latest FPGA updates.
|
||||
|
||||
## Introducing FPGA Plugin
|
||||
|
||||
The FPGA plugin provides an opportunity for high performance scoring of neural networks on Intel® FPGA devices.
|
||||
|
||||
> **NOTE**: Before using the FPGA plugin, ensure that you have installed and configured either the Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA (Speed Grade 2) or the Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA. For installation and configuration details, see [FPGA installation](Supported_Devices.md).
|
||||
|
||||
## Heterogeneous Execution
|
||||
|
||||
When your topology contains layers that are not supported by the Intel® FPGA plugin, use [Heterogeneous plugin](HETERO.md) with dedicated fallback device.
|
||||
|
||||
If a network has layers that are not supported in the Intel® FPGA plugin or in a fallback plugin, you can implement a custom layer on the CPU/GPU and use the [Extensibility mechanism](../Extensibility_DG/Intro.md).
|
||||
In addition to adding custom kernels, you must still point to the CPU plugin or the GPU plugin as fallback devices for heterogeneous plugin.
|
||||
|
||||
## Supported Networks
|
||||
|
||||
The following network topologies are supported in heterogeneous mode, running on FPGA with fallback to CPU or GPU devices.
|
||||
|
||||
> **IMPORTANT**: Use only bitstreams from the current version of the OpenVINO toolkit. Bitstreams from older versions of the OpenVINO toolkit are incompatible with later versions of the OpenVINO toolkit. For example, you cannot use the `1-0-1_A10DK_FP16_Generic` bitstream, when the OpenVINO toolkit supports the `2019R2_PL2_FP16_InceptionV1_SqueezeNet_VGG_YoloV3.aocx` bitstream.
|
||||
|
||||
|
||||
| Network | Bitstreams (Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA (Speed Grade 2)) | Bitstreams (Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA) |
|
||||
|:-------------------------------------|:-------------------------------------------------------------------|:---------------------------------------------------------------------------------------------|
|
||||
| AlexNet | 2020-4_PL2_FP16_AlexNet_GoogleNet_SSD300_Generic, 2020-4_PL2_FP11_AlexNet_GoogleNet_Generic | 2020-4_RC_FP16_AlexNet_GoogleNet_Generic, 2020-4_RC_FP11_AlexNet_GoogleNet_Generic |
|
||||
| GoogleNet v1 | 2020-4_PL2_FP16_AlexNet_GoogleNet_SSD300_Generic, 2020-4_PL2_FP11_AlexNet_GoogleNet_Generic | 2020-4_RC_FP16_AlexNet_GoogleNet_Generic, 2020-4_RC_FP11_AlexNet_GoogleNet_Generic |
|
||||
| VGG-16 | 2020-4_PL2_FP16_SqueezeNet_TinyYolo_VGG, 2020-4_PL2_FP11_InceptionV1_ResNet_VGG | 2020-4_RC_FP16_InceptionV1_SqueezeNet_TinyYolo_VGG, 2020-4_RC_FP16_ResNet_TinyYolo_VGG |
|
||||
| VGG-19 | 2020-4_PL2_FP16_SqueezeNet_TinyYolo_VGG, 2020-4_PL2_FP11_InceptionV1_ResNet_VGG | 2020-4_RC_FP16_InceptionV1_SqueezeNet_TinyYolo_VGG, 2020-4_RC_FP16_ResNet_TinyYolo_VGG |
|
||||
| SqueezeNet v 1.0 | 2020-4_PL2_FP16_SqueezeNet_TinyYolo_VGG, 2020-4_PL2_FP11_SqueezeNet | 2020-4_RC_FP16_InceptionV1_SqueezeNet_YoloV3, 2020-4_RC_FP16_InceptionV1_SqueezeNet_YoloV3 |
|
||||
| SqueezeNet v 1.1 | 2020-4_PL2_FP16_SqueezeNet_TinyYolo_VGG, 2020-4_PL2_FP11_SqueezeNet | 2020-4_RC_FP16_InceptionV1_SqueezeNet_YoloV3, 2020-4_RC_FP16_InceptionV1_SqueezeNet_YoloV3 |
|
||||
| ResNet-18 | 2020-4_PL2_FP16_ResNet_YoloV3, 2020-4_PL2_FP11_InceptionV1_ResNet_VGG | 2020-4_RC_FP16_ResNet_YoloV3, 2020-4_RC_FP16_ResNet_TinyYolo_VGG |
|
||||
| ResNet-50 | 2020-4_PL2_FP16_ResNet_YoloV3, 2020-4_PL2_FP11_InceptionV1_ResNet_VGG | 2020-4_RC_FP16_ResNet_YoloV3, 2020-4_RC_FP16_ResNet_TinyYolo_VGG |
|
||||
| ResNet-101 | 2020-4_PL2_FP16_ResNet_YoloV3, 2020-4_PL2_FP11_InceptionV1_ResNet_VGG | 2020-4_RC_FP16_ResNet_YoloV3, 2020-4_RC_FP16_ResNet_TinyYolo_VGG |
|
||||
| ResNet-152 | 2020-4_PL2_FP16_ResNet_YoloV3, 2020-4_PL2_FP11_InceptionV1_ResNet_VGG | 2020-4_RC_FP16_ResNet_YoloV3, 2020-4_RC_FP16_ResNet_TinyYolo_VGG |
|
||||
| MobileNet (Caffe) | 2020-4_PL2_FP16_MobileNet_Clamp, 2020-4_PL2_FP11_MobileNet_Clamp | 2020-4_RC_FP16_MobileNet_Clamp, 2020-4_RC_FP11_MobileNet_Clamp |
|
||||
| MobileNet (TensorFlow) | 2020-4_PL2_FP16_MobileNet_Clamp, 2020-4_PL2_FP11_MobileNet_Clamp | 2020-4_RC_FP16_MobileNet_Clamp, 2020-4_RC_FP11_MobileNet_Clamp|
|
||||
| SqueezeNet-based variant of the SSD* | 2020-4_PL2_FP16_SqueezeNet_TinyYolo_VGG, 2020-4_PL2_FP11_SqueezeNet | 2020-4_RC_FP16_InceptionV1_SqueezeNet_TinyYolo_VGG, 2020-4_RC_FP16_InceptionV1_SqueezeNet_YoloV3 |
|
||||
| ResNet-based variant of SSD | 2020-4_PL2_FP16_ResNet_YoloV3, 2020-4_PL2_FP11_InceptionV1_ResNet_VGG | 2020-4_RC_FP16_ResNet_YoloV3, 2020-4_RC_FP16_ResNet_TinyYolo_VGG |
|
||||
| RMNet | 2020-4_PL2_FP16_RMNet, 2020-4_PL2_FP11_RMNet | 2020-4_RC_FP16_RMNet, 2020-4_RC_FP11_RMNet |
|
||||
| Yolo v3 | 2020-4_PL2_FP16_ResNet_YoloV3, 2020-4_PL2_FP11_YoloV3_ELU | 2020-4_RC_FP16_ResNet_YoloV3, 2020-4_RC_FP16_InceptionV1_SqueezeNet_YoloV3 |
|
||||
|
||||
|
||||
In addition to the list above, arbitrary topologies having big continues subgraphs consisting of layers supported by FPGA plugin are recommended to be executed on FPGA plugin.
|
||||
|
||||
## Bitstreams that are Optimal to Use with the Intel's Pre-Trained Models
|
||||
|
||||
The table below provides you with a list of Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA (Speed Grade 2) bitstreams that are optimal to use for the Intel's pre-trained models.
|
||||
|
||||
<details>
|
||||
<summary><strong>Click to expand/collapse the table</strong></summary>
|
||||
|
||||
| Model Name | FP11 Bitstreams | FP16 Bitstreams |
|
||||
| :--- | :--- | :--- |
|
||||
| action-recognition-0001-decoder | 2020-3_PL2_FP11_AlexNet_GoogleNet_Generic.aocx | 2020-3_PL2_FP16_SwishExcitation.aocx |
|
||||
| action-recognition-0001-encoder | 2020-3_PL2_FP11_InceptionV1_ResNet_VGG.aocx | 2020-3_PL2_FP16_ResNet_YoloV3.aocx |
|
||||
| age-gender-recognition-retail-0013 | 2020-3_PL2_FP11_AlexNet_GoogleNet_Generic.aocx | 2020-3_PL2_FP16_MobileNet_Clamp.aocx |
|
||||
| asl-recognition-0004 | 2020-3_PL2_FP11_AlexNet_GoogleNet_Generic.aocx | 2020-3_PL2_FP16_AlexNet_GoogleNet_SSD300_Generic.aocx |
|
||||
| driver-action-recognition-adas-0002-decoder | 2020-3_PL2_FP11_AlexNet_GoogleNet_Generic.aocx | 2020-3_PL2_FP16_MobileNet_Clamp.aocx |
|
||||
| driver-action-recognition-adas-0002-encoder | 2020-3_PL2_FP11_YoloV3_ELU.aocx | 2020-3_PL2_FP16_SwishExcitation.aocx |
|
||||
| emotions-recognition-retail-0003 | 2020-3_PL2_FP11_AlexNet_GoogleNet_Generic.aocx | 2020-3_PL2_FP16_SqueezeNet_TinyYolo_VGG.aocx |
|
||||
| face-detection-0100 | 2020-3_PL2_FP11_MobileNet_Clamp.aocx | 2020-3_PL2_FP16_MobileNet_Clamp.aocx |
|
||||
| face-detection-0102 | 2020-3_PL2_FP11_MobileNet_Clamp.aocx | 2020-3_PL2_FP16_MobileNet_Clamp.aocx |
|
||||
| face-detection-0104 | 2020-3_PL2_FP11_MobileNet_Clamp.aocx | 2020-3_PL2_FP16_MobileNet_Clamp.aocx |
|
||||
| face-detection-0105 | 2020-3_PL2_FP11_MobileNet_Clamp.aocx | 2020-3_PL2_FP16_MobileNet_Clamp.aocx |
|
||||
| face-detection-0106 | 2020-3_PL2_FP11_InceptionV1_ResNet_VGG.aocx | 2020-3_PL2_FP16_ResNet_YoloV3.aocx |
|
||||
| face-detection-adas-0001 | 2020-3_PL2_FP11_YoloV3_ELU.aocx | 2020-3_PL2_FP16_SwishExcitation.aocx |
|
||||
| face-detection-adas-binary-0001 | 2020-3_PL2_FP11_AlexNet_GoogleNet_Generic.aocx | 2020-3_PL2_FP16_AlexNet_GoogleNet_SSD300_Generic.aocx |
|
||||
| face-detection-retail-0004 | 2020-3_PL2_FP11_TinyYolo_SSD300.aocx | 2020-3_PL2_FP16_AlexNet_GoogleNet_SSD300_Generic.aocx |
|
||||
| face-detection-retail-0005 | 2020-3_PL2_FP11_YoloV3_ELU.aocx | 2020-3_PL2_FP16_MobileNet_Clamp.aocx |
|
||||
| face-reidentification-retail-0095 | 2020-3_PL2_FP11_SqueezeNet.aocx | 2020-3_PL2_FP16_MobileNet_Clamp.aocx |
|
||||
| facial-landmarks-35-adas-0002 | 2020-3_PL2_FP11_AlexNet_GoogleNet_Generic.aocx | 2020-3_PL2_FP16_MobileNet_Clamp.aocx |
|
||||
| faster-rcnn-resnet101-coco-sparse-60-0001 | 2020-3_PL2_FP11_InceptionV1_ResNet_VGG.aocx | 2020-3_PL2_FP16_SwishExcitation.aocx |
|
||||
| gaze-estimation-adas-0002 | 2020-3_PL2_FP11_SqueezeNet.aocx | 2020-3_PL2_FP16_AlexNet_GoogleNet_SSD300_Generic.aocx |
|
||||
| handwritten-japanese-recognition-0001 | 2020-3_PL2_FP11_InceptionV1_ResNet_VGG.aocx | 2020-3_PL2_FP16_ResNet_YoloV3.aocx |
|
||||
| handwritten-score-recognition-0003 | 2020-3_PL2_FP11_InceptionV1_ResNet_VGG.aocx | 2020-3_PL2_FP16_SqueezeNet_TinyYolo_VGG.aocx |
|
||||
| head-pose-estimation-adas-0001 | 2020-3_PL2_FP11_SqueezeNet.aocx | 2020-3_PL2_FP16_AlexNet_GoogleNet_SSD300_Generic.aocx |
|
||||
| human-pose-estimation-0001 | 2020-3_PL2_FP11_YoloV3_ELU.aocx | 2020-3_PL2_FP16_SwishExcitation.aocx |
|
||||
| icnet-camvid-ava-0001 | 2020-3_PL2_FP11_AlexNet_GoogleNet_Generic.aocx | 2020-3_PL2_FP16_AlexNet_GoogleNet_SSD300_Generic.aocx |
|
||||
| icnet-camvid-ava-sparse-30-0001 | 2020-3_PL2_FP11_SqueezeNet.aocx | 2020-3_PL2_FP16_SwishExcitation.aocx |
|
||||
| icnet-camvid-ava-sparse-60-0001 | 2020-3_PL2_FP11_SqueezeNet.aocx | 2020-3_PL2_FP16_SwishExcitation.aocx |
|
||||
| image-retrieval-0001 | 2020-3_PL2_FP11_MobileNet_Clamp.aocx | 2020-3_PL2_FP16_MobileNet_Clamp.aocx |
|
||||
| instance-segmentation-security-0010 | 2020-3_PL2_FP11_InceptionV1_ResNet_VGG.aocx | 2020-3_PL2_FP16_SqueezeNet_TinyYolo_VGG.aocx |
|
||||
| instance-segmentation-security-0050 | 2020-3_PL2_FP11_InceptionV1_ResNet_VGG.aocx | 2020-3_PL2_FP16_ResNet_YoloV3.aocx |
|
||||
| instance-segmentation-security-0083 | 2020-3_PL2_FP11_AlexNet_GoogleNet_Generic.aocx | 2020-3_PL2_FP16_AlexNet_GoogleNet_SSD300_Generic.aocx |
|
||||
| instance-segmentation-security-1025 | 2020-3_PL2_FP11_InceptionV1_ResNet_VGG.aocx | 2020-3_PL2_FP16_AlexNet_GoogleNet_SSD300_Generic.aocx |
|
||||
| landmarks-regression-retail-0009 | 2020-3_PL2_FP11_SqueezeNet.aocx | 2020-3_PL2_FP16_AlexNet_GoogleNet_SSD300_Generic.aocx |
|
||||
| license-plate-recognition-barrier-0001 | 2020-3_PL2_FP11_SqueezeNet.aocx | 2020-3_PL2_FP16_SqueezeNet_TinyYolo_VGG.aocx |
|
||||
| pedestrian-and-vehicle-detector-adas-0001 | 2020-3_PL2_FP11_YoloV3_ELU.aocx | 2020-3_PL2_FP16_SwishExcitation.aocx |
|
||||
| pedestrian-detection-adas-0002 | 2020-3_PL2_FP11_YoloV3_ELU.aocx | 2020-3_PL2_FP16_SwishExcitation.aocx |
|
||||
| pedestrian-detection-adas-binary-0001 | 2020-3_PL2_FP11_AlexNet_GoogleNet_Generic.aocx | 2020-3_PL2_FP16_AlexNet_GoogleNet_SSD300_Generic.aocx |
|
||||
| person-attributes-recognition-crossroad-0230 | 2020-3_PL2_FP11_SqueezeNet.aocx | 2020-3_PL2_FP16_MobileNet_Clamp.aocx |
|
||||
| person-detection-action-recognition-0005 | 2020-3_PL2_FP11_YoloV3_ELU.aocx | 2020-3_PL2_FP16_MobileNet_Clamp.aocx |
|
||||
| person-detection-action-recognition-0006 | 2020-3_PL2_FP11_YoloV3_ELU.aocx | 2020-3_PL2_FP16_MobileNet_Clamp.aocx |
|
||||
| person-detection-action-recognition-teacher-0002 | 2020-3_PL2_FP11_YoloV3_ELU.aocx | 2020-3_PL2_FP16_MobileNet_Clamp.aocx |
|
||||
| person-detection-asl-0001 | 2020-3_PL2_FP11_AlexNet_GoogleNet_Generic.aocx | 2020-3_PL2_FP16_AlexNet_GoogleNet_SSD300_Generic.aocx |
|
||||
| person-detection-raisinghand-recognition-0001 | 2020-3_PL2_FP11_YoloV3_ELU.aocx | 2020-3_PL2_FP16_MobileNet_Clamp.aocx |
|
||||
| person-detection-retail-0002 | 2020-3_PL2_FP11_InceptionV1_ResNet_VGG.aocx | 2020-3_PL2_FP16_MobileNet_Clamp.aocx |
|
||||
| person-detection-retail-0013 | 2020-3_PL2_FP11_MobileNet_Clamp.aocx | 2020-3_PL2_FP16_MobileNet_Clamp.aocx |
|
||||
| person-reidentification-retail-0031 | 2020-3_PL2_FP11_YoloV3_ELU.aocx | 2020-3_PL2_FP16_ELU.aocx |
|
||||
| person-reidentification-retail-0248 | 2020-3_PL2_FP11_MobileNet_Clamp.aocx | 2020-3_PL2_FP16_MobileNet_Clamp.aocx |
|
||||
| person-reidentification-retail-0249 | 2020-3_PL2_FP11_MobileNet_Clamp.aocx | 2020-3_PL2_FP16_MobileNet_Clamp.aocx |
|
||||
| person-reidentification-retail-0300 | 2020-3_PL2_FP11_InceptionV1_ResNet_VGG.aocx | 2020-3_PL2_FP16_SwishExcitation.aocx |
|
||||
| person-vehicle-bike-detection-crossroad-0078 | 2020-3_PL2_FP11_YoloV3_ELU.aocx | 2020-3_PL2_FP16_ELU.aocx |
|
||||
| person-vehicle-bike-detection-crossroad-1016 | 2020-3_PL2_FP11_MobileNet_Clamp.aocx | 2020-3_PL2_FP16_SwishExcitation.aocx |
|
||||
| product-detection-0001 | 2020-3_PL2_FP11_MobileNet_Clamp.aocx | 2020-3_PL2_FP16_MobileNet_Clamp.aocx |
|
||||
| resnet18-xnor-binary-onnx-0001 | 2020-3_PL2_FP11_AlexNet_GoogleNet_Generic.aocx | 2020-3_PL2_FP16_RMNet.aocx |
|
||||
| resnet50-binary-0001 | 2020-3_PL2_FP11_AlexNet_GoogleNet_Generic.aocx | 2020-3_PL2_FP16_AlexNet_GoogleNet_SSD300_Generic.aocx |
|
||||
| road-segmentation-adas-0001 | 2020-3_PL2_FP11_MobileNet_Clamp.aocx | 2020-3_PL2_FP16_MobileNet_Clamp.aocx |
|
||||
| semantic-segmentation-adas-0001 | 2020-3_PL2_FP11_MobileNet_Clamp.aocx | 2020-3_PL2_FP16_AlexNet_GoogleNet_SSD300_Generic.aocx |
|
||||
| single-image-super-resolution-1032 | 2020-3_PL2_FP11_MobileNet_Clamp.aocx | 2020-3_PL2_FP16_RMNet.aocx |
|
||||
| single-image-super-resolution-1033 | 2020-3_PL2_FP11_MobileNet_Clamp.aocx | 2020-3_PL2_FP16_RMNet.aocx |
|
||||
| text-detection-0003 | 2020-3_PL2_FP11_MobileNet_Clamp.aocx | 2020-3_PL2_FP16_MobileNet_Clamp.aocx |
|
||||
| text-detection-0004 | 2020-3_PL2_FP11_MobileNet_Clamp.aocx | 2020-3_PL2_FP16_MobileNet_Clamp.aocx |
|
||||
| text-image-super-resolution-0001 | 2020-3_PL2_FP11_MobileNet_Clamp.aocx | 2020-3_PL2_FP16_RMNet.aocx |
|
||||
| text-recognition-0012 | 2020-3_PL2_FP11_AlexNet_GoogleNet_Generic.aocx | 2020-3_PL2_FP16_AlexNet_GoogleNet_SSD300_Generic.aocx |
|
||||
| text-spotting-0002-detector | 2020-3_PL2_FP11_InceptionV1_ResNet_VGG.aocx | 2020-3_PL2_FP16_ResNet_YoloV3.aocx |
|
||||
| text-spotting-0002-recognizer-decoder | 2020-3_PL2_FP11_AlexNet_GoogleNet_Generic.aocx | 2020-3_PL2_FP16_AlexNet_GoogleNet_SSD300_Generic.aocx |
|
||||
| text-spotting-0002-recognizer-encoder | 2020-3_PL2_FP11_InceptionV1_ResNet_VGG.aocx | 2020-3_PL2_FP16_SqueezeNet_TinyYolo_VGG.aocx |
|
||||
| unet-camvid-onnx-0001 | 2020-3_PL2_FP11_InceptionV1_ResNet_VGG.aocx | 2020-3_PL2_FP16_SwishExcitation.aocx |
|
||||
| vehicle-attributes-recognition-barrier-0039 | 2020-3_PL2_FP11_SqueezeNet.aocx | 2020-3_PL2_FP16_SqueezeNet_TinyYolo_VGG.aocx |
|
||||
| vehicle-detection-adas-0002 | 2020-3_PL2_FP11_YoloV3_ELU.aocx | 2020-3_PL2_FP16_SwishExcitation.aocx |
|
||||
| vehicle-detection-adas-binary-0001 | 2020-3_PL2_FP11_AlexNet_GoogleNet_Generic.aocx | 2020-3_PL2_FP16_AlexNet_GoogleNet_SSD300_Generic.aocx |
|
||||
| vehicle-license-plate-detection-barrier-0106 | 2020-3_PL2_FP11_MobileNet_Clamp.aocx | 2020-3_PL2_FP16_MobileNet_Clamp.aocx |
|
||||
| yolo-v2-ava-0001 | 2020-3_PL2_FP11_SqueezeNet.aocx | 2020-3_PL2_FP16_SqueezeNet_TinyYolo_VGG.aocx |
|
||||
| yolo-v2-ava-sparse-35-0001 | 2020-3_PL2_FP11_SqueezeNet.aocx | 2020-3_PL2_FP16_SqueezeNet_TinyYolo_VGG.aocx |
|
||||
| yolo-v2-ava-sparse-70-0001 | 2020-3_PL2_FP11_SqueezeNet.aocx | 2020-3_PL2_FP16_SqueezeNet_TinyYolo_VGG.aocx |
|
||||
| yolo-v2-tiny-ava-0001 | 2020-3_PL2_FP11_SqueezeNet.aocx | 2020-3_PL2_FP16_ResNet_YoloV3.aocx |
|
||||
| yolo-v2-tiny-ava-sparse-30-0001 | 2020-3_PL2_FP11_SqueezeNet.aocx | 2020-3_PL2_FP16_ResNet_YoloV3.aocx |
|
||||
| yolo-v2-tiny-ava-sparse-60-0001 | 2020-3_PL2_FP11_SqueezeNet.aocx | 2020-3_PL2_FP16_ResNet_YoloV3.aocx |
|
||||
|
||||
</details>
|
||||
|
||||
## <a name="TranslatingArchtoBitstream"></a>Translate from Architecture to FPGA Bitstream Files
|
||||
|
||||
Various FPGA bitstreams that support CNN are available in the OpenVINO™ toolkit package for FPGA.
|
||||
|
||||
To select the correct bitstream (`.aocx`) file for an architecture, select a network (for example, Resnet-18) from the table above for either the Intel® Vision Accelerator Design with an Intel® Arria 10 FPGA (Speed Grade 1), Intel® Vision Accelerator Design with an Intel® Arria 10 FPGA (Speed Grade 2) or the Intel® Programmable Acceleration Card (PAC) with Intel® Arria® 10 GX FPGA and note the corresponding architecture.
|
||||
|
||||
The following table describes several parameters that might help you to select the proper bitstream for your needs:
|
||||
|
||||
| Name | Board | Precision | LRN Support | Leaky ReLU Support | PReLU Support | Clamp Support | ELU Support |
|
||||
|:------------------------------------------|:--------------------------------------------------------------------------------|:----------|:------------|:-------------------|:--------------|:--------------|:------------|
|
||||
| 2020-4_PL2_FP11_AlexNet_GoogleNet_Generic | Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA (Speed Grade 2) | FP11 | true | true | true | false | false |
|
||||
| 2020-4_PL2_FP11_SqueezeNet | Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA (Speed Grade 2) | FP11 | false | true | true | false | false |
|
||||
| 2020-4_PL2_FP11_MobileNet_Clamp | Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA (Speed Grade 2) | FP11 | false | true | true | true | false |
|
||||
| 2020-4_PL2_FP11_InceptionV1_ResNet_VGG | Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA (Speed Grade 2) | FP11 | false | false | false | false | false |
|
||||
| 2020-4_PL2_FP11_RMNet | Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA (Speed Grade 2) | FP11 | false | true | true | false | true |
|
||||
| 2020-4_PL2_FP11_TinyYolo_SSD300 | Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA (Speed Grade 2) | FP11 | true | true | true | false | false |
|
||||
| 2020-4_PL2_FP11_YoloV3_ELU | Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA (Speed Grade 2) | FP11 | false | true | true | false | true |
|
||||
| 2020-4_PL2_FP11_Streaming_InternalUseOnly | Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA (Speed Grade 2) | FP11 | false | false | false | false | false |
|
||||
| 2020-4_PL2_FP11_Streaming_Slicing_InternalUseOnly | Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA (Speed Grade 2) | FP11 | false | false | false | false | false |
|
||||
| 2020-4_PL2_FP11_SwishExcitation | Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA (Speed Grade 2) | FP11 | false | false | false | false | false |
|
||||
| 2020-4_PL2_FP16_AlexNet_GoogleNet_SSD300_Generic | Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA (Speed Grade 2) | FP16 | true | true | true | false | false |
|
||||
| 2020-4_PL2_FP16_ELU | Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA (Speed Grade 2) | FP16 | false | true | true | false | true |
|
||||
| 2020-4_PL2_FP16_MobileNet_Clamp | Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA (Speed Grade 2) | FP16 | false | true | true | true | false |
|
||||
| 2020-4_PL2_FP16_ResNet_YoloV3 | Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA (Speed Grade 2) | FP16 | false | true | true | false | false |
|
||||
| 2020-4_PL2_FP16_RMNet | Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA (Speed Grade 2) | FP16 | false | true | true | false | true |
|
||||
| 2020-4_PL2_FP16_SqueezeNet_TinyYolo_VGG | Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA (Speed Grade 2) | FP16 | false | true | true | false | false |
|
||||
| 2020-4_PL2_FP16_SqueezeNet_TinyYolo_VGG | Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA (Speed Grade 2) | FP16 | false | false | false | false | false |
|
||||
| 2020-4_RC_FP11_AlexNet_GoogleNet_Generic | Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA | FP11 | true | true | true | false | false |
|
||||
| 2020-4_RC_FP11_RMNet | Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA | FP11 | false | true | true | false | true |
|
||||
| 2020-4_RC_FP11_Streaming_InternalUseOnly | Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA | FP11 | true | false | false | false | false |
|
||||
| 2020-4_RC_FP11_Streaming_Slicing_InternalUseOnly | Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA | FP11 | true | false | false | false | false |
|
||||
| 2020-4_RC_FP11_ELU | Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA | FP11 | false | true | true | false | true |
|
||||
| 2020-4_RC_FP11_SwishExcitation | Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA | FP11 | false | false | false | false | false |
|
||||
| 2020-4_RC_FP11_InceptionV1_ResNet_SqueezeNet_TinyYolo_YoloV3 | Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA | FP11 | false | true | true | false | false |
|
||||
| 2020-4_RC_FP11_MobileNet_Clamp | Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA | FP11 | false | true | true | true | false |
|
||||
| 2020-4_RC_FP16_AlexNet_GoogleNet_Generic | Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA | FP16 | true | true | true | false | false |
|
||||
| 2020-4_RC_FP16_InceptionV1_SqueezeNet_TinyYolo_VGG | Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA | FP16 | false | true | true | false | false |
|
||||
| 2020-4_RC_FP16_RMNet | Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA | FP16 | false | true | true | false | true |
|
||||
| 2020-4_RC_FP16_SwishExcitation | Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA | FP16 | false | false | false | false | false |
|
||||
| 2020-4_RC_FP16_MobileNet_Clamp | Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA | FP16 | false | true | true | true | false |
|
||||
| 2020-4_RC_FP16_ResNet_YoloV3 | Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA | FP16 | false | true | true | false | false |
|
||||
| 2020-4_RC_FP16_InceptionV1_SqueezeNet_YoloV3 | Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA | FP16 | false | true | true | false | false |
|
||||
|
||||
## Set Environment for Running the FPGA Plugin
|
||||
|
||||
To make the FPGA plugin run directly or through the heterogeneous plugin, set up the environment:
|
||||
1. Set up environment to access Intel® FPGA RTE for OpenCL:
|
||||
```
|
||||
source /opt/altera/aocl-pro-rte/aclrte-linux64/init_opencl.sh
|
||||
```
|
||||
2. Set the following environment variable and program the board with a DLA bitstream. Programming of the board is not supported during runtime and must be done before running an application.
|
||||
|
||||
| Variable | Setting |
|
||||
| :----------------------------------| :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| ACL_PCIE_USE_JTAG_PROGRAMMING | Set this variable to a value of 1 to force FPGA reprogramming using JTAG |
|
||||
|
||||
## Analyzing Heterogeneous Execution
|
||||
|
||||
Besides generation of .dot files, you can use the error listening mechanism:
|
||||
|
||||
```cpp
|
||||
class FPGA_ErrorListener : public InferenceEngine::IErrorListener
|
||||
{
|
||||
public:
|
||||
virtual void onError(const char *msg) noexcept override {
|
||||
std::cout << msg;
|
||||
}
|
||||
};
|
||||
...
|
||||
FPGA_ErrorListener err_listener;
|
||||
core.SetLogCallback(err_listener); // will be used for FPGA device as well
|
||||
```
|
||||
If during network loading some layers are decided to be executed on a fallback plugin, the following message is printed:
|
||||
|
||||
```cpp
|
||||
Layer (Name: detection_out, Type: DetectionOutput) is not supported:
|
||||
custom or unknown.
|
||||
Has (3) sets of inputs, must be 1, or 2.
|
||||
Input dimensions (2) should be 4.
|
||||
```
|
||||
|
||||
## Multiple FPGA Devices Support
|
||||
|
||||
The Inference Engine FPGA plugin provides an ability to load different networks on multiple FPGA devices. For example, to load two networks AlexNet and MobileNet v2 on two different FPGA devices, follow the steps below:
|
||||
|
||||
1. Program each FGPA device with a corresponding bitstream:
|
||||
```bash
|
||||
aocl program acl0 2019R3_PV_PL1_FP16_AlexNet_GoogleNet_InceptionV1_SSD300_Generic.aocx
|
||||
```
|
||||
```bash
|
||||
aocl program acl1 2019R3_PV_PL1_FP16_MobileNet_Clamp.aocx
|
||||
```
|
||||
For more information about bitstream programming instructions, refer to [Installation Guide for Linux* with Support for FPGA](Supported_Devices.md)
|
||||
2. All FPGA devices are enumerated with unique ID starting from `0`. By default, all networks are loaded to the default
|
||||
device with ID `0`. If you want to load a network on a particular non-default device, specify the `KEY_DEVICE_ID`
|
||||
parameter for C++ and `DEVICE_ID` parameter for Python\*.
|
||||
The following code snippets demonstrates how to load the AlexNet network on the FPGA device with ID `0` and the
|
||||
MobileNet v2 network on the device with ID `1`:
|
||||
* With C++:
|
||||
```cpp
|
||||
InferenceEngine::Core core;
|
||||
|
||||
// Load AlexNet network on the first FPGA device programmed with bitstream supporting AlexNet
|
||||
auto alexnetNetwork = core.ReadNetwork("alexnet.xml");
|
||||
auto exeNetwork1 = core.LoadNetwork(alexnetNetwork, "FPGA.0");
|
||||
|
||||
// Load MobileNet network on the second FPGA device programmed with MobileNet bitstream
|
||||
auto mobilenetNetwork = core.ReadNetwork("mobilenet_v2.xml");
|
||||
auto exeNetwork2 = core.LoadNetwork(mobilenetNetwork, "FPGA", { { KEY_DEVICE_ID, "1" } });
|
||||
```
|
||||
* With Python:
|
||||
```python
|
||||
# Load AlexNet network on the first FPGA device programmed with bitstream supporting AlexNet
|
||||
net1 = IENetwork(model="alexnet.xml", weights="alexnet.bin")
|
||||
plugin.load(network=net1, config={"DEVICE_ID": "0"})
|
||||
|
||||
# Load MobileNet network on the second FPGA device programmed with MobileNet bitstream
|
||||
net2 = IENetwork(model="mobilenet_v2.xml", weights="mobilenet_v2.bin")
|
||||
plugin.load(network=net2, config={"DEVICE_ID": "1"})
|
||||
```
|
||||
Note that you have to use asynchronous infer requests to utilize several FPGA devices, otherwise the execution on devices is performed sequentially.
|
||||
|
||||
## Import and Export Network Flow
|
||||
|
||||
Since the 2019 R4 release, FPGA and HETERO plugins support the export and import flow, which allows to export a compiled network from a plugin to a binary blob by running the command below:
|
||||
|
||||
```bash
|
||||
$ ./compile_tool -m resnet.xml -DLA_ARCH_NAME 4x2x16x32_fp16_sb9408_fcd1024_actk4_poolk4_normk1_owk2_image300x300x8192_mbfr -d HETERO:FPGA,CPU
|
||||
Inference Engine:
|
||||
API version ............ 2.1
|
||||
Build .................. 6db44e09a795cb277a63275ea1395bfcb88e46ac
|
||||
Description ....... API
|
||||
Done
|
||||
```
|
||||
|
||||
Once the command is executed, the binary blob named `resnet.blob` is created at the working directory. Refer to the [Compile tool](../../../inference-engine/tools/compile_tool/README.md) documentation for more details.
|
||||
|
||||
A compiled binary blob can be later imported via `InferenceEngine::Core::Import`:
|
||||
|
||||
```cpp
|
||||
InferenceEngine::Core core;
|
||||
std::ifstream strm("resnet.blob");
|
||||
auto execNetwork = core.Import(strm);
|
||||
```
|
||||
|
||||
## How to Interpret Performance Counters
|
||||
|
||||
As a result of collecting performance counters using <code>InferenceEngine::InferRequest::GetPerformanceCounts</code> you can find out performance data about execution on FPGA, pre-processing and post-processing data and data transferring from/to FPGA card.
|
||||
|
||||
If network is sliced to two parts that are executed on CPU, you can find performance data about Intel® MKL-DNN kernels, their types, and other useful information.
|
||||
|
||||
## Limitations of the FPGA Support for CNN
|
||||
|
||||
The Inference Engine FPGA plugin has limitations on network topologies, kernel parameters, and batch size.
|
||||
|
||||
* Depending on the bitstream loaded on the target device, the FPGA performs calculations with precision rates ranging from FP11 to FP16. This might have accuracy implications. Use the [Accuracy Checker](@ref omz_tools_accuracy_checker_README) to verify the network accuracy on the validation data set.
|
||||
* Networks that have many CNN layers that are not supported on FPGA stayed in topologies between supported layers might lead to dividing of graph to many subgraphs that might lead to `CL_OUT_OF_HOST_MEMORY` error. These topologies are not FPGA friendly for this release.
|
||||
* When you use the heterogeneous plugin, the affinity and distribution of nodes by devices depends on the FPGA bitstream that you use. Some layers might not be supported by a bitstream or parameters of the layer are not supported by the bitstream.
|
||||
|
||||
## See Also
|
||||
* [Supported Devices](Supported_Devices.md)
|
||||
For documentation for the FPGA plugin available in previous releases of Intel® Distribution of OpenVINO™ toolkit with FPGA Support, see documentation for the [2020.4 version](https://docs.openvinotoolkit.org/2020.4/openvino_docs_IE_DG_supported_plugins_FPGA.html) and lower.
|
||||
@@ -19,7 +19,7 @@ Devices with Intel® GNA support:
|
||||
|
||||
* [Amazon Alexa* Premium Far-Field Developer Kit](https://developer.amazon.com/en-US/alexa/alexa-voice-service/dev-kits/amazon-premium-voice)
|
||||
|
||||
* [Gemini Lake](https://ark.intel.com/content/www/us/en/ark/products/codename/83915/gemini-lake.html):
|
||||
* [Intel® Pentium® Silver Processors N5xxx, J5xxx and Intel® Celeron® Processors N4xxx, J4xxx](https://ark.intel.com/content/www/us/en/ark/products/codename/83915/gemini-lake.html):
|
||||
- Intel® Pentium® Silver J5005 Processor
|
||||
- Intel® Pentium® Silver N5000 Processor
|
||||
- Intel® Celeron® J4005 Processor
|
||||
@@ -27,10 +27,10 @@ Devices with Intel® GNA support:
|
||||
- Intel® Celeron® Processor N4100
|
||||
- Intel® Celeron® Processor N4000
|
||||
|
||||
* [Cannon Lake](https://ark.intel.com/content/www/us/en/ark/products/136863/intel-core-i3-8121u-processor-4m-cache-up-to-3-20-ghz.html):
|
||||
* [Intel® Core™ Processors (formerly codenamed Cannon Lake)](https://ark.intel.com/content/www/us/en/ark/products/136863/intel-core-i3-8121u-processor-4m-cache-up-to-3-20-ghz.html):
|
||||
Intel® Core™ i3-8121U Processor
|
||||
|
||||
* [Ice Lake](https://ark.intel.com/content/www/us/en/ark/products/codename/74979/ice-lake.html):
|
||||
* [10th Generation Intel® Core™ Processors (formerly codenamed Ice Lake)](https://ark.intel.com/content/www/us/en/ark/products/codename/74979/ice-lake.html):
|
||||
- Intel® Core™ i7-1065G7 Processor
|
||||
- Intel® Core™ i7-1060G7 Processor
|
||||
- Intel® Core™ i5-1035G4 Processor
|
||||
@@ -42,6 +42,8 @@ Intel® Core™ i3-8121U Processor
|
||||
- Intel® Core™ i3-1000G1 Processor
|
||||
- Intel® Core™ i3-1000G4 Processor
|
||||
|
||||
* All [11th Generation Intel® Core™ Processors (formerly codenamed Tiger Lake)](https://ark.intel.com/content/www/us/en/ark/products/codename/88759/tiger-lake.html).
|
||||
|
||||
> **NOTE**: On platforms where Intel® GNA is not enabled in the BIOS, the driver cannot be installed, so the GNA plugin uses the software emulation mode only.
|
||||
|
||||
## Drivers and Dependencies
|
||||
@@ -64,10 +66,11 @@ The list of supported layers can be found
|
||||
[here](Supported_Devices.md) (see the GNA column of Supported Layers section).
|
||||
Limitations include:
|
||||
|
||||
- Only 1D convolutions (in the models converted from [Kaldi](../../MO_DG/prepare_model/convert_model/Convert_Model_From_Kaldi.md) framework) are natively supported
|
||||
- Only 1D convolutions are natively supported in the models converted from:
|
||||
- [Kaldi](../../MO_DG/prepare_model/convert_model/Convert_Model_From_Kaldi.md) framework;
|
||||
- [TensorFlow](../../MO_DG/prepare_model/convert_model/Convert_Model_From_TensorFlow.md) framework; note that for TensorFlow models, the option `--disable_nhwc_to_nchw` must be used when running the Model Optimizer.
|
||||
- The number of output channels for convolutions must be a multiple of 4
|
||||
- Permute layer support is limited to the cases where no data reordering is needed, or when reordering is happening for 2 dimensions, at least one of which is not greater than 8
|
||||
- Power layer only supports the power parameter equal to 1
|
||||
|
||||
#### Experimental Support for 2D Convolutions
|
||||
|
||||
@@ -159,6 +162,30 @@ Heterogeneous plugin was tested with the Intel® GNA as a primary device and
|
||||
|
||||
> **NOTE:** Due to limitation of the Intel® GNA backend library, heterogenous support is limited to cases where in the resulted sliced graph, only one subgraph is scheduled to run on GNA\_HW or GNA\_SW devices.
|
||||
|
||||
## Recovery from interruption by high-priority Windows audio processes\*
|
||||
|
||||
As noted in the introduction, GNA is designed for real-time workloads such as noise reduction.
|
||||
For such workloads, processing should be time constrained, otherwise extra delays may cause undesired effects such as
|
||||
audio "glitches". To make sure that processing can satisfy real time requirements, the GNA driver provides a QoS
|
||||
(Quality of Service) mechanism which interrupts requests that might cause high-priority Windows audio processes to miss
|
||||
schedule, thereby causing long running GNA tasks to terminate early.
|
||||
|
||||
Applications should be prepared for this situation.
|
||||
If an inference (in `GNA_HW` mode) cannot be executed because of such an interruption, then `InferRequest::Wait()` will return status code
|
||||
`StatusCode::INFER_NOT_STARTED` (note that it will be changed to a more meaningful status code in future releases).
|
||||
|
||||
Any application working with GNA must properly react if it receives this code. Various strategies are possible.
|
||||
One of the options is to immediately switch to GNA SW emulation mode:
|
||||
|
||||
```cpp
|
||||
std::map<std::string, Parameter> newConfig;
|
||||
newConfig[GNAConfigParams::KEY_GNA_DEVICE_MODE] = Parameter("GNA_SW_EXACT");
|
||||
executableNet.SetConfig(newConfig);
|
||||
|
||||
```
|
||||
|
||||
then resubmit and switch back to GNA_HW after some time hoping that the competing application has finished.
|
||||
|
||||
## See Also
|
||||
|
||||
* [Supported Devices](Supported_Devices.md)
|
||||
|
||||
@@ -11,7 +11,6 @@ The Inference Engine provides unique capabilities to infer deep learning models
|
||||
|------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
|[GPU plugin](CL_DNN.md) |Intel® Processor Graphics, including Intel® HD Graphics and Intel® Iris® Graphics |
|
||||
|[CPU plugin](CPU.md) |Intel® Xeon® with Intel® Advanced Vector Extensions 2 (Intel® AVX2), Intel® Advanced Vector Extensions 512 (Intel® AVX-512), and AVX512_BF16, Intel® Core™ Processors with Intel® AVX2, Intel® Atom® Processors with Intel® Streaming SIMD Extensions (Intel® SSE) |
|
||||
|[FPGA plugin](FPGA.md) (available in the Intel® Distribution of OpenVINO™ toolkit) |Intel® Vision Accelerator Design with an Intel® Arria 10 FPGA (Speed Grade 2), Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA |
|
||||
|[VPU plugins](VPU.md) (available in the Intel® Distribution of OpenVINO™ toolkit) |Intel® Neural Compute Stick 2 powered by the Intel® Movidius™ Myriad™ X, Intel® Vision Accelerator Design with Intel® Movidius™ VPUs |
|
||||
|[GNA plugin](GNA.md) (available in the Intel® Distribution of OpenVINO™ toolkit) |Intel® Speech Enabling Developer Kit, Amazon Alexa* Premium Far-Field Developer Kit, Intel® Pentium® Silver J5005 Processor, Intel® Pentium® Silver N5000 Processor, Intel® Celeron® J4005 Processor, Intel® Celeron® J4105 Processor, Intel® Celeron® Processor N4100, Intel® Celeron® Processor N4000, Intel® Core™ i3-8121U Processor, Intel® Core™ i7-1065G7 Processor, Intel® Core™ i7-1060G7 Processor, Intel® Core™ i5-1035G4 Processor, Intel® Core™ i5-1035G7 Processor, Intel® Core™ i5-1035G1 Processor, Intel® Core™ i5-1030G7 Processor, Intel® Core™ i5-1030G4 Processor, Intel® Core™ i3-1005G1 Processor, Intel® Core™ i3-1000G1 Processor, Intel® Core™ i3-1000G4 Processor|
|
||||
|[Multi-Device plugin](MULTI.md) |Multi-Device plugin enables simultaneous inference of the same network on several Intel® devices in parallel |
|
||||
@@ -53,7 +52,6 @@ For example, the CHW value at index (c,h,w) is physically located at index (c\*H
|
||||
|:-------------|:----------------------:|:----------------------:|:----------------------:|
|
||||
|CPU plugin |Supported and preferred |Supported |Supported |
|
||||
|GPU plugin |Supported |Supported and preferred |Supported\* |
|
||||
|FPGA plugin |Supported |Supported |Not supported |
|
||||
|VPU plugins |Not supported |Supported |Not supported |
|
||||
|GNA plugin |Supported |Supported |Not supported |
|
||||
<br>\* - currently, only limited set of topologies might benefit from enabling I8 model on GPU<br>
|
||||
@@ -66,7 +64,6 @@ the supported models formats depends on the actual underlying devices. _Generall
|
||||
|:-------------|:--------:|:-------------:|:-------------:|:-------------:|:------------:|:-------------:|
|
||||
|CPU plugin |Supported |Not supported |Supported |Supported |Not supported |Supported |
|
||||
|GPU plugin |Supported |Supported\* |Supported\* |Supported\* |Not supported |Supported\* |
|
||||
|FPGA plugin |Supported |Supported\* |Supported |Supported |Not supported |Supported |
|
||||
|VPU plugins |Supported |Supported |Supported |Not supported |Not supported |Not supported |
|
||||
|GNA plugin |Supported |Not supported |Supported |Not supported |Supported |Supported |
|
||||
|
||||
@@ -80,7 +77,6 @@ the supported input precision depends on the actual underlying devices. _Genera
|
||||
|:-------------|:--------:|:------------:|
|
||||
|CPU plugin |Supported |Not supported |
|
||||
|GPU plugin |Supported |Supported |
|
||||
|FPGA plugin |Supported |Supported |
|
||||
|VPU plugins |Supported |Supported |
|
||||
|GNA plugin |Supported |Not supported |
|
||||
For [Multi-Device](MULTI.md) and [Heterogeneous](HETERO.md) execution
|
||||
@@ -92,9 +88,8 @@ the supported output precision depends on the actual underlying devices. _Gener
|
||||
|:-------------|:------------:|:------------:|:------------:|:------------:|
|
||||
|CPU plugin |Supported |Supported |Supported |Supported |
|
||||
|GPU plugin |Supported |Supported |Supported |Supported |
|
||||
|FPGA plugin |Not supported |Supported |Supported |Not supported |
|
||||
|VPU plugins |Not supported |Supported |Supported |Supported |
|
||||
|GNA plugin |Not supported |Not supported |Not supported |Supported |
|
||||
|GNA plugin |Not supported |Supported |Supported |Supported |
|
||||
|
||||
### Supported Output Layout
|
||||
|
||||
@@ -109,152 +104,152 @@ For setting relevant configuration, refer to the
|
||||
### Supported Layers
|
||||
The following layers are supported by the plugins and by [Shape Inference feature](../ShapeInference.md):
|
||||
|
||||
| Layers | GPU | CPU | VPU | GNA | FPGA | ShapeInfer |
|
||||
|:-------------------------------|:-------------:|:-------------:|:-------------:|:-------------:|:---------------:|:-------------:|
|
||||
| Abs | Supported | Supported\*\* | Supported | Not Supported | Not Supported | Supported |
|
||||
| Acos | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| Acosh | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| Activation-Clamp | Supported |Supported\*\*\*| Supported | Supported | Supported | Supported |
|
||||
| Activation-ELU | Supported |Supported\*\*\*| Supported | Not Supported | Supported | Supported |
|
||||
| Activation-Exp | Supported |Supported\*\*\*| Not Supported | Supported | Not Supported | Supported |
|
||||
| Activation-Leaky ReLU | Supported |Supported\*\*\*| Supported | Supported | Supported | Supported |
|
||||
| Activation-Not | Supported |Supported\*\*\*| Not Supported | Not Supported | Not Supported | Supported |
|
||||
| Activation-PReLU | Supported |Supported\*\*\*| Supported | Not Supported | Supported | Supported |
|
||||
| Activation-ReLU | Supported |Supported\*\*\*| Supported | Supported | Supported | Supported |
|
||||
| Activation-ReLU6 | Supported |Supported\*\*\*| Supported | Not Supported | Not Supported | Supported |
|
||||
| Activation-Sigmoid/Logistic | Supported |Supported\*\*\*| Supported | Supported | Not Supported | Supported |
|
||||
| Activation-TanH | Supported |Supported\*\*\*| Supported | Supported | Not Supported | Supported |
|
||||
| ArgMax | Supported | Supported\*\* | Supported | Not Supported | Not Supported | Supported |
|
||||
| Asin | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| Asinh | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| Atan | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| Atanh | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| BatchNormalization | Supported | Supported | Supported | Not Supported | Supported\* | Supported |
|
||||
| BinaryConvolution | Supported | Supported | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| Broadcast | Supported | Supported\*\* | Supported | Not Supported | Not Supported | Supported |
|
||||
| Ceil | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| Concat | Supported |Supported\*\*\*| Supported | Supported | Supported | Supported |
|
||||
| Const | Supported | Supported | Supported | Supported | Not Supported | Not Supported |
|
||||
| Convolution-Dilated | Supported | Supported | Supported | Not Supported | Supported | Supported |
|
||||
| Convolution-Dilated 3D | Supported | Supported | Not Supported | Not Supported | Not Supported | Not Supported |
|
||||
| Convolution-Grouped | Supported | Supported | Supported | Not Supported | Supported | Supported |
|
||||
| Convolution-Grouped 3D | Supported | Supported | Not Supported | Not Supported | Not Supported | Not Supported |
|
||||
| Convolution-Ordinary | Supported | Supported | Supported | Supported\* | Supported | Supported |
|
||||
| Convolution-Ordinary 3D | Supported | Supported | Not Supported | Not Supported | Not Supported | Not Supported |
|
||||
| Cos | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| Cosh | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| Crop | Supported | Supported | Supported | Supported | Not Supported | Supported |
|
||||
| CTCGreedyDecoder | Supported\*\* | Supported\*\* | Supported\* | Not Supported | Not Supported | Supported |
|
||||
| Deconvolution | Supported | Supported | Supported | Not Supported | Supported\* | Supported |
|
||||
| Deconvolution 3D | Supported | Supported | Not Supported | Not Supported | Not Supported | Not Supported |
|
||||
| DeformableConvolution | Supported | Supported | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| DepthToSpace | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| DetectionOutput | Supported | Supported\*\* | Supported\* | Not Supported | Not Supported | Supported |
|
||||
| Eltwise-And | Supported |Supported\*\*\*| Not Supported | Not Supported | Not Supported | Supported |
|
||||
| Eltwise-Add | Supported |Supported\*\*\*| Not Supported | Not Supported | Supported | Supported |
|
||||
| Eltwise-Div | Supported |Supported\*\*\*| Supported | Not Supported | Not Supported | Supported |
|
||||
| Eltwise-Equal | Supported |Supported\*\*\*| Supported | Not Supported | Not Supported | Supported |
|
||||
| Eltwise-FloorMod | Supported |Supported\*\*\*| Supported | Not Supported | Not Supported | Supported |
|
||||
| Eltwise-Greater | Supported |Supported\*\*\*| Supported | Not Supported | Not Supported | Supported |
|
||||
| Eltwise-GreaterEqual | Supported |Supported\*\*\*| Supported | Not Supported | Not Supported | Supported |
|
||||
| Eltwise-Less | Supported |Supported\*\*\*| Supported | Not Supported | Not Supported | Supported |
|
||||
| Eltwise-LessEqual | Supported |Supported\*\*\*| Supported | Not Supported | Not Supported | Supported |
|
||||
| Eltwise-LogicalAnd | Supported |Supported\*\*\*| Supported | Not Supported | Not Supported | Supported |
|
||||
| Eltwise-LogicalOr | Supported |Supported\*\*\*| Supported | Not Supported | Not Supported | Supported |
|
||||
| Eltwise-LogicalXor | Supported |Supported\*\*\*| Supported | Not Supported | Not Supported | Supported |
|
||||
| Eltwise-Max | Supported |Supported\*\*\*| Supported | Not Supported | Not Supported | Supported |
|
||||
| Eltwise-Min | Supported |Supported\*\*\*| Supported | Not Supported | Not Supported | Supported |
|
||||
| Eltwise-Mul | Supported |Supported\*\*\*| Supported | Supported | Not Supported | Supported |
|
||||
| Eltwise-NotEqual | Supported |Supported\*\*\*| Supported | Not Supported | Not Supported | Supported |
|
||||
| Eltwise-Pow | Supported |Supported\*\*\*| Supported | Not Supported | Not Supported | Supported |
|
||||
| Eltwise-Prod | Supported |Supported\*\*\*| Supported | Supported | Not Supported | Supported |
|
||||
| Eltwise-SquaredDiff | Supported |Supported\*\*\*| Supported | Not Supported | Not Supported | Supported |
|
||||
| Eltwise-Sub | Supported |Supported\*\*\*| Supported | Supported | Supported | Supported |
|
||||
| Eltwise-Sum | Supported |Supported\*\*\*| Supported | Supported | Supported | Supported |
|
||||
| Erf | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| Exp | Supported | Supported | Not Supported | Supported | Not Supported | Supported |
|
||||
| FakeQuantize | Not Supported | Supported | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| Fill | Not Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| Flatten | Supported | Supported | Supported | Not Supported | Not Supported | Supported |
|
||||
| Floor | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| FullyConnected (Inner Product) | Supported |Supported\*\*\*| Supported | Supported | Supported | Supported |
|
||||
| Gather | Supported | Supported\*\* | Supported | Not Supported | Not Supported | Supported |
|
||||
| GatherTree | Not Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| Gemm | Supported | Supported | Supported | Not Supported | Not Supported | Supported |
|
||||
| GRN | Supported\*\* | Supported\*\* | Supported | Not Supported | Not Supported | Supported |
|
||||
| HardSigmoid | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| Interp | Supported\*\* | Supported\*\* | Supported | Not Supported | Not Supported | Supported\* |
|
||||
| Log | Supported | Supported\*\* | Supported | Supported | Not Supported | Supported |
|
||||
| LRN (Norm) | Supported | Supported | Supported | Not Supported | Supported | Supported |
|
||||
| LSTMCell | Supported | Supported | Supported | Supported | Not Supported | Not Supported |
|
||||
| GRUCell | Supported | Supported | Not Supported | Not Supported | Not Supported | Not Supported |
|
||||
| RNNCell | Supported | Supported | Not Supported | Not Supported | Not Supported | Not Supported |
|
||||
| LSTMSequence | Supported | Supported | Supported | Not Supported | Not Supported | Not Supported |
|
||||
| GRUSequence | Supported | Supported | Not Supported | Not Supported | Not Supported | Not Supported |
|
||||
| RNNSequence | Supported | Supported | Not Supported | Not Supported | Not Supported | Not Supported |
|
||||
| LogSoftmax | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Not Supported |
|
||||
| Memory | Not Supported | Supported | Not Supported | Supported | Not Supported | Supported |
|
||||
| MVN | Supported | Supported\*\* | Supported\* | Not Supported | Not Supported | Supported |
|
||||
| Neg | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| NonMaxSuppression | Not Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| Normalize | Supported | Supported\*\* | Supported\* | Not Supported | Not Supported | Supported |
|
||||
| OneHot | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| Pad | Supported | Supported\*\* | Supported\* | Not Supported | Not Supported | Supported |
|
||||
| Permute | Supported | Supported | Supported | Supported\* | Not Supported | Supported |
|
||||
| Pooling(AVG,MAX) | Supported | Supported | Supported | Supported | Supported | Supported |
|
||||
| Pooling(AVG,MAX) 3D | Supported | Supported | Not Supported | Not Supported | Not Supported | Not Supported |
|
||||
| Power | Supported | Supported\*\* | Supported | Supported\* | Supported\* | Supported |
|
||||
| PowerFile | Not Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Not Supported |
|
||||
| PriorBox | Supported | Supported\*\* | Supported | Not Supported | Not Supported | Supported |
|
||||
| PriorBoxClustered | Supported\*\* | Supported\*\* | Supported | Not Supported | Not Supported | Supported |
|
||||
| Proposal | Supported | Supported\*\* | Supported | Not Supported | Not Supported | Supported |
|
||||
| PSROIPooling | Supported | Supported\*\* | Supported | Not Supported | Not Supported | Supported |
|
||||
| Range | Not Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| Reciprocal | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| ReduceAnd | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| ReduceL1 | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| ReduceL2 | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| ReduceLogSum | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| ReduceLogSumExp | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| ReduceMax | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| ReduceMean | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| ReduceMin | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| ReduceOr | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| ReduceProd | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| ReduceSum | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| ReduceSumSquare | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| RegionYolo | Supported | Supported\*\* | Supported | Not Supported | Not Supported | Supported |
|
||||
| ReorgYolo | Supported | Supported\*\* | Supported | Not Supported | Not Supported | Supported |
|
||||
| Resample | Supported | Supported\*\* | Supported | Not Supported | Supported\* | Supported |
|
||||
| Reshape | Supported |Supported\*\*\*| Supported | Supported | Not Supported | Supported\* |
|
||||
| ReverseSequence | Supported | Supported\*\* | Supported | Not Supported | Not Supported | Supported |
|
||||
| RNN | Not Supported | Supported | Supported | Not Supported | Not Supported | Not Supported |
|
||||
| ROIPooling | Supported\* | Supported | Supported | Not Supported | Not Supported | Supported |
|
||||
| ScaleShift | Supported |Supported\*\*\*| Supported\* | Supported | Supported | Supported |
|
||||
| ScatterUpdate | Not Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| Select | Supported | Supported | Supported | Not Supported | Not Supported | Supported |
|
||||
| Selu | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| ShuffleChannels | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| Sign | Supported | Supported\*\* | Supported | Not Supported | Not Supported | Supported |
|
||||
| Sin | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| Sinh | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| SimplerNMS | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| Slice | Supported |Supported\*\*\*| Supported | Supported | Supported\* | Supported |
|
||||
| SoftMax | Supported |Supported\*\*\*| Supported | Not Supported | Not Supported | Supported |
|
||||
| Softplus | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| Softsign | Supported | Supported\*\* | Not Supported | Supported | Not Supported | Supported |
|
||||
| SpaceToDepth | Not Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| SpatialTransformer | Not Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| Split | Supported |Supported\*\*\*| Supported | Supported | Supported\* | Supported |
|
||||
| Squeeze | Supported | Supported\*\* | Supported | Supported | Not Supported | Supported |
|
||||
| StridedSlice | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| Tan | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| TensorIterator | Not Supported | Supported | Supported | Supported | Not Supported | Not Supported |
|
||||
| Tile | Supported\*\* |Supported\*\*\*| Supported | Not Supported | Not Supported | Supported |
|
||||
| TopK | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported | Supported |
|
||||
| Unpooling | Supported | Not Supported | Not Supported | Not Supported | Not Supported | Not Supported |
|
||||
| Unsqueeze | Supported | Supported\*\* | Supported | Supported | Not Supported | Supported |
|
||||
| Upsampling | Supported | Not Supported | Not Supported | Not Supported | Not Supported | Not Supported |
|
||||
| Layers | GPU | CPU | VPU | GNA | ShapeInfer |
|
||||
|:-------------------------------|:-------------:|:-------------:|:-------------:|:-------------:|:-------------:|
|
||||
| Abs | Supported | Supported\*\* | Supported | Not Supported | Supported |
|
||||
| Acos | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| Acosh | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| Activation-Clamp | Supported |Supported\*\*\*| Supported | Supported | Supported |
|
||||
| Activation-ELU | Supported |Supported\*\*\*| Supported | Not Supported | Supported |
|
||||
| Activation-Exp | Supported |Supported\*\*\*| Not Supported | Supported | Supported |
|
||||
| Activation-Leaky ReLU | Supported |Supported\*\*\*| Supported | Supported | Supported |
|
||||
| Activation-Not | Supported |Supported\*\*\*| Not Supported | Not Supported | Supported |
|
||||
| Activation-PReLU | Supported |Supported\*\*\*| Supported | Not Supported | Supported |
|
||||
| Activation-ReLU | Supported |Supported\*\*\*| Supported | Supported | Supported |
|
||||
| Activation-ReLU6 | Supported |Supported\*\*\*| Supported | Not Supported | Supported |
|
||||
| Activation-Sigmoid/Logistic | Supported |Supported\*\*\*| Supported | Supported | Supported |
|
||||
| Activation-TanH | Supported |Supported\*\*\*| Supported | Supported | Supported |
|
||||
| ArgMax | Supported | Supported\*\* | Supported | Not Supported | Supported |
|
||||
| Asin | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| Asinh | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| Atan | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| Atanh | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| BatchNormalization | Supported | Supported | Supported | Not Supported | Supported |
|
||||
| BinaryConvolution | Supported | Supported | Not Supported | Not Supported | Supported |
|
||||
| Broadcast | Supported | Supported\*\* | Supported | Not Supported | Supported |
|
||||
| Ceil | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| Concat | Supported |Supported\*\*\*| Supported | Supported | Supported |
|
||||
| Const | Supported | Supported | Supported | Supported | Not Supported |
|
||||
| Convolution-Dilated | Supported | Supported | Supported | Not Supported | Supported |
|
||||
| Convolution-Dilated 3D | Supported | Supported | Not Supported | Not Supported | Not Supported |
|
||||
| Convolution-Grouped | Supported | Supported | Supported | Not Supported | Supported |
|
||||
| Convolution-Grouped 3D | Supported | Supported | Not Supported | Not Supported | Not Supported |
|
||||
| Convolution-Ordinary | Supported | Supported | Supported | Supported\* | Supported |
|
||||
| Convolution-Ordinary 3D | Supported | Supported | Not Supported | Not Supported | Not Supported |
|
||||
| Cos | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| Cosh | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| Crop | Supported | Supported | Supported | Supported | Supported |
|
||||
| CTCGreedyDecoder | Supported\*\* | Supported\*\* | Supported\* | Not Supported | Supported |
|
||||
| Deconvolution | Supported | Supported | Supported | Not Supported | Supported |
|
||||
| Deconvolution 3D | Supported | Supported | Not Supported | Not Supported | Not Supported |
|
||||
| DeformableConvolution | Supported | Supported | Not Supported | Not Supported | Supported |
|
||||
| DepthToSpace | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| DetectionOutput | Supported | Supported\*\* | Supported\* | Not Supported | Supported |
|
||||
| Eltwise-And | Supported |Supported\*\*\*| Not Supported | Not Supported | Supported |
|
||||
| Eltwise-Add | Supported |Supported\*\*\*| Not Supported | Not Supported | Supported |
|
||||
| Eltwise-Div | Supported |Supported\*\*\*| Supported | Not Supported | Supported |
|
||||
| Eltwise-Equal | Supported |Supported\*\*\*| Supported | Not Supported | Supported |
|
||||
| Eltwise-FloorMod | Supported |Supported\*\*\*| Supported | Not Supported | Supported |
|
||||
| Eltwise-Greater | Supported |Supported\*\*\*| Supported | Not Supported | Supported |
|
||||
| Eltwise-GreaterEqual | Supported |Supported\*\*\*| Supported | Not Supported | Supported |
|
||||
| Eltwise-Less | Supported |Supported\*\*\*| Supported | Not Supported | Supported |
|
||||
| Eltwise-LessEqual | Supported |Supported\*\*\*| Supported | Not Supported | Supported |
|
||||
| Eltwise-LogicalAnd | Supported |Supported\*\*\*| Supported | Not Supported | Supported |
|
||||
| Eltwise-LogicalOr | Supported |Supported\*\*\*| Supported | Not Supported | Supported |
|
||||
| Eltwise-LogicalXor | Supported |Supported\*\*\*| Supported | Not Supported | Supported |
|
||||
| Eltwise-Max | Supported |Supported\*\*\*| Supported | Not Supported | Supported |
|
||||
| Eltwise-Min | Supported |Supported\*\*\*| Supported | Not Supported | Supported |
|
||||
| Eltwise-Mul | Supported |Supported\*\*\*| Supported | Supported | Supported |
|
||||
| Eltwise-NotEqual | Supported |Supported\*\*\*| Supported | Not Supported | Supported |
|
||||
| Eltwise-Pow | Supported |Supported\*\*\*| Supported | Not Supported | Supported |
|
||||
| Eltwise-Prod | Supported |Supported\*\*\*| Supported | Supported | Supported |
|
||||
| Eltwise-SquaredDiff | Supported |Supported\*\*\*| Supported | Not Supported | Supported |
|
||||
| Eltwise-Sub | Supported |Supported\*\*\*| Supported | Supported | Supported |
|
||||
| Eltwise-Sum | Supported |Supported\*\*\*| Supported | Supported | Supported |
|
||||
| Erf | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| Exp | Supported | Supported | Not Supported | Supported | Supported |
|
||||
| FakeQuantize | Not Supported | Supported | Not Supported | Not Supported | Supported |
|
||||
| Fill | Not Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| Flatten | Supported | Supported | Supported | Not Supported | Supported |
|
||||
| Floor | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| FullyConnected (Inner Product) | Supported |Supported\*\*\*| Supported | Supported | Supported |
|
||||
| Gather | Supported | Supported\*\* | Supported | Not Supported | Supported |
|
||||
| GatherTree | Not Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| Gemm | Supported | Supported | Supported | Not Supported | Supported |
|
||||
| GRN | Supported\*\* | Supported\*\* | Supported | Not Supported | Supported |
|
||||
| HardSigmoid | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| Interp | Supported\*\* | Supported\*\* | Supported | Not Supported | Supported\* |
|
||||
| Log | Supported | Supported\*\* | Supported | Supported | Supported |
|
||||
| LRN (Norm) | Supported | Supported | Supported | Not Supported | Supported |
|
||||
| LSTMCell | Supported | Supported | Supported | Supported | Not Supported |
|
||||
| GRUCell | Supported | Supported | Not Supported | Not Supported | Not Supported |
|
||||
| RNNCell | Supported | Supported | Not Supported | Not Supported | Not Supported |
|
||||
| LSTMSequence | Supported | Supported | Supported | Not Supported | Not Supported |
|
||||
| GRUSequence | Supported | Supported | Not Supported | Not Supported | Not Supported |
|
||||
| RNNSequence | Supported | Supported | Not Supported | Not Supported | Not Supported |
|
||||
| LogSoftmax | Supported | Supported\*\* | Not Supported | Not Supported | Not Supported |
|
||||
| Memory | Not Supported | Supported | Not Supported | Supported | Supported |
|
||||
| MVN | Supported | Supported\*\* | Supported\* | Not Supported | Supported |
|
||||
| Neg | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| NonMaxSuppression | Not Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| Normalize | Supported | Supported\*\* | Supported\* | Not Supported | Supported |
|
||||
| OneHot | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| Pad | Supported | Supported\*\* | Supported\* | Not Supported | Supported |
|
||||
| Permute | Supported | Supported | Supported | Supported\* | Supported |
|
||||
| Pooling(AVG,MAX) | Supported | Supported | Supported | Supported | Supported |
|
||||
| Pooling(AVG,MAX) 3D | Supported | Supported | Not Supported | Not Supported | Not Supported |
|
||||
| Power | Supported | Supported\*\* | Supported | Supported\* | Supported |
|
||||
| PowerFile | Not Supported | Supported\*\* | Not Supported | Not Supported | Not Supported |
|
||||
| PriorBox | Supported | Supported\*\* | Supported | Not Supported | Supported |
|
||||
| PriorBoxClustered | Supported\*\* | Supported\*\* | Supported | Not Supported | Supported |
|
||||
| Proposal | Supported | Supported\*\* | Supported | Not Supported | Supported |
|
||||
| PSROIPooling | Supported | Supported\*\* | Supported | Not Supported | Supported |
|
||||
| Range | Not Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| Reciprocal | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| ReduceAnd | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| ReduceL1 | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| ReduceL2 | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| ReduceLogSum | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| ReduceLogSumExp | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| ReduceMax | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| ReduceMean | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| ReduceMin | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| ReduceOr | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| ReduceProd | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| ReduceSum | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| ReduceSumSquare | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| RegionYolo | Supported | Supported\*\* | Supported | Not Supported | Supported |
|
||||
| ReorgYolo | Supported | Supported\*\* | Supported | Not Supported | Supported |
|
||||
| Resample | Supported | Supported\*\* | Supported | Not Supported | Supported |
|
||||
| Reshape | Supported |Supported\*\*\*| Supported | Supported | Supported\* |
|
||||
| ReverseSequence | Supported | Supported\*\* | Supported | Not Supported | Supported |
|
||||
| RNN | Not Supported | Supported | Supported | Not Supported | Not Supported |
|
||||
| ROIPooling | Supported\* | Supported | Supported | Not Supported | Supported |
|
||||
| ScaleShift | Supported |Supported\*\*\*| Supported\* | Supported | Supported |
|
||||
| ScatterUpdate | Not Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| Select | Supported | Supported | Supported | Not Supported | Supported |
|
||||
| Selu | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| ShuffleChannels | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| Sign | Supported | Supported\*\* | Supported | Not Supported | Supported |
|
||||
| Sin | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| Sinh | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| SimplerNMS | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| Slice | Supported |Supported\*\*\*| Supported | Supported | Supported |
|
||||
| SoftMax | Supported |Supported\*\*\*| Supported | Not Supported | Supported |
|
||||
| Softplus | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| Softsign | Supported | Supported\*\* | Not Supported | Supported | Supported |
|
||||
| SpaceToDepth | Not Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| SpatialTransformer | Not Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| Split | Supported |Supported\*\*\*| Supported | Supported | Supported |
|
||||
| Squeeze | Supported | Supported\*\* | Supported | Supported | Supported |
|
||||
| StridedSlice | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| Tan | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| TensorIterator | Not Supported | Supported | Supported | Supported | Not Supported |
|
||||
| Tile | Supported\*\* |Supported\*\*\*| Supported | Not Supported | Supported |
|
||||
| TopK | Supported | Supported\*\* | Not Supported | Not Supported | Supported |
|
||||
| Unpooling | Supported | Not Supported | Not Supported | Not Supported | Not Supported |
|
||||
| Unsqueeze | Supported | Supported\*\* | Supported | Supported | Supported |
|
||||
| Upsampling | Supported | Not Supported | Not Supported | Not Supported | Not Supported |
|
||||
|
||||
\*- support is limited to the specific parameters. Refer to "Known Layers Limitation" section for the device [from the list of supported](Supported_Devices.md).
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ Detailed guides
|
||||
* [Build](@ref plugin_build) a plugin library using CMake\*
|
||||
* Plugin and its components [testing](@ref plugin_testing)
|
||||
* [Quantized networks](@ref quantized_networks)
|
||||
* [Writing ngraph transformations](@ref new_ngraph_transformation) guide
|
||||
* [Writing ngraph transformations](@ref ngraph_transformation) guide
|
||||
|
||||
API References
|
||||
-----------------------
|
||||
|
||||
@@ -5,7 +5,7 @@ Currently, there are two groups of optimization methods that can influence on th
|
||||
- **Quantization**. The rest of this document is dedicated to the representation of quantized models.
|
||||
|
||||
## Representation of quantized models
|
||||
The OpenVINO Toolkit represents all the quantized models using the so-called [FakeQuantize](https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_convert_model_Legacy_IR_Layers_Catalog_Spec.html#FakeQuantize) operation. This operation is very expressive and allows mapping values from arbitrary input and output ranges. The whole idea behind that is quite simple: we project (discretize) the input values to the low-precision data type using affine transformation (with clamp and rounding) and then reproject discrete values back to the original range and data type. It can be considered as an emulation of the quantization process which happens at runtime.
|
||||
The OpenVINO Toolkit represents all the quantized models using the so-called FakeQuantize operation (see the description in [this document](../MO_DG/prepare_model/convert_model/Legacy_IR_Layers_Catalog_Spec.md)). This operation is very expressive and allows mapping values from arbitrary input and output ranges. The whole idea behind that is quite simple: we project (discretize) the input values to the low-precision data type using affine transformation (with clamp and rounding) and then reproject discrete values back to the original range and data type. It can be considered as an emulation of the quantization process which happens at runtime.
|
||||
In order to be able to execute a particular DL operation in low-precision all its inputs should be quantized i.e. should have FakeQuantize between operation and data blobs. The figure below shows an example of quantized Convolution which contains two FakeQuantize nodes: one for weights and one for activations (bias is quantized using the same parameters).
|
||||
![quantized_convolution]
|
||||
<div align="center">Figure 1. Example of quantized Convolution operation.</div>
|
||||
|
||||
@@ -1,430 +0,0 @@
|
||||
# Writing ngraph transformations {#new_ngraph_transformation}
|
||||
|
||||
This guide contains all necessary information that could help you to start writing nGraph transformations.
|
||||
|
||||
First of all before writing transformation make sure that there is no transformation with the same functionality
|
||||
in [Transformation Library](group__ie__transformation__api.html). To start writing transformation it's good to know
|
||||
how [Transformation Library](group__ie__transformation__api.html) is structured, how transformations are organized
|
||||
and where to put your transformation code.
|
||||
|
||||
Let's start from reviewing transformations library structure.
|
||||
Transformations library is independent from InferenceEngine target library named as `inference_engine_transformations`
|
||||
and located in `inference-engine/src/transformations` directory.
|
||||
|
||||
Transformations root directory contains two folders:
|
||||
1. ngraph_ops - legacy opset operations needed for nGraph to CNNNetwork conversion.
|
||||
> **Note**: this operation are prohibited to use inside new plugins until they are not moved to separate directory with allowed operations.
|
||||
2. transformations - includes all transformations, utils, runtime info attributes and pass managers.
|
||||
> **Note**: do not use transformation that belongs to `ngraph::pass::ConvertOpSet1ToLegacy` transformations until they are not moved to separate directory with allowed transformations.
|
||||
|
||||
Transformation flow in transformation library has several layers:
|
||||
1. Pass managers - executes any type of transformations and provides additional debug capabilities.
|
||||
2. Transformations - performs particular transformation algorithm on `ngraph::Function`.
|
||||
3. Low level functions that takes set of nodes and performs some transformation action.
|
||||
They are not mandatory and all transformation code can be located inside transformation.
|
||||
But if some transformation parts can potentially be reused in other transformations we suggest to keep them as a separate functions.
|
||||
|
||||
To decide where to store your transformation code please follow these rules:
|
||||
1. If it's plugin specific transformation and can't be reused by other plugins keep source code inside plugin.
|
||||
2. If this transformation relates to OpSetXToOpSetY conversion or it's common optimization then keep sources inside transformation library.
|
||||
|
||||
After you decided where to store your transformation code you can start develop your own nGraph transformation.
|
||||
|
||||
## Table of Contents:
|
||||
|
||||
### 1. [`ngraph::Function` and graph representation](#ngraph_function)
|
||||
### 2. [Transformations types](#transformations_types)
|
||||
### 2.1 [Function pass](#function_pass)
|
||||
### 2.2 [Matcher pass](#matcher_pass)
|
||||
### 2.3 [GraphRewrite pass](#graph_rewrite_pass)
|
||||
### 3. [Pattern matching](#pattern_matching)
|
||||
### 4. [Working with ngraph::Function](#working_with_ngraph_function)
|
||||
### 5. [Transformation writing essentials](#transformation_writing_essentials)
|
||||
### 6. [Common mistakes in transformations](#common_mistakes)
|
||||
### 7. [Using pass manager](#using_pass_manager)
|
||||
### 8. [How to debug transformations](#how_to_debug_transformations)
|
||||
### 9. [Disabling/Enabling specific transformations for plugin X](#disabling_transformation)
|
||||
### 10. [Transformations testing](#transformations_testing)
|
||||
|
||||
## ngraph::Function and graph representation <a name="ngraph_function"></a>
|
||||
|
||||
nGraph function is a very simple thing: it stores shared pointers to `ngraph::op::Result` and `ngraph::op::Parameter` operations that are inputs and outputs of the graph.
|
||||
All other operations hold each other via shared pointers: child operation holds its parent (hard link). If operation has no consumers and it's not Result operation
|
||||
(shared pointer counter is zero) then it will be destructed and won't be accessible anymore. Each operation in `ngraph::Function` has a `std::shared_ptr<ngraph::Node>` type.
|
||||
|
||||
Below you can find examples how `ngraph::Function` can be created:
|
||||
|
||||
@snippet example_ngraph_utils.cpp ngraph_utils:simple_function
|
||||
|
||||
@snippet example_ngraph_utils.cpp ngraph_utils:advanced_function
|
||||
|
||||
## Transformations types <a name="transformations_types"></a>
|
||||
|
||||
nGraph has tree main transformation types: `ngraph::pass::FunctionPass` - strait forward way to work with `ngraph::Function` directly;
|
||||
`ngraph::pass::MatcherPass` - pattern based transformation approach; `ngraph::pass::GraphRewrite` - container for matcher passes.
|
||||
|
||||
###1. ngraph::pass::FunctionPass <a name="function_pass"></a>
|
||||
|
||||
`ngraph::pass::FunctionPass` is used for transformations that take entire `ngraph::Function` as input and process it.
|
||||
|
||||
Template for FunctionPass transformation class
|
||||
|
||||
@snippet src/template_function_transformation.hpp function_pass:template_transformation_hpp
|
||||
|
||||
@snippet src/template_function_transformation.cpp function_pass:template_transformation_cpp
|
||||
|
||||
Using `ngraph::FunctionPass` you need to override `run_on_function` method where you will write transformation code.
|
||||
Return value must be `true` if original function has changed during transformation (new operation were added or operations replacement was made or node attributes were changed) otherwise it must be `false`.
|
||||
For transformation API please follow [working with ngraph::Function](#working_with_ngraph_function) section.
|
||||
Also `ngraph::FunctionPass` based transformations can be executed via `pass::Manager`. See examples in [Using pass manager](#using_pass_manager) section.
|
||||
|
||||
###2. ngraph::pass::MatcherPass <a name="matcher_pass"></a>
|
||||
|
||||
`ngraph::pass::MatcherPass` is used for pattern based transformations.
|
||||
|
||||
Template for MatcherPass transformation class
|
||||
@snippet src/template_pattern_transformation.hpp graph_rewrite:template_transformation_hpp
|
||||
|
||||
@snippet src/template_pattern_transformation.cpp graph_rewrite:template_transformation_cpp
|
||||
|
||||
Using `ngraph::pass::MatcherPass` you need to complete these steps:
|
||||
1. Create pattern
|
||||
2. Implement callback
|
||||
3. Register pattern and Matcher
|
||||
4. MatcherPass execution
|
||||
|
||||
So let's go though each of this steps.
|
||||
|
||||
### Create pattern
|
||||
Pattern is a single root `ngraph::Function`. But the only difference is that you don't need to create function object, you just create and connect nGraph or special pattern operations.
|
||||
And then take the last created operation and put it as a root of the pattern. This root node will be used as a root node in pattern matching.
|
||||
> **Note**: any nodes in pattern that have no consumers and not registered as root won't be used in pattern matching.
|
||||
|
||||
@snippet example_ngraph_utils.cpp pattern:simple_example
|
||||
|
||||
You may have noticed that `Parameter` operation in example has type and shape specified. These attributes are needed only to create Parameter operation class and won't be used in pattern matching.
|
||||
|
||||
But what if we want to match pattern where `ShapeOf` takes any operation as input? To find an answer please follow [pattern matching](#pattern_matching) section.
|
||||
|
||||
### Implement callback
|
||||
Callback is an action applied to every pattern entrance. In general callback is lambda function that takes Matcher object with detected sub-graph.
|
||||
|
||||
@snippet example_ngraph_utils.cpp pattern:callback_example
|
||||
|
||||
Example above shows callback structure and how Matcher can be used for accessing nodes detected by pattern.
|
||||
Callback return value must be `true` if root node was replaced and another pattern can't be applied to the same root node otherwise it must be `false`.
|
||||
> **Note**: it's not recommended to manipulate with nodes that are under root node. This may affect GraphRewrite execution as it's expected that all nodes that comes after root node in topological order are valid and can be used in pattern matching.
|
||||
|
||||
MatcherPass also provides functionality that allows to report which newly created nodes can be used in additional pattern matching.
|
||||
If MatcherPass was registered in `pass::Manager` or `pass::GraphRewrite` then this registered nodes will be added for additional pattern matching.
|
||||
That means that matcher passes registered in `pass::GraphRewrite` will be applied to this nodes.
|
||||
|
||||
Example below shows how single MatcherPass can fuse sequence of operations using `register_new_node` method.
|
||||
|
||||
@snippet src/template_pattern_transformation.cpp matcher_pass:relu_fusion
|
||||
|
||||
> **Note**: if you register multiple nodes please add them in topological order. We do not topologically sort this nodes as it's time consuming operation.
|
||||
|
||||
### Register pattern and Matcher
|
||||
The last step is to register Matcher and callback inside MatcherPass pass. And to do this you need to call `register_matcher` method.
|
||||
> **Note**: Only one matcher can be registered for single MatcherPass class.
|
||||
|
||||
```cpp
|
||||
// Register matcher and callback
|
||||
this->register_matcher(m, callback);
|
||||
```
|
||||
### Matcher pass execution
|
||||
MatcherPass has multiple ways to be executed:
|
||||
1. Run on a single node - it can be useful if you want to run MatcherPass inside another transformation.
|
||||
@snippet src/template_pattern_transformation.cpp matcher_pass:run_on_node
|
||||
2. Run on `ngraph::Function` using GraphRewrite - this approach gives ability to run MatcherPass on whole `ngraph::Functoin`. Moreover multiple MatcherPass transformation can be registered in a single GraphRewite to be executed in a single graph traversal.
|
||||
@snippet src/template_pattern_transformation.cpp matcher_pass:graph_rewrite
|
||||
3. Run on `ngraph::Function` using `pass::Manager` - this approach helps you to register MatcherPass for execution on `ngraph::Function` as another transformation types.
|
||||
@snippet src/template_pattern_transformation.cpp matcher_pass:manager
|
||||
|
||||
|
||||
###3. ngraph::pass::GraphRewrite <a name="graph_rewrite_pass"></a>
|
||||
|
||||
GraphRewrite pass serves for running multiple matcher passes on `ngraph::Function` in a single graph traversal.
|
||||
Example:
|
||||
|
||||
@snippet src/template_pattern_transformation.cpp matcher_pass:graph_rewrite
|
||||
|
||||
In addition GraphRewrite handles nodes that were registered by MatcherPasses during their execution. This nodes will be added to the beginning of sequence with nodes for pattern matching.
|
||||
|
||||
> **Note**: when using `pass::Manager` temporary GraphRewrite is used to execute single MatcherPass.
|
||||
|
||||
## Pattern matching <a name="pattern_matching"></a>
|
||||
|
||||
Sometimes patterns can't be expressed via regular nGraph operations. For example if you want to detect Convolution->Add sub-graph without specifying particular input type for Convolution operation or you want to create pattern where some of operations can have different types.
|
||||
And for these cases nGraph provides additional helpers to construct patterns for GraphRewrite transformations.
|
||||
|
||||
There are two main helpers:
|
||||
1. `ngraph::pattern::op::Label` - helps to express inputs if their type is undefined.
|
||||
2. `ngraph::pattern::op::Any` - helps to express intermediate nodes of pattern if their type is unknown.
|
||||
|
||||
Let's go through example to have better understanding how it works:
|
||||
|
||||
> **Note**: node attributes do not participate in pattern matching and needed only for operations creation. Only operation types participate in pattern matching.
|
||||
|
||||
Example below shows basic usage of `pattern::op::Label` class.
|
||||
Here we construct Multiply pattern with arbitrary first input and Constant as a second input.
|
||||
|
||||
@snippet example_ngraph_utils.cpp pattern:label_example
|
||||
|
||||
This example show how we can construct pattern when operation has arbitrary number of inputs.
|
||||
|
||||
@snippet example_ngraph_utils.cpp pattern:concat_example
|
||||
|
||||
This example shows how to use predicate to construct pattern where operation has two different types. Also it shows how to match pattern manually on given node.
|
||||
|
||||
@snippet example_ngraph_utils.cpp pattern:predicate_example
|
||||
|
||||
> **Note**: be careful with manual matching because Matcher object holds matched nodes. To clear match use m->clear_state() method.
|
||||
|
||||
## Working with ngraph::Function <a name="working_with_ngraph_function"></a>
|
||||
|
||||
In this chapter we will review nGraph API that allows us to manipulate with `ngraph::Function`.
|
||||
|
||||
###1. ngraph::Node input and output ports
|
||||
|
||||
First of all let's talk about `ngraph::Node` input/output ports. Each nGraph operation has input and output ports except cases when operation has `Result`, `Parameter` or `Constant` type.
|
||||
|
||||
Every port belongs to its node so using port we can access parent node, get shape and type for particular input/output, get all consumers in case of output port and get producer node in case of input port.
|
||||
With output port we can set inputs for newly created operations.
|
||||
|
||||
Lets look at code example.
|
||||
|
||||
@snippet example_ngraph_utils.cpp ngraph:ports_example
|
||||
|
||||
You may notice that we usually construct operations in this way:
|
||||
```cpp
|
||||
std::shared_ptr<Node> neg_const = opset1::Constant::create(sub->get_input_element_type(1), Shape{1}, {-1}));
|
||||
Output<Node> data = node->input_value(0);
|
||||
auto neg = std::make_shared<ngraph::opset1::Multiply>(data, neg_const);
|
||||
```
|
||||
In this example `opset3::Multiply` operation takes `Output<Node>` and `std::shared_ptr<Node>` as inputs. But constructor takes both as `Output<Node>`.
|
||||
In this case `std::shared_ptr<Node>` will be automatically converted to `Output<Node>` if node has exactly one output port otherwise conversion will raise an exception.
|
||||
|
||||
###2. ngraph::Node replacement
|
||||
|
||||
nGraph provides two ways for node replacement: via nGraph helper function and directly via port methods. We are going to review both of them.
|
||||
|
||||
Let's start with nGraph helper functions. The most popular function is `ngraph::replace_node(old_node, new_node)`.
|
||||
|
||||
We will review real replacement case where Negative operation replaces with Multiply.
|
||||
|
||||
![ngraph_replace_node]
|
||||
|
||||
@snippet example_ngraph_utils.cpp ngraph:replace_node
|
||||
|
||||
`ngraph::replace_node` has a constraint that number of output ports for both of ops must be the same otherwise it will raise an exception.
|
||||
|
||||
|
||||
The alternative way to do the same replacement is next:
|
||||
```cpp
|
||||
// All neg->output(0) consumers will be moved to mul->output(0) port
|
||||
neg->output(0).replace(mul->output(0));
|
||||
```
|
||||
|
||||
Another transformation example is insertion.
|
||||
|
||||
![ngraph_insert_node]
|
||||
|
||||
@snippet example_ngraph_utils.cpp ngraph:insert_node
|
||||
|
||||
The alternative way to insert operation is to make a node copy and use `replace_node`:
|
||||
|
||||
@snippet example_ngraph_utils.cpp ngraph:insert_node_with_copy
|
||||
|
||||
###3. ngraph::Node elimination
|
||||
|
||||
Another type of node replacement is its elimination.
|
||||
|
||||
To eliminate operation nGraph has special method that consider all limitations related to InferenceEngine.
|
||||
|
||||
@snippet example_ngraph_utils.cpp ngraph:eliminate_node
|
||||
|
||||
`replace_output_update_name` in case of successful replacement it automatically preserves friendly name and runtime info.
|
||||
|
||||
|
||||
## Transformation writing essentials <a name="transformation_writing_essentials"></a>
|
||||
|
||||
When developing transformation we need to follow next transformation rules:
|
||||
|
||||
###1. Operation Set (OpSet)
|
||||
|
||||
Which OpSet to use in your transformation? The right answer is latest that exists at the moment. An exception is ConvertOpSetXToOpSetY transformations where operations from OpSetX and OpSetY are required to use.
|
||||
|
||||
@snippet example_ngraph_utils.cpp ngraph:include
|
||||
|
||||
###2. Dynamic Shape and Rank
|
||||
|
||||
nGraph has two types for shape representation:
|
||||
`ngraph::Shape` - represents static shape.
|
||||
`ngraph::PartialShape` - represents dynamic shape. That means that rank or some of dimensions are dynamic (undefined).
|
||||
`ngraph::PartialShape` can be converted to `ngraph::Shape` using `get_shape()` method if all dimensions are static otherwise conversion will raise an exception.
|
||||
|
||||
@snippet example_ngraph_utils.cpp ngraph:shape
|
||||
|
||||
But in most cases before getting static shape using `get_shape()` method you need to check that shape is static.
|
||||
|
||||
Also if your transformation requires only input shape rank or particular dimension value for some reason please do not use `get_shape()` method. See example below how not to use `get_shape()`
|
||||
|
||||
@snippet example_ngraph_utils.cpp ngraph:shape_check
|
||||
|
||||
Not using `get_shape()` method makes your transformation more flexible and applicable for more cases.
|
||||
|
||||
###3. Friendly Names
|
||||
|
||||
Each `ngraph::Node` has unique name (is used for nGraph internals) and friendly name. In transformations we care only about friendly name because it represents name from IR.
|
||||
Also friendly name is used as output tensor name (until we do not have other way to represent output tensor name) and user code that requests intermediate outputs based on this names.
|
||||
So not to loose friendly name when replacing node with other node or sub-graph we need to set original friendly name to the latest node in replacing sub-garph. See example below.
|
||||
|
||||
```cpp
|
||||
// Replace Div operation with Power and Multiply sub-graph and set original friendly name to Multiply operation
|
||||
auto pow = std::make_shared<ngraph::opset1::Power>(div->input(1).get_source_output(),
|
||||
op::Constant::create(div->get_input_element_type(1), Shape{1}, {-1}));
|
||||
auto mul = std::make_shared<ngraph::opset1::Multiply>(div->input(0).get_source_output(), pow);
|
||||
mul->set_friendly_name(div->get_friendly_name());
|
||||
ngraph::replace_node(div, mul);
|
||||
```
|
||||
|
||||
In more advanced cases when replaced operation has several outputs and we add additional consumers to its outputs we make decision how to set friendly name by arrangement.
|
||||
|
||||
###4. Runtime Info
|
||||
|
||||
Runtime info is a map `std::map<std::string, std::shared_ptr<Variant>>` located inside `ngraph::Node` class. It represents additional attributes in `ngraph::Node`.
|
||||
These attributes can be set by users or by plugins and when executing transformation that changes `ngraph::Function` we need to preserve this attributes as they won't be automatically propagated.
|
||||
In most cases transformations has next types: 1:1 (replace node with another node), 1:N (replace node with a sub-graph), N:1 (fuse sub-graph into a single node), N:M (any other transformation).
|
||||
Currently there is no mechanism that automatically detects transformation types so we need to propagate this runtime information manually. See examples below.
|
||||
|
||||
```cpp
|
||||
// Replace Transpose with Reshape operation (1:1)
|
||||
ngraph::copy_runtime_info(transpose, reshape);
|
||||
```
|
||||
|
||||
```cpp
|
||||
// Replace Div operation with Power and Multiply sub-graph (1:N)
|
||||
ngraph::copy_runtime_info(div, {pow, mul});
|
||||
```
|
||||
|
||||
```cpp
|
||||
// Fuse Convolution with Add operation (N:1)
|
||||
ngraph::copy_runtime_info({conv, bias}, {conv_ie});
|
||||
```
|
||||
|
||||
```cpp
|
||||
// Any other transformation that replaces one sub-graph with another sub-graph (N:M)
|
||||
ngraph::copy_runtime_info({a, b, c}, {e, f});
|
||||
```
|
||||
|
||||
When transformation has multiple fusions or decompositions `ngraph::copy_runtime_info` must be called multiple times for each case.
|
||||
|
||||
###5. Constant Folding
|
||||
|
||||
If your transformation inserts constant sub-graphs that needs to be folded do not forget to use `ngraph::pass::ConstantFolding()` after your transformation.
|
||||
Example below shows how constant sub-graph can be constructed.
|
||||
|
||||
```cpp
|
||||
// After ConstantFolding pass Power will be replaced with Constant
|
||||
auto pow = std::make_shared<ngraph::opset3::Power>(
|
||||
opset3::Constant::create(element::f32, Shape{1}, {2})
|
||||
opset3::Constant::create(element::f32, Shape{1}, {3}));
|
||||
auto mul = std::make_shared<ngraph::opset3::Multiply>(input /* not constant input */, pow);
|
||||
```
|
||||
|
||||
## Common mistakes in transformations <a name="common_mistakes"></a>
|
||||
|
||||
In transformation development process
|
||||
|
||||
* Do not use deprecated nGraph API. Deprecated methods has `NGRAPH_DEPRECATED` macros in its definition.
|
||||
* Do not pass `shared_ptr<Node>` as input for other node if type of node is unknown or it has multiple outputs. Use explicit output port.
|
||||
* If you replace node with another node that produce different shape you need to remember that new shape won't be propagated until first `validate_nodes_and_infer_types` call for `ngraph::Function`. If you are using `pass::Manager` it will automatically call this method after each transformation execution.
|
||||
* Do not forget to call `ngraph::ConstantFolding` pass if your transformation creates constant sub-graphs.
|
||||
* Use latest OpSet if you are not developing downgrade transformation pass.
|
||||
* When developing callback for `ngraph::pass::MatcherPass` do not change nodes that comes after root node in topological order.
|
||||
|
||||
## Using pass manager <a name="using_pass_manager"></a>
|
||||
|
||||
`ngraph::pass::Manager` is a container class that can store list of transformations and execute them. The main idea of this class is to have high-level representation for grouped list of transformations.
|
||||
It can register and apply any [transformation types](#transformations_types) on function.
|
||||
In addition `ngraph::pass::Manager` has extended debug capabilities (find more information in [how to debug transformations](#how_to_debug_transformations) section).
|
||||
|
||||
Example below shows basic usage of `ngraph::pass::Manager`
|
||||
|
||||
@snippet src/template_pattern_transformation.cpp matcher_pass:manager3
|
||||
|
||||
Another example how multiple matcher passes can be united into single GraphRewrite.
|
||||
|
||||
@snippet src/template_pattern_transformation.cpp matcher_pass:manager2
|
||||
|
||||
## How to debug transformations <a name="how_to_debug_transformations"></a>
|
||||
|
||||
The most popular tool for transformations debugging is `ngraph::pass::VisualizeTree` transformation that visualize ngraph::Function.
|
||||
|
||||
Usage example:
|
||||
|
||||
@snippet example_ngraph_utils.cpp ngraph:visualize
|
||||
|
||||
`ngraph::pass::VisualizeTree` can be parametrized via environment variables:
|
||||
|
||||
```
|
||||
NGRAPH_VISUALIZE_TREE_OUTPUT_SHAPES=1 - visualize shapes
|
||||
NGRAPH_VISUALIZE_TREE_OUTPUT_TYPES=1 - visualize types
|
||||
```
|
||||
|
||||
> **Note**: current VisualTree has not user friendly interface and it will be changed in nearest future. The intention is to move visualize abilities inside transformations.
|
||||
|
||||
If you are using `ngraph::pass::Manager` to run sequence of transformations you can get additional debug capabilities by using next environment variables:
|
||||
|
||||
```
|
||||
NGRAPH_PROFILE_PASS_ENABLE=1 - enables performance measurement for each transformation and prints execution status
|
||||
NGRAPH_ENABLE_VISUALIZE_TRACING=1 - enables visualization after each transformation. By default it saves dot and svg files.
|
||||
```
|
||||
|
||||
> **Note**: make sure that you have dot installed on your machine otherwise it will silently save only dot file without svg file.
|
||||
|
||||
## Disabling/Enabling specific transformations for plugin X <a name="disabling_transformation"></a>
|
||||
|
||||
This topic mostly related to conversion to legacy opset and plugins that based on CNNNetwork but still this mechanism can be applied for other cases.
|
||||
Let's suppose that plugin X enabled `opset3::StridedSlice` operation support and you want to disable `ngraph::pass::ConvertStridedSliceToCrop` transformation for plugin X.
|
||||
To do this you need to create callback on plugin side and pass it to transformation. And also you need to update particular transformation to use this callback.
|
||||
|
||||
```cpp
|
||||
// Update callback to be able to use m_transformation_callback if this transformation based on GraphRewrite.
|
||||
ngraph::graph_rewrite_callback callback = [this](pattern::Matcher &m) {
|
||||
...
|
||||
}
|
||||
|
||||
// Use transformation_callback not to execute transformation if callback returns true for given node
|
||||
if (m_transformation_callback(node)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Implement transformation callback and pass it directly to transformation or pass::Manager
|
||||
const auto transformations_callback = [](const std::shared_ptr<const ::ngraph::Node> &node) -> bool {
|
||||
return std::dynamic_pointer_cast<const ::ngraph::opset3::StridedSlice>(node) != nullptr;
|
||||
};
|
||||
|
||||
// Register transformation and pass callback to pass::Manager
|
||||
ngraph::pass::Manager manager;
|
||||
manager.register_pass<ngraph::pass::ConvertStridedSliceToCrop>();
|
||||
// pass::Manager will set callback to all reistered transformations automatically
|
||||
manager.set_callback(transformations_callback);
|
||||
manager.run_passes(f);
|
||||
```
|
||||
|
||||
## Transformations testing <a name="transformations_testing"></a>
|
||||
|
||||
If you are developing new transformation inside plugin you need to add test into `template_plugin/tests/functional/transformations` folder.
|
||||
We have two types of tests: nGraph reader tests located in `inference-engine/tests/functional/inference_engine/ngraph_reader` and transformation tests located in `inference-engine/tests/functional/inference_engine/transformations`
|
||||
Reader tests are IR based and test end to end conversion from IR to CNNNetwork. Transformation tests test single ngraph transformations or low level functiont that are used inside transformations.
|
||||
|
||||
The basic transformation test looks like this:
|
||||
|
||||
@snippet tests/functional/transformations/template_transformations_test.cpp transformation:test
|
||||
|
||||
|
||||
[ngraph_replace_node]: ../images/ngraph_replace_node.png
|
||||
[ngraph_insert_node]: ../images/ngraph_insert_node.png
|
||||
@@ -80,7 +80,7 @@ Actual graph compilation is done in the `ExecutableNetwork` constructor. Refer t
|
||||
The function accepts a const shared pointer to `ngraph::Function` object and performs the following steps:
|
||||
|
||||
1. Deep copies a const object to a local object, which can later be modified.
|
||||
2. Applies common and plugin-specific transformations on a copied graph to make the graph more friendly to hardware operations. For details how to write custom plugin-specific transformation, please, refer to [Writing ngraph transformations](@ref new_ngraph_transformation) guide. See detailed topics about network representation:
|
||||
2. Applies common and plugin-specific transformations on a copied graph to make the graph more friendly to hardware operations. For details how to write custom plugin-specific transformation, please, refer to [Writing ngraph transformations](@ref ngraph_transformation) guide. See detailed topics about network representation:
|
||||
* [Intermediate Representation and Operation Sets](../_docs_MO_DG_IR_and_opsets.html)
|
||||
* [Quantized networks](@ref quantized_networks).
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ To build test binaries together with other build artifacts, use the `make all` c
|
||||
|
||||
### Tests for plugin-specific ngraph transformations
|
||||
|
||||
Please, refer to [Transformation testing](@ref new_ngraph_transformation) guide.
|
||||
Please, refer to [Transformation testing](@ref ngraph_transformation) guide.
|
||||
|
||||
### How to Extend Inference Engine Plugin Tests
|
||||
|
||||
@@ -55,4 +55,4 @@ as input graphs used by tests. In this case, to test a new layer with layer test
|
||||
the `IE::ngraphFunctions` library, which is also included in the Inference Engine Developer package, with a new nGraph function
|
||||
including the corresponding operation.
|
||||
|
||||
> **NOTE**: When implementing a new subgraph test, add new single-layer tests for each operation of the subgraph if such test does not exist.
|
||||
> **NOTE**: When implementing a new subgraph test, add new single-layer tests for each operation of the subgraph if such test does not exist.
|
||||
|
||||
@@ -9,7 +9,7 @@ For more details about low-precision model representation please refer to this [
|
||||
During the model load each plugin can interpret quantization rules expressed in *FakeQuantize* operations:
|
||||
- Independently based on the definition of *FakeQuantize* operation.
|
||||
- Using a special library of low-precision transformations (LPT) which applies common rules for generic operations,
|
||||
such as Convolution, Fully-Connected, Eltwise, etc., and translates "fake-quantized" models into the models with low-precision operations. For more information about low-precision flow please refer to the following [document](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Int8Inference.html).
|
||||
such as Convolution, Fully-Connected, Eltwise, etc., and translates "fake-quantized" models into the models with low-precision operations. For more information about low-precision flow please refer to the following [document](../IE_DG/Int8Inference.md).
|
||||
|
||||
Here we provide only a high-level overview of the interpretation rules of FakeQuantize.
|
||||
At runtime each FakeQuantize can be split into two independent operations: **Quantize** and **Dequantize**.
|
||||
@@ -46,8 +46,4 @@ Below we define these rules as follows:
|
||||
- Non-unified quantization parameters for Eltwise and Concat operations.
|
||||
- Non-quantized network output, i.e. there are no quantization parameters for it.
|
||||
|
||||
## Quantized model inference
|
||||
|
||||
!!! Need details from the runtime team.
|
||||
|
||||
[qdq_propagation]: ../images/qdq_propagation.png
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:05eb8600d2c905975674f3a0a5dc676107d22f65f2a1f78ee1cfabc1771721ea
|
||||
size 41307
|
||||
3
docs/IE_PLUGIN_DG/images/graph_rewrite_execution.png
Normal file
3
docs/IE_PLUGIN_DG/images/graph_rewrite_execution.png
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:17cd470c6d04d7aabbdb4a08e31f9c97eab960cf7ef5bbd3a541df92db38f26b
|
||||
size 40458
|
||||
3
docs/IE_PLUGIN_DG/images/register_new_node.png
Normal file
3
docs/IE_PLUGIN_DG/images/register_new_node.png
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:80297287c81a2f27b7e74895738afd90844354a8dd745757e8321e2fb6ed547e
|
||||
size 31246
|
||||
3
docs/IE_PLUGIN_DG/images/transformations_structure.png
Normal file
3
docs/IE_PLUGIN_DG/images/transformations_structure.png
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0b206c602626f17ba5787810b9a28f9cde511448c3e63a5c7ba976cee7868bdb
|
||||
size 14907
|
||||
@@ -14,7 +14,6 @@
|
||||
<tab type="user" url="@ref plugin_build" visibile="yes" title="Build Your Plugin with CMake*"/>
|
||||
<tab type="user" url="@ref plugin_testing" visibile="yes" title="Test Your Plugin"/>
|
||||
<tab type="user" url="@ref quantized_networks" visibile="yes" title="Quantized networks guide"/>
|
||||
<tab type="user" url="@ref new_ngraph_transformation" visibile="yes" title="Writing ngraph transformations"/>
|
||||
</tab>
|
||||
<!-- API References -->
|
||||
<tab type="usergroup" title="API REFERENCE">
|
||||
@@ -23,4 +22,4 @@
|
||||
</tab>
|
||||
<tab type="usergroup" title="MAIN OPENVINO™ DOCS" url="../index.html"/>
|
||||
</navindex>
|
||||
</doxygenlayout>
|
||||
</doxygenlayout>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Inference Engine development configuration document {#openvino_docs_Inference_Engine_Development_Procedure_CONTRIBUTING}
|
||||
|
||||
To create MakeFiles use following process or run build-after-clone.sh script located in the root
|
||||
folder if you use Ubuntu 16.04.
|
||||
folder if you use Ubuntu 18.04.
|
||||
To create Visual Studio project run create_vs_proj_x64.cmd from scripts folder.
|
||||
|
||||
## Setting up the environment for development
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
* [IE TESTS]
|
||||
* [IE DOCS]
|
||||
* [IE MKLDNN]
|
||||
* [IE FPGA]
|
||||
* [IE GNA]
|
||||
* [IE CLDNN]
|
||||
* [IE MYRIAD]
|
||||
|
||||
@@ -15,3 +15,10 @@ Your costs and results may vary.
|
||||
Intel technologies may require enabled hardware, software or service activation.
|
||||
|
||||
© Intel Corporation. Intel, the Intel logo, and other Intel marks are trademarks of Intel Corporation or its subsidiaries. \*Other names and brands may be claimed as the property of others.
|
||||
|
||||
## OpenVINO™ Logo
|
||||
To build equity around the project, the OpenVINO logo was created for both Intel and community usage. The logo may only be used to represent the OpenVINO toolkit and offerings built using the OpenVINO toolkit.
|
||||
|
||||
## Logo Usage Guidelines
|
||||
The OpenVINO logo must be used in connection with truthful, non-misleading references to the OpenVINO toolkit, and for no other purpose.
|
||||
Modification of the logo or use of any separate element(s) of the logo alone is not allowed.
|
||||
|
||||
@@ -14,41 +14,49 @@ Model Optimizer produces an Intermediate Representation (IR) of the network, whi
|
||||
|
||||
## What's New in the Model Optimizer in this Release?
|
||||
|
||||
**Deprecation Notice**
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><strong>Deprecation Begins</strong></td>
|
||||
<td>June 1, 2020</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Removal Date</strong></td>
|
||||
<td>December 1, 2020</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
*Starting with the OpenVINO™ toolkit 2020.2 release, all of the features previously available through nGraph have been merged into the OpenVINO™ toolkit. As a result, all the features previously available through ONNX RT Execution Provider for nGraph have been merged with ONNX RT Execution Provider for OpenVINO™ toolkit.*
|
||||
|
||||
*Therefore, ONNX RT Execution Provider for nGraph will be deprecated starting June 1, 2020 and will be completely removed on December 1, 2020. Users are recommended to migrate to the ONNX RT Execution Provider for OpenVINO™ toolkit as the unified solution for all AI inferencing on Intel® hardware.*
|
||||
|
||||
* Common changes:
|
||||
* Implemented generation of a compressed OpenVINO IR suitable for INT8 inference, which takes up to 4 times less disk space than an expanded one. Use the `--disable_weights_compression` Model Optimizer command-line parameter to get an expanded version.
|
||||
* Implemented an optimization transformation to replace a sub-graph with the `Erf` operation into the `GeLU` operation.
|
||||
* Implemented an optimization transformation to replace an upsamping pattern that is represented as a sequence of `Split` and `Concat` operations to a single `Interpolate` operation.
|
||||
* Fixed a number of Model Optimizer bugs to generate reshape-able IRs of many models with the command line parameter `--keep_shape_ops`.
|
||||
* Fixed a number of Model Optimizer transformations to set operations name in an IR equal to the original framework model operation name.
|
||||
* The following operations are no longer generated with `version="opset1"`: `MVN`, `ROIPooling`, `ReorgYolo`. They became a part of new `opset2` operation set and generated with `version="opset2"`. Before this fix, the operations were generated with `version="opset1"` by mistake, they were not a part of `opset1` nGraph namespace; `opset1` specification was fixed accordingly.
|
||||
|
||||
* Implemented several optimization transformations to replace sub-graphs of operations with HSwish, Mish, Swish and SoftPlus operations.
|
||||
* Model Optimizer generates IR keeping shape-calculating sub-graphs **by default**. Previously, this behavior was triggered if the "--keep_shape_ops" command line parameter was provided. The key is ignored in this release and will be deleted in the next release. To trigger the legacy behavior to generate an IR for a fixed input shape (folding ShapeOf operations and shape-calculating sub-graphs to Constant), use the "--static_shape" command line parameter. Changing model input shape using the Inference Engine API in runtime may fail for such an IR.
|
||||
* Fixed Model Optimizer conversion issues resulted in non-reshapeable IR using the Inference Engine reshape API.
|
||||
* Enabled transformations to fix non-reshapeable patterns in the original networks:
|
||||
* Hardcoded Reshape
|
||||
* In Reshape(2D)->MatMul pattern
|
||||
* Reshape->Transpose->Reshape when the pattern can be fused to the ShuffleChannels or DepthToSpace operation
|
||||
* Hardcoded Interpolate
|
||||
* In Interpolate->Concat pattern
|
||||
* Added a dedicated requirements file for TensorFlow 2.X as well as the dedicated install prerequisites scripts.
|
||||
* Replaced the SparseToDense operation with ScatterNDUpdate-4.
|
||||
* ONNX*:
|
||||
* Added support for the following operations: `MeanVarianceNormalization` if normalization is performed over spatial dimensions.
|
||||
|
||||
* Enabled an ability to specify the model output **tensor** name using the "--output" command line parameter.
|
||||
* Added support for the following operations:
|
||||
* Acosh
|
||||
* Asinh
|
||||
* Atanh
|
||||
* DepthToSpace-11, 13
|
||||
* DequantizeLinear-10 (zero_point must be constant)
|
||||
* HardSigmoid-1,6
|
||||
* QuantizeLinear-10 (zero_point must be constant)
|
||||
* ReduceL1-11, 13
|
||||
* ReduceL2-11, 13
|
||||
* Resize-11, 13 (except mode="nearest" with 5D+ input, mode="tf_crop_and_resize", and attributes exclude_outside and extrapolation_value with non-zero values)
|
||||
* ScatterND-11, 13
|
||||
* SpaceToDepth-11, 13
|
||||
* TensorFlow*:
|
||||
* Added support for the TensorFlow Object Detection models version 1.15.X.
|
||||
* Added support for the following operations: `BatchToSpaceND`, `SpaceToBatchND`, `Floor`.
|
||||
|
||||
* Added support for the following operations:
|
||||
* Acosh
|
||||
* Asinh
|
||||
* Atanh
|
||||
* CTCLoss
|
||||
* EuclideanNorm
|
||||
* ExtractImagePatches
|
||||
* FloorDiv
|
||||
* MXNet*:
|
||||
* Added support for the following operations:
|
||||
* `Reshape` with input shape values equal to -2, -3, and -4.
|
||||
* Acosh
|
||||
* Asinh
|
||||
* Atanh
|
||||
* Kaldi*:
|
||||
* Fixed bug with ParallelComponent support. Now it is fully supported with no restrictions.
|
||||
|
||||
> **NOTE:**
|
||||
> [Intel® System Studio](https://software.intel.com/en-us/system-studio) is an all-in-one, cross-platform tool suite, purpose-built to simplify system bring-up and improve system and IoT device application performance on Intel® platforms. If you are using the Intel® Distribution of OpenVINO™ with Intel® System Studio, go to [Get Started with Intel® System Studio](https://software.intel.com/en-us/articles/get-started-with-openvino-and-intel-system-studio-2019).
|
||||
|
||||
@@ -242,20 +242,4 @@ To differentiate versions of the same operation type, like `ReLU`, the suffix `-
|
||||
`N` usually refers to the first `opsetN` where this version of the operation is introduced.
|
||||
It is not guaranteed that new operations will be named according to that rule, the naming convention might be changed, but not for old operations which are frozen completely.
|
||||
|
||||
## Deprecation Notice
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><strong>Deprecation Begins</strong></td>
|
||||
<td>June 1, 2020</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Removal Date</strong></td>
|
||||
<td>December 1, 2020</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
*Starting with the OpenVINO™ toolkit 2020.2 release, all of the features previously available through nGraph have been merged into the OpenVINO™ toolkit. As a result, all the features previously available through ONNX RT Execution Provider for nGraph have been merged with ONNX RT Execution Provider for OpenVINO™ toolkit.*
|
||||
|
||||
*Therefore, ONNX RT Execution Provider for nGraph will be deprecated starting June 1, 2020 and will be completely removed on December 1, 2020. Users are recommended to migrate to the ONNX RT Execution Provider for OpenVINO™ toolkit as the unified solution for all AI inferencing on Intel® hardware.*
|
||||
|
||||
|
||||
@@ -365,7 +365,7 @@ Keep in mind that there is no space between and inside the brackets for input sh
|
||||
|
||||
#### 58. What does the message "Please provide input layer names for input layer shapes" mean? <a name="question-58"></a>
|
||||
|
||||
When specifying input shapes for several layers, you must provide names for inputs, whose shapes will be overwritten. For usage examples, see [Converting a Caffe\* Model](https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_Caffe.html). Additional information for `--input_shape` is in FAQ [#57](#question-57).
|
||||
When specifying input shapes for several layers, you must provide names for inputs, whose shapes will be overwritten. For usage examples, see [Converting a Caffe* Model](convert_model/Convert_Model_From_Caffe.md. Additional information for `--input_shape` is in FAQ [#57](#question-57).
|
||||
|
||||
#### 59. What does the message "Values cannot be parsed" mean? <a name="question-59"></a>
|
||||
|
||||
|
||||
@@ -376,7 +376,7 @@ Standard ONNX\* operators:
|
||||
| ReduceSum | No |
|
||||
| Relu | No |
|
||||
| Reshape | No |
|
||||
| Resize | Opset-10 version is supported |
|
||||
| Resize | transformation mode `tf_crop_and_resize` is not supported, mode `nearest` is not supported for 5D+ inputs. |
|
||||
| ReverseSequence | No |
|
||||
| Scatter | Supported if fuse-able to ScatterUpdate. MYRIAD only |
|
||||
| ScatterND | No |
|
||||
|
||||
@@ -126,8 +126,10 @@ Framework-agnostic parameters:
|
||||
value, for example: "node_name->True". It will be
|
||||
DEPRECATED in future releases. Use --input option to
|
||||
specify a value for freezing.
|
||||
--static_shape Enables `ShapeOf` operation with all children folding to `Constant`.
|
||||
This option makes model not reshapable in Inference Engine
|
||||
--static_shape Enables IR generation for fixed input shape (folding
|
||||
`ShapeOf` operations and shape-calculating sub-graphs
|
||||
to `Constant`). Changing model input shape using
|
||||
the Inference Engine API in runtime may fail for such an IR.
|
||||
--disable_weights_compression
|
||||
Disable compression and store weights with original
|
||||
precision.
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
# Converting TensorFlow* Object Detection API Models {#openvino_docs_MO_DG_prepare_model_convert_model_tf_specific_Convert_Object_Detection_API_Models}
|
||||
|
||||
> **NOTES**:
|
||||
>
|
||||
> * Starting with the 2019 R1 release, the Model Optimizer supports the `--keep_shape_ops` command line parameter that allows you to convert the TensorFlow\* Object Detection API Faster and Mask RCNNs topologies so they can be re-shaped in the Inference Engine using dedicated reshape API. Refer to [Using Shape Inference](../../../../IE_DG/ShapeInference.md) for more information on how to use this feature. It is possible to change the both spatial dimensions of the input image and batch size.
|
||||
> * Starting with the 2018 R4 release, the Model Optimizer supports the `--input_shape` command line parameter for the TensorFlow\* Object Detection API topologies. Refer to the [Custom Input Shape](#tf_od_custom_input_shape) for more information.
|
||||
> * Starting with the 2021.1 release, the Model Optimizer converts the TensorFlow\* Object Detection API SSDs, Faster and Mask RCNNs topologies keeping shape-calculating sub-graphs by default, so topologies can be re-shaped in the Inference Engine using dedicated reshape API. Refer to [Using Shape Inference](../../../../IE_DG/ShapeInference.md) for more information on how to use this feature. It is possible to change the both spatial dimensions of the input image and batch size.
|
||||
> * To generate IRs for SSD topologies, the Model Optimizer creates a number of `PriorBoxClustered` layers instead of a constant node with prior boxes calculated for the particular input image size. This change allows you to reshape the topology in the Inference Engine using dedicated Inference Engine API. The reshaping is supported for all SSD topologies except FPNs which contain hardcoded shapes for some operations preventing from changing topology input shape.
|
||||
|
||||
## How to Convert a Model
|
||||
|
||||
@@ -2,117 +2,96 @@
|
||||
|
||||
## Increase Performance for Deep Learning Inference
|
||||
|
||||
The [Intel® Distribution of OpenVINO™ toolkit](https://software.intel.com/en-us/openvino-toolkit) helps accelerate deep learning inference across a variety of Intel® processors and accelerators. Rather than a one-size-fits-all solution, Intel offers a powerful portfolio of scalable hardware and software solutions, powered by the Intel® Distribution of OpenVINO™ toolkit, to meet the various performance, power, and price requirements of any use case. The benchmarks below demonstrate high performance gains on several public neural networks for a streamlined, quick deployment on **Intel® CPU, VPU and FPGA** platforms. Use this data to help you decide which hardware is best for your applications and solutions, or to plan your AI workload on the Intel computing already included in your solutions.
|
||||
The [Intel® Distribution of OpenVINO™ toolkit](https://software.intel.com/en-us/openvino-toolkit) helps accelerate deep learning inference across a variety of Intel® processors and accelerators. Rather than a one-size-fits-all solution, Intel offers a powerful portfolio of scalable hardware and software solutions, powered by the Intel® Distribution of OpenVINO™ toolkit, to meet the various performance, power, and price requirements of any use case. The benchmarks below demonstrate high performance gains on several public neural networks for a streamlined, quick deployment on **Intel® CPU and VPU** platforms. Use this data to help you decide which hardware is best for your applications and solutions, or to plan your AI workload on the Intel computing already included in your solutions.
|
||||
|
||||
Measuring inference performance involves many variables and is extremely use-case and application dependent. We use the below four parameters for measurements, which are key elements to consider for a successful deep learning inference application:
|
||||
|
||||
1. **Throughput** - Measures the number of inferences delivered within a latency threshold. (for example, number of frames per second). When deploying a system with deep learning inference, select the throughput that delivers the best trade-off between latency and power for the price and performance that meets your requirements.
|
||||
1. **Throughput** - Measures the number of inferences delivered within a latency threshold. (for example, number of Frames Per Second - FPS). When deploying a system with deep learning inference, select the throughput that delivers the best trade-off between latency and power for the price and performance that meets your requirements.
|
||||
2. **Value** - While throughput is important, what is more critical in edge AI deployments is the performance efficiency or performance-per-cost. Application performance in throughput per dollar of system cost is the best measure of value.
|
||||
3. **Efficiency** - System power is a key consideration from the edge to the data center. When selecting deep learning solutions, power efficiency (throughput/watt) is a critical factor to consider. Intel designs provide excellent power efficiency for running deep learning workloads.
|
||||
4. **Total Benefit** (Most applicable for Intel® VPU Platforms) - Combining the factors of value and efficiency can be a good way to compare which hardware yields the best performance per watt and per dollar for your particular use case.
|
||||
4. **Latency** - This measures the synchronous execution of inference requests and is reported in milliseconds. Each inference request (for example: preprocess, infer, postprocess) is allowed to complete before the next is started. This performance metric is relevant in usage scenarios where a single image input needs to be acted upon as soon as possible. An example would be the healthcare sector where medical personnel only request analysis of a single ultra sound scanning image or in real-time or near real-time applications for example an industrial robot's response to actions in its environment or obstacle avoidance for autonomous vehicles.
|
||||
|
||||
---
|
||||
\htmlonly
|
||||
<!-- these CDN links and scripts are required. Add them to the <head> of your website -->
|
||||
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;600;700;900&display=swap" rel="stylesheet" type="text/css">
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" type="text/css">
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js@2.9.3/dist/Chart.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-datalabels"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/chartjs-plugin-annotation/0.5.7/chartjs-plugin-annotation.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-barchart-background@1.3.0/build/Plugin.Barchart.Background.min.js"></script>
|
||||
<!-- download this file and place on your server (or include the styles inline) -->
|
||||
<link rel="stylesheet" href="ovgraphs.css" type="text/css">
|
||||
\endhtmlonly
|
||||
|
||||
## Intel® Xeon® E-2124G<a name="xeon-e"></a>
|
||||
|
||||

|
||||

|
||||

|
||||
\htmlonly
|
||||
<script src="bert-large-uncased-whole-word-masking-squad-int8-0001-ov-2021-1-096.js" id="bert-large-uncased-whole-word-masking-squad-int8-0001-ov-2021-1-096"></script>
|
||||
\endhtmlonly
|
||||
|
||||
---
|
||||
\htmlonly
|
||||
<script src="deeplabv3-tf-ov-2021-1-096.js" id="deeplabv3-tf-ov-2021-1-096"></script>
|
||||
\endhtmlonly
|
||||
|
||||
## Intel® Xeon® Silver 4216R <a name="xeon-silver"></a>
|
||||
\htmlonly
|
||||
<script src="densenet-121-tf-ov-2021-1-096.js" id="densenet-121-tf-ov-2021-1-096"></script>
|
||||
\endhtmlonly
|
||||
|
||||

|
||||

|
||||

|
||||
\htmlonly
|
||||
<script src="faster-rcnn-resnet50-coco-tf-ov-2021-1-096.js" id="faster-rcnn-resnet50-coco-tf-ov-2021-1-096"></script>
|
||||
\endhtmlonly
|
||||
|
||||
---
|
||||
\htmlonly
|
||||
<script src="googlenet-v1-tf-ov-2021-1-096.js" id="googlenet-v1-tf-ov-2021-1-096"></script>
|
||||
\endhtmlonly
|
||||
|
||||
## Intel® Xeon® Gold 5218T <a name="xeon-gold"></a>
|
||||
\htmlonly
|
||||
<script src="inception-v3-tf-ov-2021-1-096.js" id="inception-v3-tf-ov-2021-1-096"></script>
|
||||
\endhtmlonly
|
||||
|
||||

|
||||

|
||||

|
||||
\htmlonly
|
||||
<script src="mobilenet-ssd-cf-ov-2021-1-096.js" id="mobilenet-ssd-cf-ov-2021-1-096"></script>
|
||||
\endhtmlonly
|
||||
|
||||
---
|
||||
\htmlonly
|
||||
<script src="mobilenet-v1-1-0-224-tf-ov-2021-1-096.js" id="mobilenet-v1-1-0-224-tf-ov-2021-1-096"></script>
|
||||
\endhtmlonly
|
||||
|
||||
## Intel® Xeon® Platinum 8270 <a name="xeon-platinum"></a>
|
||||
\htmlonly
|
||||
<script src="mobilenet-v2-pytorch-ov-2021-1-096.js" id="mobilenet-v2-pytorch-ov-2021-1-096"></script>
|
||||
\endhtmlonly
|
||||
|
||||

|
||||

|
||||

|
||||
\htmlonly
|
||||
<script src="resnet-18-pytorch-ov-2021-1-096.js" id="resnet-18-pytorch-ov-2021-1-096"></script>
|
||||
\endhtmlonly
|
||||
|
||||
---
|
||||
\htmlonly
|
||||
<script src="resnet-50-tf-ov-2021-1-096.js" id="resnet-50-tf-ov-2021-1-096"></script>
|
||||
\endhtmlonly
|
||||
|
||||
## Intel® Atom™ x5-E3940 <a name="atom"></a>
|
||||
|
||||

|
||||

|
||||

|
||||
\htmlonly
|
||||
<script src="se-resnext-50-cf-ov-2021-1-096.js" id="se-resnext-50-cf-ov-2021-1-096"></script>
|
||||
\endhtmlonly
|
||||
|
||||
---
|
||||
\htmlonly
|
||||
<script src="squeezenet1-1-cf-ov-2021-1-096.js" id="squeezenet1-1-cf-ov-2021-1-096"></script>
|
||||
\endhtmlonly
|
||||
|
||||
## Intel® Core™ i3-8100 <a name="core-i3"></a>
|
||||
|
||||

|
||||

|
||||

|
||||
\htmlonly
|
||||
<script src="ssd300-cf-ov-2021-1-096.js" id="ssd300-cf-ov-2021-1-096"></script>
|
||||
\endhtmlonly
|
||||
|
||||
---
|
||||
\htmlonly
|
||||
<script src="yolo-v3-tf-ov-2021-1-096.js" id="yolo-v3-tf-ov-2021-1-096"></script>
|
||||
\endhtmlonly
|
||||
|
||||
## Intel® Core™ i5-8500 <a name="core-i5"></a>
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
---
|
||||
|
||||
## Intel® Core™ i7-8700T <a name="core-i7"></a>
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
---
|
||||
|
||||
## Intel® Core™ i9-10920X <a name="core-i9"></a>
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
---
|
||||
|
||||
## Intel® Neural Compute Stick 2 <a name="intel-ncs2"></a>
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
---
|
||||
|
||||
## Intel® Vision Accelerator Design with Intel® Movidius™ VPUs (Uzel* UI-AR8) <a name="ivad-vpu"></a>
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
---
|
||||
|
||||
## Intel® Vision Accelerator Design with Intel® Arria® 10 FPGA
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
## Platform Configurations
|
||||
|
||||
Intel® Distribution of OpenVINO™ toolkit performance benchmark numbers are based on release 2020.4.
|
||||
Intel® Distribution of OpenVINO™ toolkit performance benchmark numbers are based on release 2021.1.
|
||||
|
||||
Intel technologies’ features and benefits depend on system configuration and may require enabled hardware, software or service activation. Learn more at intel.com, or from the OEM or retailer. Performance results are based on testing as of July 8, 2020 and may not reflect all publicly available security updates. See configuration disclosure for details. No product can be absolutely secure.
|
||||
Intel technologies’ features and benefits depend on system configuration and may require enabled hardware, software or service activation. Learn more at intel.com, or from the OEM or retailer. Performance results are based on testing as of September 25, 2020 and may not reflect all publicly available security updates. See configuration disclosure for details. No product can be absolutely secure.
|
||||
|
||||
Software and workloads used in performance tests may have been optimized for performance only on Intel microprocessors. Performance tests, such as SYSmark and MobileMark, are measured using specific computer systems, components, software, operations and functions. Any change to any of those factors may cause the results to vary. You should consult other information and performance tests to assist you in fully evaluating your contemplated purchases, including the performance of that product when combined with other products. For more complete information, see [Performance Benchmark Test Disclosure](https://www.intel.com/content/www/us/en/benchmarks/benchmark.html).
|
||||
|
||||
@@ -142,31 +121,31 @@ Testing by Intel done on: see test date for each HW platform below.
|
||||
| Batch size | 1 | 1 | 1 | 1 |
|
||||
| Precision | INT8 | INT8 | INT8 | INT8 |
|
||||
| Number of concurrent inference requests | 4 | 32 | 32 | 52 |
|
||||
| Test Date | July 8, 2020 | July 8, 2020 | July 8, 2020 | July 8, 2020 |
|
||||
| Test Date | September 25, 2020 | September 25, 2020 | September 25, 2020 | September 25, 2020 |
|
||||
| Power dissipation, TDP in Watt | [71](https://ark.intel.com/content/www/us/en/ark/products/134854/intel-xeon-e-2124g-processor-8m-cache-up-to-4-50-ghz.html#tab-blade-1-0-1) | [125](https://ark.intel.com/content/www/us/en/ark/products/193394/intel-xeon-silver-4216-processor-22m-cache-2-10-ghz.html#tab-blade-1-0-1) | [105](https://ark.intel.com/content/www/us/en/ark/products/193953/intel-xeon-gold-5218t-processor-22m-cache-2-10-ghz.html#tab-blade-1-0-1) | [205](https://ark.intel.com/content/www/us/en/ark/products/192482/intel-xeon-platinum-8270-processor-35-75m-cache-2-70-ghz.html#tab-blade-1-0-1) |
|
||||
| CPU Price on July 8, 2020, USD<br>Prices may vary | [213](https://ark.intel.com/content/www/us/en/ark/products/134854/intel-xeon-e-2124g-processor-8m-cache-up-to-4-50-ghz.html) | [1,002](https://ark.intel.com/content/www/us/en/ark/products/193394/intel-xeon-silver-4216-processor-22m-cache-2-10-ghz.html) | [1,349](https://ark.intel.com/content/www/us/en/ark/products/193953/intel-xeon-gold-5218t-processor-22m-cache-2-10-ghz.html) | [7,405](https://ark.intel.com/content/www/us/en/ark/products/192482/intel-xeon-platinum-8270-processor-35-75m-cache-2-70-ghz.html) |
|
||||
| CPU Price on September 29, 2020, USD<br>Prices may vary | [213](https://ark.intel.com/content/www/us/en/ark/products/134854/intel-xeon-e-2124g-processor-8m-cache-up-to-4-50-ghz.html) | [1,002](https://ark.intel.com/content/www/us/en/ark/products/193394/intel-xeon-silver-4216-processor-22m-cache-2-10-ghz.html) | [1,349](https://ark.intel.com/content/www/us/en/ark/products/193953/intel-xeon-gold-5218t-processor-22m-cache-2-10-ghz.html) | [7,405](https://ark.intel.com/content/www/us/en/ark/products/192482/intel-xeon-platinum-8270-processor-35-75m-cache-2-70-ghz.html) |
|
||||
|
||||
**CPU Inference Engines (continue)**
|
||||
|
||||
| | Intel® Core™ i5-8500 | Intel® Core™ i7-8700T | Intel® Core™ i9-10920X |
|
||||
| -------------------- | ---------------------------------- | ----------------------------------- |--------------------------------------|
|
||||
| Motherboard | ASUS* PRIME Z370-A | GIGABYTE* Z370M DS3H-CF | ASUS* PRIME X299-A II |
|
||||
| CPU | Intel® Core™ i5-8500 CPU @ 3.00GHz | Intel® Core™ i7-8700T CPU @ 2.40GHz | Intel® Core™ i9-10920X CPU @ 3.50GHz |
|
||||
| Hyper Threading | OFF | ON | ON |
|
||||
| Turbo Setting | ON | ON | ON |
|
||||
| Memory | 2 x 16 GB DDR4 2666MHz | 4 x 16 GB DDR4 2400MHz | 4 x 16 GB DDR4 2666MHz |
|
||||
| Operating System | Ubuntu* 18.04 LTS | Ubuntu* 18.04 LTS | Ubuntu* 18.04 LTS |
|
||||
| Kernel Version | 5.3.0-24-generic | 5.0.0-23-generic | 5.0.0-23-generic |
|
||||
| BIOS Vendor | American Megatrends Inc.* | American Megatrends Inc.* | American Megatrends Inc.* |
|
||||
| BIOS Version | 2401 | F11 | 505 |
|
||||
| BIOS Release | July 12, 2019 | March 13, 2019 | December 17, 2019 |
|
||||
| BIOS Settings | Select optimized default settings, <br>save & exit | Select optimized default settings, <br>set OS type to "other", <br>save & exit | Default Settings |
|
||||
| Batch size | 1 | 1 | 1 |
|
||||
| Precision | INT8 | INT8 | INT8 |
|
||||
| Number of concurrent inference requests | 3 | 4 | 24 |
|
||||
| Test Date | July 8, 2020 | July 8, 2020 | July 8, 2020 |
|
||||
| Power dissipation, TDP in Watt | [65](https://ark.intel.com/content/www/us/en/ark/products/129939/intel-core-i5-8500-processor-9m-cache-up-to-4-10-ghz.html#tab-blade-1-0-1) | [35](https://ark.intel.com/content/www/us/en/ark/products/129948/intel-core-i7-8700t-processor-12m-cache-up-to-4-00-ghz.html#tab-blade-1-0-1) | [165](https://ark.intel.com/content/www/us/en/ark/products/198012/intel-core-i9-10920x-x-series-processor-19-25m-cache-3-50-ghz.html) |
|
||||
| CPU Price on July 8, 2020, USD<br>Prices may vary | [192](https://ark.intel.com/content/www/us/en/ark/products/129939/intel-core-i5-8500-processor-9m-cache-up-to-4-10-ghz.html) | [303](https://ark.intel.com/content/www/us/en/ark/products/129948/intel-core-i7-8700t-processor-12m-cache-up-to-4-00-ghz.html) | [700](https://ark.intel.com/content/www/us/en/ark/products/198012/intel-core-i9-10920x-x-series-processor-19-25m-cache-3-50-ghz.html)
|
||||
| | Intel® Core™ i5-8500 | Intel® Core™ i7-8700T | Intel® Core™ i9-10920X | 11th Gen Intel® Core™ i5-1145G7E |
|
||||
| -------------------- | ---------------------------------- | ----------------------------------- |--------------------------------------|-----------------------------------|
|
||||
| Motherboard | ASUS* PRIME Z370-A | GIGABYTE* Z370M DS3H-CF | ASUS* PRIME X299-A II | Intel Corporation /<br>TigerLake U DDR4 SODIMM RVP |
|
||||
| CPU | Intel® Core™ i5-8500 CPU @ 3.00GHz | Intel® Core™ i7-8700T CPU @ 2.40GHz | Intel® Core™ i9-10920X CPU @ 3.50GHz | 11th Gen Intel® Core™ i5-1145G7E @ 2.60GHz |
|
||||
| Hyper Threading | OFF | ON | ON | ON |
|
||||
| Turbo Setting | ON | ON | ON | ON |
|
||||
| Memory | 2 x 16 GB DDR4 2666MHz | 4 x 16 GB DDR4 2400MHz | 4 x 16 GB DDR4 2666MHz | 2 x 8 GB DDR4 3200MHz |
|
||||
| Operating System | Ubuntu* 18.04 LTS | Ubuntu* 18.04 LTS | Ubuntu* 18.04 LTS | Ubuntu* 18.04 LTS |
|
||||
| Kernel Version | 5.3.0-24-generic | 5.0.0-23-generic | 5.0.0-23-generic | 5.8.0-05-generic |
|
||||
| BIOS Vendor | American Megatrends Inc.* | American Megatrends Inc.* | American Megatrends Inc.* | Intel Corporation |
|
||||
| BIOS Version | 2401 | F11 | 505 | TGLIFUI1.R00.3243.A04.2006302148 |
|
||||
| BIOS Release | July 12, 2019 | March 13, 2019 | December 17, 2019 | June 30, 2020 |
|
||||
| BIOS Settings | Select optimized default settings, <br>save & exit | Select optimized default settings, <br>set OS type to "other", <br>save & exit | Default Settings | Default Settings |
|
||||
| Batch size | 1 | 1 | 1 | 1 |
|
||||
| Precision | INT8 | INT8 | INT8 | INT8 |
|
||||
| Number of concurrent inference requests | 3 | 4 | 24 | 4 |
|
||||
| Test Date | September 25, 2020 | September 25, 2020 | September 25, 2020 | September 25, 2020 |
|
||||
| Power dissipation, TDP in Watt | [65](https://ark.intel.com/content/www/us/en/ark/products/129939/intel-core-i5-8500-processor-9m-cache-up-to-4-10-ghz.html#tab-blade-1-0-1) | [35](https://ark.intel.com/content/www/us/en/ark/products/129948/intel-core-i7-8700t-processor-12m-cache-up-to-4-00-ghz.html#tab-blade-1-0-1) | [165](https://ark.intel.com/content/www/us/en/ark/products/198012/intel-core-i9-10920x-x-series-processor-19-25m-cache-3-50-ghz.html) | [28](https://ark.intel.com/content/www/us/en/ark/products/208081/intel-core-i5-1145g7e-processor-8m-cache-up-to-4-10-ghz.html) |
|
||||
| CPU Price on September 29, 2020, USD<br>Prices may vary | [192](https://ark.intel.com/content/www/us/en/ark/products/129939/intel-core-i5-8500-processor-9m-cache-up-to-4-10-ghz.html) | [303](https://ark.intel.com/content/www/us/en/ark/products/129948/intel-core-i7-8700t-processor-12m-cache-up-to-4-00-ghz.html) | [700](https://ark.intel.com/content/www/us/en/ark/products/198012/intel-core-i9-10920x-x-series-processor-19-25m-cache-3-50-ghz.html) | [309](https://mysamples.intel.com/SAM_U_Product/ProductDetail.aspx?InputMMID=99A3D1&RequestID=0&ProductID=1213750) |
|
||||
|
||||
**CPU Inference Engines (continue)**
|
||||
|
||||
@@ -186,37 +165,37 @@ Testing by Intel done on: see test date for each HW platform below.
|
||||
| Batch size | 1 | 1 |
|
||||
| Precision | INT8 | INT8 |
|
||||
| Number of concurrent inference requests | 4 | 4 |
|
||||
| Test Date | July 8, 2020 | July 8, 2020 |
|
||||
| Test Date | September 25, 2020 | September 25, 2020 |
|
||||
| Power dissipation, TDP in Watt | [9.5](https://ark.intel.com/content/www/us/en/ark/products/96485/intel-atom-x5-e3940-processor-2m-cache-up-to-1-80-ghz.html) | [65](https://ark.intel.com/content/www/us/en/ark/products/126688/intel-core-i3-8100-processor-6m-cache-3-60-ghz.html#tab-blade-1-0-1)|
|
||||
| CPU Price on July 8, 2020, USD<br>Prices may vary | [34](https://ark.intel.com/content/www/us/en/ark/products/96485/intel-atom-x5-e3940-processor-2m-cache-up-to-1-80-ghz.html) | [117](https://ark.intel.com/content/www/us/en/ark/products/126688/intel-core-i3-8100-processor-6m-cache-3-60-ghz.html) |
|
||||
| CPU Price on September 29, 2020, USD<br>Prices may vary | [34](https://ark.intel.com/content/www/us/en/ark/products/96485/intel-atom-x5-e3940-processor-2m-cache-up-to-1-80-ghz.html) | [117](https://ark.intel.com/content/www/us/en/ark/products/126688/intel-core-i3-8100-processor-6m-cache-3-60-ghz.html) |
|
||||
|
||||
|
||||
|
||||
**Accelerator Inference Engines**
|
||||
|
||||
| | Intel® Neural Compute Stick 2 | Intel® Vision Accelerator Design<br>with Intel® Movidius™ VPUs (Uzel* UI-AR8) | Intel® Vision Accelerator Design<br>with Intel® Arria® 10 FPGA - IEI/SAF3*|
|
||||
| -------------------- | ------------------------------------- | ------------------------------------- | ------------------------- |
|
||||
| VPU | 1 X Intel® Movidius™ Myriad™ X MA2485 | 8 X Intel® Movidius™ Myriad™ X MA2485 | 1 X Intel® Arria® 10 FPGA |
|
||||
| Connection | USB 2.0/3.0 | PCIe X4 | PCIe X8 |
|
||||
| Batch size | 1 | 1 | 1 |
|
||||
| Precision | FP16 | FP16 | FP11 |
|
||||
| Number of concurrent inference requests | 4 | 32 | 5 |
|
||||
| Power dissipation, TDP in Watt | 2.5 | [30](https://www.mouser.com/ProductDetail/IEI/MUSTANG-V100-MX8-R10?qs=u16ybLDytRaZtiUUvsd36w%3D%3D) | [60](https://www.mouser.com/ProductDetail/IEI/MUSTANG-F100-A10-R10?qs=sGAEpiMZZMtNlGR3Dbecs5Qs0RmP5oxxCbTJPjyRuMXthliRUwiVGw%3D%3D) |
|
||||
| CPU Price, USD<br>Prices may vary | [69](https://ark.intel.com/content/www/us/en/ark/products/140109/intel-neural-compute-stick-2.html) (from July 8, 2020) | [768](https://www.mouser.com/ProductDetail/IEI/MUSTANG-V100-MX8-R10?qs=u16ybLDytRaZtiUUvsd36w%3D%3D) (from May 15, 2020) | [1,650](https://www.bhphotovideo.com/c/product/1477989-REG/qnap_mustang_f100_a10_r10_pcie_fpga_highest_performance.html/?ap=y&ap=y&smp=y&msclkid=371b373256dd1a52beb969ecf5981bf8) (from July 8, 2020) |
|
||||
| Host Computer | Intel® Core™ i7 | Intel® Core™ i5 | Intel® Xeon® E3 |
|
||||
| Motherboard | ASUS* Z370-A II | Uzelinfo* / US-E1300 | IEI/SAF3* |
|
||||
| CPU | Intel® Core™ i7-8700 CPU @ 3.20GHz | Intel® Core™ i5-6600 CPU @ 3.30GHz | Intel® Xeon® CPU E3-1268L v5 @ 2.40GHz |
|
||||
| Hyper Threading | ON | OFF | OFF |
|
||||
| Turbo Setting | ON | ON | ON |
|
||||
| Memory | 4 x 16 GB DDR4 2666MHz | 2 x 16 GB DDR4 2400MHz | 2 x 16 GB DDR4 2666MHz |
|
||||
| Operating System | Ubuntu* 18.04 LTS | Ubuntu* 18.04 LTS | Ubuntu* 16.04 LTS |
|
||||
| Kernel Version | 5.0.0-23-generic | 5.0.0-23-generic | 4.13.0-45-generic |
|
||||
| BIOS Vendor | American Megatrends Inc.* | American Megatrends Inc.* | American Megatrends Inc.* |
|
||||
| BIOS Version | 411 | 5.12 | V2RMAR15 |
|
||||
| BIOS Release | September 21, 2018 | September 21, 2018 | December 03, 2019 |
|
||||
| Test Date | July 8, 2020 | July 8, 2020 | July 8, 2020 |
|
||||
| | Intel® Neural Compute Stick 2 | Intel® Vision Accelerator Design<br>with Intel® Movidius™ VPUs (Uzel* UI-AR8) |
|
||||
| --------------------------------------- | ------------------------------------- | ------------------------------------- |
|
||||
| VPU | 1 X Intel® Movidius™ Myriad™ X MA2485 | 8 X Intel® Movidius™ Myriad™ X MA2485 |
|
||||
| Connection | USB 2.0/3.0 | PCIe X4 |
|
||||
| Batch size | 1 | 1 |
|
||||
| Precision | FP16 | FP16 |
|
||||
| Number of concurrent inference requests | 4 | 32 |
|
||||
| Power dissipation, TDP in Watt | 2.5 | [30](https://www.mouser.com/ProductDetail/IEI/MUSTANG-V100-MX8-R10?qs=u16ybLDytRaZtiUUvsd36w%3D%3D) |
|
||||
| CPU Price, USD<br>Prices may vary | [69](https://ark.intel.com/content/www/us/en/ark/products/140109/intel-neural-compute-stick-2.html) (from September 29, 2020) | [768](https://www.mouser.com/ProductDetail/IEI/MUSTANG-V100-MX8-R10?qs=u16ybLDytRaZtiUUvsd36w%3D%3D) (from May 15, 2020) |
|
||||
| Host Computer | Intel® Core™ i7 | Intel® Core™ i5 |
|
||||
| Motherboard | ASUS* Z370-A II | Uzelinfo* / US-E1300 |
|
||||
| CPU | Intel® Core™ i7-8700 CPU @ 3.20GHz | Intel® Core™ i5-6600 CPU @ 3.30GHz |
|
||||
| Hyper Threading | ON | OFF |
|
||||
| Turbo Setting | ON | ON |
|
||||
| Memory | 4 x 16 GB DDR4 2666MHz | 2 x 16 GB DDR4 2400MHz |
|
||||
| Operating System | Ubuntu* 18.04 LTS | Ubuntu* 18.04 LTS |
|
||||
| Kernel Version | 5.0.0-23-generic | 5.0.0-23-generic |
|
||||
| BIOS Vendor | American Megatrends Inc.* | American Megatrends Inc.* |
|
||||
| BIOS Version | 411 | 5.12 |
|
||||
| BIOS Release | September 21, 2018 | September 21, 2018 |
|
||||
| Test Date | September 25, 2020 | September 25, 2020 |
|
||||
|
||||
Please follow this link for more detailed configuration descriptions: [Configuration Details](https://docs.openvinotoolkit.org/resources/benchmark_files/system_configurations_2020.4.html)
|
||||
Please follow this link for more detailed configuration descriptions: [Configuration Details](https://docs.openvinotoolkit.org/resources/benchmark_files/system_configurations_2021.1.html)
|
||||
|
||||
\htmlonly
|
||||
<style>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Performance Information Frequently Asked Questions {#openvino_docs_performance_benchmarks_faq}
|
||||
|
||||
The following questions and answers are related to performance benchmarks published on the [Performance Information](https://docs.openvinotoolkit.org/latest/_docs_performance_benchmarks.html) documentation site.
|
||||
The following questions and answers are related to [performance benchmarks](./performance_benchmarks.md) published on the documentation site.
|
||||
|
||||
#### 1. How often do performance benchmarks get updated?
|
||||
New performance benchmarks are typically published on every `major.minor` release of the Intel® Distribution of OpenVINO™ toolkit.
|
||||
@@ -15,36 +15,56 @@ The models used in the performance benchmarks were chosen based on general adopt
|
||||
CF means Caffe*, while TF means TensorFlow*.
|
||||
|
||||
#### 5. How can I run the benchmark results on my own?
|
||||
All of the performance benchmarks were generated using the open-sourced tool within the Intel® Distribution of OpenVINO™ toolkit called `benchmark_app`, which is available in both [C++](https://docs.openvinotoolkit.org/latest/_inference_engine_samples_benchmark_app_README.html) and [Python](https://docs.openvinotoolkit.org/latest/_inference_engine_tools_benchmark_tool_README.html).
|
||||
All of the performance benchmarks were generated using the open-sourced tool within the Intel® Distribution of OpenVINO™ toolkit called `benchmark_app`, which is available in both [C++](../../inference-engine/samples/benchmark_app/README.md) and [Python](../../inference-engine/tools/benchmark_tool/README.md).
|
||||
|
||||
#### 6. What image sizes are used for the classification network models?
|
||||
The image size used in the inference depends on the network being benchmarked. The following table shows the list of input sizes for each network model.
|
||||
| **Model** | **Public Network** | **Task** | **Input Size** (Height x Width) |
|
||||
|------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------|-----------------------------|-----------------------------------|
|
||||
| [faster_rcnn_resnet50_coco-TF](https://github.com/opencv/open_model_zoo/tree/master/models/public/faster_rcnn_resnet50_coco) | Faster RCNN Tf | object detection | 600x1024 |
|
||||
| [googlenet-v1-CF](https://github.com/opencv/open_model_zoo/tree/master/models/public/googlenet-v1) | GoogLeNet_ILSVRC-2012_Caffe | classification | 224x224 |
|
||||
| [googlenet-v3-TF](https://github.com/opencv/open_model_zoo/tree/master/models/public/googlenet-v3) | Inception v3 Tf | classification | 299x299 |
|
||||
| [mobilenet-ssd-CF](https://github.com/opencv/open_model_zoo/tree/master/models/public/mobilenet-ssd) | SSD (MobileNet)_COCO-2017_Caffe | object detection | 300x300 |
|
||||
| [bert-large-uncased-whole-word-masking-squad](https://github.com/opencv/open_model_zoo/tree/develop/models/intel/bert-large-uncased-whole-word-masking-squad-int8-0001) | BERT-large |question / answer |384|
|
||||
| [deeplabv3-TF](https://github.com/opencv/open_model_zoo/tree/master/models/public/deeplabv3) | DeepLab v3 Tf |semantic segmentation | 513x513 |
|
||||
| [densenet-121-TF](https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/densenet-121-tf) | Densenet-121 Tf |classification | 224x224 |
|
||||
| [facenet-20180408-102900-TF](https://github.com/opencv/open_model_zoo/tree/master/models/public/facenet-20180408-102900) | FaceNet TF | face recognition | 160x160 |
|
||||
| [faster_rcnn_resnet50_coco-TF](https://github.com/opencv/open_model_zoo/tree/master/models/public/faster_rcnn_resnet50_coco) | Faster RCNN Tf | object detection | 600x1024 |
|
||||
| [googlenet-v1-TF](https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/googlenet-v1-tf) | GoogLeNet_ILSVRC-2012 | classification | 224x224 |
|
||||
| [inception-v3-TF](https://github.com/opencv/open_model_zoo/tree/master/models/public/googlenet-v3) | Inception v3 Tf | classification | 299x299 |
|
||||
| [mobilenet-ssd-CF](https://github.com/opencv/open_model_zoo/tree/master/models/public/mobilenet-ssd) | SSD (MobileNet)_COCO-2017_Caffe | object detection | 300x300 |
|
||||
| [mobilenet-v1-1.0-224-TF](https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/mobilenet-v1-1.0-224-tf) | MobileNet v1 Tf | classification | 224x224 |
|
||||
| [mobilenet-v2-1.0-224-TF](https://github.com/opencv/open_model_zoo/tree/master/models/public/mobilenet-v2-1.0-224) | MobileNet v2 Tf | classification | 224x224 |
|
||||
| [mobilenet-v2-CF](https://github.com/opencv/open_model_zoo/tree/master/models/public/mobilenet-v2) | Mobilenet V2 Caffe | classification | 224x224 |
|
||||
| [resnet-101-CF](https://github.com/opencv/open_model_zoo/tree/master/models/public/resnet-101) | ResNet-101_ILSVRC-2012_Caffe | classification | 224x224 |
|
||||
| [resnet-50-CF](https://github.com/opencv/open_model_zoo/tree/master/models/public/resnet-50) | ResNet-50_v1_ILSVRC-2012_Caffe | classification | 224x224 |
|
||||
| [mobilenet-v2-pytorch](https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/mobilenet-v2-pytorch ) | Mobilenet V2 PyTorch | classification | 224x224 |
|
||||
| [resnet-18-pytorch](https://github.com/opencv/open_model_zoo/tree/master/models/public/resnet-18-pytorch) | ResNet-18 PyTorch | classification | 224x224 |
|
||||
| [resnet-50-pytorch](https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/resnet-50-pytorch) | ResNet-50 v1 PyTorch | classification | 224x224 |
|
||||
| [resnet-50-TF](https://github.com/opencv/open_model_zoo/tree/master/models/public/resnet-50-tf) | ResNet-50_v1_ILSVRC-2012 | classification | 224x224 |
|
||||
| [se-resnext-50-CF](https://github.com/opencv/open_model_zoo/tree/master/models/public/se-resnext-50) | Se-ResNext-50_ILSVRC-2012_Caffe | classification | 224x224 |
|
||||
| [squeezenet1.1-CF](https://github.com/opencv/open_model_zoo/tree/master/models/public/squeezenet1.1) | SqueezeNet_v1.1_ILSVRC-2012_Caffe | classification | 227x227 |
|
||||
| [ssd300-CF](https://github.com/opencv/open_model_zoo/tree/master/models/public/ssd300) | SSD (VGG-16)_VOC-2007_Caffe | object detection | 300x300 |
|
||||
| [yolo_v3-TF](https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/yolo-v3-tf) | TF Keras YOLO v3 Modelset | object detection | 300x300 |
|
||||
| [ssd_mobilenet_v1_coco-TF](https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/ssd_mobilenet_v1_coco) | ssd_mobilenet_v1_coco | object detection | 300x300 |
|
||||
| [ssdlite_mobilenet_v2-TF](https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/ssdlite_mobilenet_v2) | ssd_mobilenet_v2 | object detection | 300x300 |
|
||||
|
||||
#### 7. Where can I purchase the specific hardware used in the benchmarking?
|
||||
Intel partners with various vendors all over the world. Visit the [Intel® AI: In Production Partners & Solutions Catalog](https://www.intel.com/content/www/us/en/internet-of-things/ai-in-production/partners-solutions-catalog.html) for a list of Equipment Makers and the [Supported Devices](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_supported_plugins_Supported_Devices.html) documentation. You can also remotely test and run models before purchasing any hardware by using [Intel® DevCloud for the Edge](http://devcloud.intel.com/edge/).
|
||||
Intel partners with various vendors all over the world. Visit the [Intel® AI: In Production Partners & Solutions Catalog](https://www.intel.com/content/www/us/en/internet-of-things/ai-in-production/partners-solutions-catalog.html) for a list of Equipment Makers and the [Supported Devices](../IE_DG/supported_plugins/Supported_Devices.md) documentation. You can also remotely test and run models before purchasing any hardware by using [Intel® DevCloud for the Edge](http://devcloud.intel.com/edge/).
|
||||
|
||||
#### 8. How can I optimize my models for better performance or accuracy?
|
||||
We published a set of guidelines and recommendations to optimize your models available in an [introductory](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Intro_to_Performance.html) guide and an [advanced](https://docs.openvinotoolkit.org/latest/_docs_optimization_guide_dldt_optimization_guide.html) guide. For further support, please join the conversation in the [Community Forum](https://software.intel.com/en-us/forums/intel-distribution-of-openvino-toolkit).
|
||||
We published a set of guidelines and recommendations to optimize your models available in an [introductory](../IE_DG/Intro_to_Performance.md) guide and an [advanced](../optimization_guide/dldt_optimization_guide.md) guide. For further support, please join the conversation in the [Community Forum](https://software.intel.com/en-us/forums/intel-distribution-of-openvino-toolkit).
|
||||
|
||||
#### 9. Why are INT8 optimized models used for benchmarking on CPUs with no VNNI support?
|
||||
The benefit of low-precision optimization using the OpenVINO™ toolkit model optimizer extends beyond processors supporting VNNI through Intel® DL Boost. The reduced bit width of INT8 compared to FP32 allows Intel® CPU to process the data faster and thus offers better throughput on any converted model agnostic of the intrinsically supported low-precision optimizations within Intel® hardware. Please refer to [INT8 vs. FP32 Comparison on Select Networks and Platforms](https://docs.openvinotoolkit.org/latest/_docs_performance_int8_vs_fp32.html) for comparison on boost factors for different network models and a selection of Intel® CPU architectures, including AVX-2 with Intel® Core™ i7-8700T, and AVX-512 (VNNI) with Intel® Xeon® 5218T and Intel® Xeon® 8270.
|
||||
The benefit of low-precision optimization using the OpenVINO™ toolkit model optimizer extends beyond processors supporting VNNI through Intel® DL Boost. The reduced bit width of INT8 compared to FP32 allows Intel® CPU to process the data faster and thus offers better throughput on any converted model agnostic of the intrinsically supported low-precision optimizations within Intel® hardware. Please refer to [INT8 vs. FP32 Comparison on Select Networks and Platforms](./performance_int8_vs_fp32.html) for comparison on boost factors for different network models and a selection of Intel® CPU architectures, including AVX-2 with Intel® Core™ i7-8700T, and AVX-512 (VNNI) with Intel® Xeon® 5218T and Intel® Xeon® 8270.
|
||||
|
||||
#### 10. Previous releases included benchmarks on googlenet-v1. Why is there no longer benchmarks on this neural network model?
|
||||
We replaced googlenet-v1 to [resnet-18-pytorch](https://github.com/opencv/open_model_zoo/blob/master/models/public/resnet-18-pytorch/resnet-18-pytorch.md) due to changes in developer usage. The public model resnet-18 is used by many developers as an Image Classification model. This pre-optimized model was also trained on the ImageNet database, similar to googlenet-v1. Both googlenet-v1 and resnet-18 will remain part of the Open Model Zoo. Developers are encouraged to utilize resnet-18-pytorch for Image Classification use cases.
|
||||
|
||||
#### 11. Previous releases included benchmarks on googlenet-v1-CF (Caffe). Why is there no longer benchmarks on this neural network model?
|
||||
We replaced googlenet-v1-CF to resnet-18-pytorch due to changes in developer usage. The public model resnet-18 is used by many developers as an Image Classification model. This pre-optimized model was also trained on the ImageNet database, similar to googlenet-v1-CF. Both googlenet-v1-CF and resnet-18 will remain part of the Open Model Zoo. Developers are encouraged to utilize resnet-18-pytorch for Image Classification use cases.
|
||||
|
||||
#### 12. Why have resnet-50-CF, mobilenet-v1-1.0-224-CF, mobilenet-v2-CF and resnet-101-CF been removed?
|
||||
The CAFFE version of resnet-50, mobilenet-v1-1.0-224 and mobilenet-v2 have been replaced with their TensorFlow and PyTorch counterparts. Resnet-50-CF is replaced by resnet-50-TF, mobilenet-v1-1.0-224-CF is replaced by mobilenet-v1-1.0-224-TF and mobilenet-v2-CF is replaced by mobilenetv2-PyTorch. Resnet-50-CF an resnet-101-CF are no longer maintained at their public source repos.
|
||||
|
||||
#### 13. Where can I search for OpenVINO™ performance results based on HW-platforms?
|
||||
The web site format has changed in order to support the more common search approach of looking for the performance of a given neural network model on different HW-platforms. As opposed to review a given HW-platform's performance on different neural network models.
|
||||
|
||||
#### 14. How is Latency measured?
|
||||
Latency is measured by running the OpenVINO™ inference engine in synchronous mode. In synchronous mode each frame or image is processed through the entire set of stages (pre-processing, inference, post-processing) before the next frame or image is processed. This KPI is relevant for applications where the inference on a single image is required, for example the analysis of an ultra sound image in a medical application or the analysis of a seismic image in the oil & gas industry. Other use cases include real-time or near real-time applications like an industrial robot's response to changes in its environment and obstacle avoidance for autonomous vehicles where a quick response to the result of the inference is required.
|
||||
|
||||
\htmlonly
|
||||
<style>
|
||||
|
||||
@@ -10,6 +10,7 @@ The table below illustrates the speed-up factor for the performance gain by swit
|
||||
<th>Intel® Xeon® <br>Gold <br>5218T</th>
|
||||
<th>Intel® Xeon® <br>Platinum <br>8270</th>
|
||||
<th>Intel® Core™ <br>i7-1065G7</th>
|
||||
<th>Intel® Core™ <br>i7-1145G7E</th>
|
||||
</tr>
|
||||
<tr align="left">
|
||||
<th>OpenVINO <br>benchmark <br>model name</th>
|
||||
@@ -19,106 +20,110 @@ The table below illustrates the speed-up factor for the performance gain by swit
|
||||
<tr>
|
||||
<td>bert-large-<br>uncased-whole-word-<br>masking-squad-0001</td>
|
||||
<td>SQuAD</td>
|
||||
<td>1.5</td>
|
||||
<td>1.6</td>
|
||||
<td>2.5</td>
|
||||
<td>2.0</td>
|
||||
<td>N/A</td>
|
||||
<td>2.8</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>brain-tumor-<br>segmentation-<br>0001-mxnet</td>
|
||||
<td>brain-tumor-<br>segmentation-<br>0001-MXNET</td>
|
||||
<td>BraTS</td>
|
||||
<td>1.5</td>
|
||||
<td>1.7</td>
|
||||
<td>1.6</td>
|
||||
<td>1.9</td>
|
||||
<td>1.8</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>brain-tumor-<br>segmentation-<br>0002-cf2</td>
|
||||
<td>BraTS<br>2017</td>
|
||||
<td>1.2</td>
|
||||
<td>1.7</td>
|
||||
<td>1.4</td>
|
||||
<td>2.2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>deeplabv3-tf</td>
|
||||
<td>deeplabv3-TF</td>
|
||||
<td>VOC 2012<br>Segmentation</td>
|
||||
<td>1.5</td>
|
||||
<td>1.4</td>
|
||||
<td>2.4</td>
|
||||
<td>2.6</td>
|
||||
<td>2.8</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>facenet-<br>20180408-<br>102900-tf</td>
|
||||
<td>LFW</td>
|
||||
<td>2.0</td>
|
||||
<td>3.5</td>
|
||||
<td>3.5</td>
|
||||
<td>3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>faster_rcnn_<br>resnet50_coco-tf</td>
|
||||
<td>MS COCO</td>
|
||||
<td>1.7</td>
|
||||
<td>3.4</td>
|
||||
<td>3.4</td>
|
||||
<td>3.6</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>googlenet-v1-caffe</td>
|
||||
<td>ImageNet</td>
|
||||
<td>1.5</td>
|
||||
<td>2.9</td>
|
||||
<td>2.2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>densenet-121-TF</td>
|
||||
<td>ImageNet</td>
|
||||
<td>1.6</td>
|
||||
<td>3.2</td>
|
||||
<td>3.2</td>
|
||||
<td>3.0</td>
|
||||
<td>3.2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>inception-v3-tf</td>
|
||||
<td>facenet-<br>20180408-<br>102900-TF</td>
|
||||
<td>LFW</td>
|
||||
<td>2.0</td>
|
||||
<td>3.6</td>
|
||||
<td>3.5</td>
|
||||
<td>3.2</td>
|
||||
<td>3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>faster_rcnn_<br>resnet50_coco-TF</td>
|
||||
<td>MS COCO</td>
|
||||
<td>1.7</td>
|
||||
<td>3.5</td>
|
||||
<td>3.4</td>
|
||||
<td>3.6</td>
|
||||
<td>3.6</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>googlenet-v1-TF</td>
|
||||
<td>ImageNet</td>
|
||||
<td>1.8</td>
|
||||
<td>3.6</td>
|
||||
<td>3.7</td>
|
||||
<td>3.5</td>
|
||||
<td>3.6</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>inception-v3-TF</td>
|
||||
<td>ImageNet</td>
|
||||
<td>1.8</td>
|
||||
<td>3.8</td>
|
||||
<td>4.0</td>
|
||||
<td>3.7</td>
|
||||
<td>3.7</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>mobilenet-<br>ssd-caffe</td>
|
||||
<td>mobilenet-<br>ssd-CF</td>
|
||||
<td>VOC2012</td>
|
||||
<td>1.5</td>
|
||||
<td>3.0</td>
|
||||
<td>3.3</td>
|
||||
<td>3.1</td>
|
||||
<td>3.3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>mobilenet-v1-1.0-<br>224-caffe</td>
|
||||
<td>mobilenet-v1-1.0-<br>224-TF</td>
|
||||
<td>ImageNet</td>
|
||||
<td>1.5</td>
|
||||
<td>3.2</td>
|
||||
<td>3.9</td>
|
||||
<td>2.9</td>
|
||||
<td>3.2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>mobilenet-v2-1.0-<br>224-tf</td>
|
||||
<td>mobilenet-v2-1.0-<br>224-TF</td>
|
||||
<td>ImageNet</td>
|
||||
<td>1.3</td>
|
||||
<td>2.6</td>
|
||||
<td>2.7</td>
|
||||
<td>3.8</td>
|
||||
<td>2.2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>mobilenet-v2-<br>caffe</td>
|
||||
<td>ImageNet</td>
|
||||
<td>1.3</td>
|
||||
<td>2.5</td>
|
||||
<td>3.4</td>
|
||||
<td>2.2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>resnet-101-<br>caffe</td>
|
||||
<td>mobilenet-v2-<br>pytorch</td>
|
||||
<td>ImageNet</td>
|
||||
<td>1.8</td>
|
||||
<td>3.7</td>
|
||||
<td>3.7</td>
|
||||
<td>1.4</td>
|
||||
<td>2.6</td>
|
||||
<td>3.6</td>
|
||||
<td>2.3</td>
|
||||
<td>2.4</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>resnet-18-<br>pytorch</td>
|
||||
@@ -127,54 +132,70 @@ The table below illustrates the speed-up factor for the performance gain by swit
|
||||
<td>3.7</td>
|
||||
<td>3.8</td>
|
||||
<td>3.6</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>resnet-50-<br>caffe</td>
|
||||
<td>ImageNet</td>
|
||||
<td>1.8</td>
|
||||
<td>3.6</td>
|
||||
<td>3.9</td>
|
||||
<td>3.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>resnet-50-<br>pytorch</td>
|
||||
<td>ImageNet</td>
|
||||
<td>1.8</td>
|
||||
<td>3.6</td>
|
||||
<td>3.9</td>
|
||||
<td>3.8</td>
|
||||
<td>3.5</td>
|
||||
<td>3.6</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>squeezenet1.1-<br>caffe</td>
|
||||
<td>resnet-50-<br>TF</td>
|
||||
<td>ImageNet</td>
|
||||
<td>1.8</td>
|
||||
<td>3.5</td>
|
||||
<td>3.8</td>
|
||||
<td>3.4</td>
|
||||
<td>4.0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>squeezenet1.1-<br>CF</td>
|
||||
<td>ImageNet</td>
|
||||
<td>1.6</td>
|
||||
<td>2.9</td>
|
||||
<td>3.2</td>
|
||||
<td>3.0</td>
|
||||
<td>3.2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ssd_mobilenet_<br>v1_coco-tf</td>
|
||||
<td>MS COCO</td>
|
||||
<td>VOC2012</td>
|
||||
<td>1.6</td>
|
||||
<td>3.0</td>
|
||||
<td>3.4</td>
|
||||
<td>3.1</td>
|
||||
<td>3.3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ssd300-caffe</td>
|
||||
<td>ssd300-CF</td>
|
||||
<td>MS COCO</td>
|
||||
<td>1.8</td>
|
||||
<td>3.7</td>
|
||||
<td>3.7</td>
|
||||
<td>3.6</td>
|
||||
<td>3.8</td>
|
||||
<td>4.0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ssdlite_<br>mobilenet_<br>v2-tf</td>
|
||||
<td>ssdlite_<br>mobilenet_<br>v2-TF</td>
|
||||
<td>MS COCO</td>
|
||||
<td>1.4</td>
|
||||
<td>2.3</td>
|
||||
<td>3.0</td>
|
||||
<td>3.1</td>
|
||||
<td>2.4</td>
|
||||
<td>2.6</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>yolo_v3-TF</td>
|
||||
<td>MS COCO</td>
|
||||
<td>1.8</td>
|
||||
<td>3.8</td>
|
||||
<td>3.9</td>
|
||||
<td>3.7</td>
|
||||
<td>3.8</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -199,60 +220,60 @@ The following table shows the absolute accuracy drop that is calculated as the d
|
||||
<td>bert-large-<br>uncased-whole-word-<br>masking-squad-0001</td>
|
||||
<td>SQuAD</td>
|
||||
<td>F1</td>
|
||||
<td>0.46</td>
|
||||
<td>0.70</td>
|
||||
<td>0.64</td>
|
||||
<td>0.65</td>
|
||||
<td>0.57</td>
|
||||
<td>0.83</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>brain-tumor-<br>segmentation-<br>0001-mxnet</td>
|
||||
<td>brain-tumor-<br>segmentation-<br>0001-MXNET</td>
|
||||
<td>BraTS</td>
|
||||
<td>Dice-index@ <br>Mean@ <br>Overall Tumor</td>
|
||||
<td>0.08</td>
|
||||
<td>0.08</td>
|
||||
<td>0.14</td>
|
||||
<td>0.9</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>brain-tumor-<br>segmentation-<br>0002-cf2</td>
|
||||
<td>BraTS<br>2017</td>
|
||||
<td>Dice-index@ <br>Mean@ <br>Overall Tumor</td>
|
||||
<td>0.16</td>
|
||||
<td>0.14</td>
|
||||
<td>0.13</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>deeplabv3-tf</td>
|
||||
<td>deeplabv3-TF</td>
|
||||
<td>VOC 2012<br>Segmentation</td>
|
||||
<td>mean_iou</td>
|
||||
<td>0.28</td>
|
||||
<td>0.71</td>
|
||||
<td>0.71</td>
|
||||
<td>0.73</td>
|
||||
<td>0.73</td>
|
||||
<td>1.11</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>facenet-<br>20180408-<br>102900-tf</td>
|
||||
<td>densenet-121-TF</td>
|
||||
<td>ImageNet</td>
|
||||
<td>acc@top-1</td>
|
||||
<td>0.74</td>
|
||||
<td>0.74</td>
|
||||
<td>0.76</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>facenet-<br>20180408-<br>102900-TF</td>
|
||||
<td>LFW</td>
|
||||
<td>pairwise_<br>accuracy<br>_subsets</td>
|
||||
<td>0.02</td>
|
||||
<td>0.05</td>
|
||||
<td>0.05</td>
|
||||
<td>0.02</td>
|
||||
<td>0.02</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>faster_rcnn_<br>resnet50_coco-tf</td>
|
||||
<td>faster_rcnn_<br>resnet50_coco-TF</td>
|
||||
<td>MS COCO</td>
|
||||
<td>coco_<br>precision</td>
|
||||
<td>0.21</td>
|
||||
<td>0.20</td>
|
||||
<td>0.21</td>
|
||||
<td>0.20</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>googlenet-v1-caffe</td>
|
||||
<td>googlenet-v1-TF</td>
|
||||
<td>ImageNet</td>
|
||||
<td>acc@top-1</td>
|
||||
<td>0.24</td>
|
||||
<td>0.19</td>
|
||||
<td>0.20</td>
|
||||
<td>0.03</td>
|
||||
<td>0.03</td>
|
||||
<td>0.01</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>inception-v3-tf</td>
|
||||
<td>inception-v3-TF</td>
|
||||
<td>ImageNet</td>
|
||||
<td>acc@top-1</td>
|
||||
<td>0.03</td>
|
||||
@@ -260,7 +281,7 @@ The following table shows the absolute accuracy drop that is calculated as the d
|
||||
<td>0.01</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>mobilenet-<br>ssd-caffe</td>
|
||||
<td>mobilenet-<br>ssd-CF</td>
|
||||
<td>VOC2012</td>
|
||||
<td>mAP</td>
|
||||
<td>0.35</td>
|
||||
@@ -268,15 +289,15 @@ The following table shows the absolute accuracy drop that is calculated as the d
|
||||
<td>0.34</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>mobilenet-v1-1.0-<br>224-caffe</td>
|
||||
<td>mobilenet-v1-1.0-<br>224-TF</td>
|
||||
<td>ImageNet</td>
|
||||
<td>acc@top-1</td>
|
||||
<td>0.19</td>
|
||||
<td>0.18</td>
|
||||
<td>0.18</td>
|
||||
<td>0.27</td>
|
||||
<td>0.20</td>
|
||||
<td>0.20</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>mobilenet-v2-1.0-<br>224-tf</td>
|
||||
<td>mobilenet-v2-1.0-<br>224-TF</td>
|
||||
<td>ImageNet</td>
|
||||
<td>acc@top-1</td>
|
||||
<td>0.45</td>
|
||||
@@ -284,20 +305,12 @@ The following table shows the absolute accuracy drop that is calculated as the d
|
||||
<td>0.94</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>mobilenet-v2-<br>caffe</td>
|
||||
<td>mobilenet-v2-<br>PYTORCH</td>
|
||||
<td>ImageNet</td>
|
||||
<td>acc@top-1</td>
|
||||
<td>0.24</td>
|
||||
<td>1.45</td>
|
||||
<td>1.45</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>resnet-101-<br>caffe</td>
|
||||
<td>ImageNet</td>
|
||||
<td>acc@top-1</td>
|
||||
<td>0.00</td>
|
||||
<td>0.02</td>
|
||||
<td>0.02</td>
|
||||
<td>0.35</td>
|
||||
<td>0.63</td>
|
||||
<td>0.63</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>resnet-18-<br>pytorch</td>
|
||||
@@ -308,52 +321,60 @@ The following table shows the absolute accuracy drop that is calculated as the d
|
||||
<td>0.25</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>resnet-50-<br>caffe</td>
|
||||
<td>resnet-50-<br>PYTORCH</td>
|
||||
<td>ImageNet</td>
|
||||
<td>acc@top-1</td>
|
||||
<td>0.16</td>
|
||||
<td>0.12</td>
|
||||
<td>0.12</td>
|
||||
<td>0.18</td>
|
||||
<td>0.19</td>
|
||||
<td>0.19</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>resnet-50-<br>pytorch</td>
|
||||
<td>resnet-50-<br>TF</td>
|
||||
<td>ImageNet</td>
|
||||
<td>acc@top-1</td>
|
||||
<td>0.20</td>
|
||||
<td>0.17</td>
|
||||
<td>0.17</td>
|
||||
<td>0.15</td>
|
||||
<td>0.15</td>
|
||||
<td>0.10</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>squeezenet1.1-<br>caffe</td>
|
||||
<td>squeezenet1.1-<br>CF</td>
|
||||
<td>ImageNet</td>
|
||||
<td>acc@top-1</td>
|
||||
<td>0.66</td>
|
||||
<td>0.64</td>
|
||||
<td>0.66</td>
|
||||
<td>0.64</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ssd_mobilenet_<br>v1_coco-tf</td>
|
||||
<td>MS COCO</td>
|
||||
<td>VOC2012</td>
|
||||
<td>COCO mAp</td>
|
||||
<td>0.24</td>
|
||||
<td>3.07</td>
|
||||
<td>0.24</td>
|
||||
<td>3.07</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ssd300-caffe</td>
|
||||
<td>ssd300-CF</td>
|
||||
<td>MS COCO</td>
|
||||
<td>COCO mAp</td>
|
||||
<td>0.06</td>
|
||||
<td>0.05</td>
|
||||
<td>0.06</td>
|
||||
<td>0.05</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ssdlite_<br>mobilenet_<br>v2-tf</td>
|
||||
<td>ssdlite_<br>mobilenet_<br>v2-TF</td>
|
||||
<td>MS COCO</td>
|
||||
<td>COCO mAp</td>
|
||||
<td>0.14</td>
|
||||
<td>0.14</td>
|
||||
<td>0.47</td>
|
||||
<td>0.47</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>yolo_v3-TF</td>
|
||||
<td>MS COCO</td>
|
||||
<td>COCO mAp</td>
|
||||
<td>0.20</td>
|
||||
<td>0.20</td>
|
||||
<td>0.36</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
94
docs/doxygen/doxy_md_filter.py
Normal file
94
docs/doxygen/doxy_md_filter.py
Normal file
@@ -0,0 +1,94 @@
|
||||
import os
|
||||
import re
|
||||
import glob
|
||||
import argparse
|
||||
|
||||
|
||||
def get_label(file):
|
||||
"""
|
||||
Read lines of a file and try to find a doxygen label.
|
||||
If the label is not found return None.
|
||||
"""
|
||||
for line in file:
|
||||
label = re.search(r'\{\#(.+)\}', line)
|
||||
if label:
|
||||
return label.group(1)
|
||||
return
|
||||
|
||||
|
||||
def replace_links(content, items, folder, labels, docs_folder):
|
||||
"""
|
||||
Replace markdown links with doxygen labels.
|
||||
"""
|
||||
for item in items:
|
||||
link = item[0]
|
||||
ext = item[1]
|
||||
link_path = os.path.abspath(os.path.join(folder, link))
|
||||
if os.path.exists(link_path):
|
||||
if ext == 'md':
|
||||
if link_path in labels:
|
||||
label = labels.get(link_path)
|
||||
else:
|
||||
with open(link_path, 'r', encoding='utf-8') as file:
|
||||
lines = []
|
||||
i = 0
|
||||
while i < 5:
|
||||
try:
|
||||
lines.append(next(file))
|
||||
except StopIteration:
|
||||
break
|
||||
i += 1
|
||||
label = get_label(lines)
|
||||
labels[link_path] = label
|
||||
if label:
|
||||
content = content.replace(link, '@ref ' + label)
|
||||
else:
|
||||
rel_path = os.path.relpath(link_path, docs_folder).replace('\\', '/')
|
||||
content = content.replace(link, rel_path)
|
||||
return content
|
||||
|
||||
|
||||
def process_github_md_links(content, items):
|
||||
"""
|
||||
This is a workaround to support github markdown links in doxygen 1.8.12.
|
||||
"""
|
||||
for item in items:
|
||||
orig = item[0]
|
||||
link_name = item[1]
|
||||
link_url = item[2]
|
||||
html_link = '<a href="{}">{}</a>'.format(link_url, link_name)
|
||||
content = content.replace(orig, html_link)
|
||||
return content
|
||||
|
||||
|
||||
def process(docs_folder):
|
||||
"""
|
||||
Recursively find markdown files in docs_folder and
|
||||
replace links to markdown files with doxygen labels (ex. @ref label_name).
|
||||
"""
|
||||
labels = dict() # store labels in dictionary
|
||||
md_files = glob.glob(os.path.join(docs_folder, '**/*.md'), recursive=True)
|
||||
for md_file in md_files:
|
||||
md_folder = os.path.dirname(md_file)
|
||||
with open(md_file, 'r', encoding='utf-8') as f:
|
||||
content = f.read()
|
||||
inline_links = set(re.findall(r'!?\[.*?\]\(([\w\/\-\.]+\.(md|png|jpg|gif))\)', content, flags=re.IGNORECASE))
|
||||
github_md_links = set(re.findall(r'(\[(.+?)\]\((https:[\w\.\/-]+?\.md)\))', content, flags=re.IGNORECASE))
|
||||
reference_links = set(re.findall(r'\[.+\]\:\s*?([\w\/\-\.]+\.(md|png|jpg|gif))', content, flags=re.IGNORECASE))
|
||||
content = replace_links(content, inline_links, md_folder, labels, docs_folder)
|
||||
content = replace_links(content, reference_links, md_folder, labels, docs_folder)
|
||||
content = process_github_md_links(content, github_md_links)
|
||||
if inline_links or reference_links or github_md_links:
|
||||
with open(md_file, 'w', encoding='utf-8') as f:
|
||||
f.write(content)
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('docs', type=str, help='Path to a folder containing .md files.')
|
||||
args = parser.parse_args()
|
||||
process(args.docs)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
25
docs/doxygen/ie_c_api.config
Normal file
25
docs/doxygen/ie_c_api.config
Normal file
@@ -0,0 +1,25 @@
|
||||
@INCLUDE = @IE_CONFIG_BINARY@
|
||||
|
||||
EXCLUDE_SYMBOLS = INFERENCE_ENGINE_C_API_EXTERN \
|
||||
INFERENCE_ENGINE_C_API \
|
||||
IE_NODISCARD
|
||||
|
||||
PREDEFINED = "__attribute__(x)=" \
|
||||
"__VA_ARGS__=" \
|
||||
"INFERENCE_ENGINE_C_API_EXTERN=" \
|
||||
"INFERENCE_ENGINE_C_API=" \
|
||||
"IE_NODISCARD=" \
|
||||
"__cdecl=" \
|
||||
"__declspec(x)=" \
|
||||
"__GNUC__=" \
|
||||
"_WIN32"
|
||||
|
||||
FILE_PATTERNS = *.h
|
||||
|
||||
LAYOUT_FILE = "@C_LAYOUT_BINARY@"
|
||||
|
||||
INPUT = "@C_API@"
|
||||
|
||||
HTML_OUTPUT = ie_c_api
|
||||
|
||||
GENERATE_TAGFILE = "@DOCS_BINARY_DIR@/ie_c_api.tag"
|
||||
@@ -29,6 +29,8 @@
|
||||
</tab>
|
||||
<tab type="user" title="Inference Engine С++ API Reference" url="../annotated.html"/>
|
||||
<tab type="user" title="Inference Engine Python API Reference" url="../ie_python_api/annotated.html"/>
|
||||
<!-- DL Streamer -->
|
||||
<tab type="user" title="DL Streamer API Reference" url="https://openvinotoolkit.github.io/dlstreamer_gst/"/>
|
||||
</tab>
|
||||
<!-- Chinese docs -->
|
||||
<tab type="user" title="中文文件" url="https://docs.openvinotoolkit.org/cn/index.html"/>
|
||||
|
||||
2596
docs/doxygen/ie_docs.config
Normal file
2596
docs/doxygen/ie_docs.config
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
52
docs/doxygen/ie_plugin_api.config
Normal file
52
docs/doxygen/ie_plugin_api.config
Normal file
@@ -0,0 +1,52 @@
|
||||
@INCLUDE = @IE_CONFIG_BINARY@
|
||||
|
||||
LAYOUT_FILE = "@PLUGIN_LAYOUT_BINARY@"
|
||||
|
||||
HTML_OUTPUT = ie_plugin_api
|
||||
|
||||
GENERATE_TAGFILE = "@DOCS_BINARY_DIR@/ie_plugin_api.tag"
|
||||
|
||||
EXTRACT_LOCAL_CLASSES = NO
|
||||
|
||||
INPUT = "@DOCS_BINARY_DIR@/docs/IE_PLUGIN_DG" \
|
||||
"@IE_SOURCE_DIR@/src/plugin_api"
|
||||
|
||||
FILE_PATTERNS = *.c \
|
||||
*.cpp \
|
||||
*.c++ \
|
||||
*.h \
|
||||
*.hpp \
|
||||
*.md
|
||||
|
||||
EXCLUDE_PATTERNS = cnn_network_ngraph_impl.hpp \
|
||||
ie_imemory_state_internal.hpp \
|
||||
ie_memory_state_internal.hpp \
|
||||
ie_memory_state_base.hpp \
|
||||
convert_function_to_cnn_network.hpp \
|
||||
generic_ie.hpp
|
||||
|
||||
EXCLUDE_SYMBOLS =
|
||||
|
||||
EXAMPLE_PATH = "@CMAKE_CURRENT_SOURCE_DIR@/template_plugin/src" \
|
||||
"@CMAKE_CURRENT_SOURCE_DIR@/template_plugin/include" \
|
||||
"@CMAKE_CURRENT_SOURCE_DIR@/template_plugin/src/CMakeLists.txt" \
|
||||
"@CMAKE_CURRENT_SOURCE_DIR@/template_plugin/tests/functional/"
|
||||
CMakeLists.txt \
|
||||
"@CMAKE_CURRENT_SOURCE_DIR@/examples"
|
||||
|
||||
EXAMPLE_PATTERNS = *.cpp \
|
||||
*.hpp
|
||||
|
||||
ENUM_VALUES_PER_LINE = 1
|
||||
|
||||
EXPAND_ONLY_PREDEF = YES
|
||||
|
||||
PREDEFINED = INFERENCE_ENGINE_API \
|
||||
INFERENCE_ENGINE_API_CPP \
|
||||
INFERENCE_ENGINE_API_CLASS \
|
||||
INFERENCE_ENGINE_DEPRECATED \
|
||||
IE_SUPPRESS_DEPRECATED_START \
|
||||
IE_SUPPRESS_DEPRECATED_END \
|
||||
IE_SUPPRESS_DEPRECATED_START_WIN \
|
||||
IE_SUPPRESS_DEPRECATED_END_WIN \
|
||||
IE_THREAD=IE_THREAD_TBB
|
||||
35
docs/doxygen/ie_py_api.config
Normal file
35
docs/doxygen/ie_py_api.config
Normal file
@@ -0,0 +1,35 @@
|
||||
@INCLUDE = @IE_CONFIG_BINARY@
|
||||
|
||||
EXCLUDE_SYMBOLS = ie_api::BlobBuffer \
|
||||
*impl* \
|
||||
*device_name* \
|
||||
*num_requests* \
|
||||
*exec_net* \
|
||||
*c_config* \
|
||||
*ie_core_impl* \
|
||||
*plugin_impl* \
|
||||
*extension_str* \
|
||||
*buffer* \
|
||||
*__cinit__*
|
||||
|
||||
PREDEFINED = "__attribute__(x)=" \
|
||||
"__VA_ARGS__=" \
|
||||
"INFERENCE_ENGINE_C_API_EXTERN=" \
|
||||
"INFERENCE_ENGINE_C_API=" \
|
||||
"IE_NODISCARD=" \
|
||||
"__cdecl=" \
|
||||
"__declspec(x)=" \
|
||||
"__GNUC__=" \
|
||||
"_WIN32"
|
||||
|
||||
EXTENSION_MAPPING = pyx=Python
|
||||
|
||||
FILE_PATTERNS = *.pyx
|
||||
|
||||
LAYOUT_FILE = "@PY_LAYOUT_BINARY@"
|
||||
|
||||
INPUT = "@PYTHON_API_OUT@"
|
||||
|
||||
HTML_OUTPUT = ie_python_api
|
||||
|
||||
GENERATE_TAGFILE = "@DOCS_BINARY_DIR@/ie_python_api.tag"
|
||||
@@ -14,7 +14,7 @@
|
||||
<!-- OpenCV -->
|
||||
<tab type="user" title="OpenCV Developer Guide" url="https://docs.opencv.org/master/"/>
|
||||
<!-- IE C -->
|
||||
<tab type="usergroup" title="Inference Engine C API Reference" url="../ie_c_api/groups.html"/>
|
||||
<tab type="usergroup" title="Inference Engine C API Reference" url="../ie_c_api/modules.html"/>
|
||||
<!-- IE C++-->
|
||||
<tab type="user" title="Inference Engine С++ API Reference" url="../annotated.html"/>
|
||||
<!-- IE Python -->
|
||||
@@ -27,6 +27,8 @@
|
||||
<tab type="filelist" visible="no"/>
|
||||
<tab type="globals" visible="no"/>
|
||||
</tab>
|
||||
<!-- DL Streamer -->
|
||||
<tab type="user" title="DL Streamer API Reference" url="https://openvinotoolkit.github.io/dlstreamer_gst/"/>
|
||||
</tab>
|
||||
<!-- Chinese docs -->
|
||||
<tab type="user" title="中文文件" url="https://docs.openvinotoolkit.org/cn/index.html"/>
|
||||
|
||||
129
docs/doxygen/pyx_filter.py
Normal file
129
docs/doxygen/pyx_filter.py
Normal file
@@ -0,0 +1,129 @@
|
||||
import re
|
||||
import argparse
|
||||
|
||||
|
||||
def process_pyx(pyx_file):
|
||||
"""
|
||||
Convert .pyx file to a more readable format for doxygen.
|
||||
"""
|
||||
with open(pyx_file, 'r') as f:
|
||||
source = f.readlines()
|
||||
idx = 0
|
||||
while idx < len(source):
|
||||
line = source[idx]
|
||||
striped_line = line.lstrip()
|
||||
tabs = ' ' * (len(line) - len(striped_line)) # Keep indentation
|
||||
striped_line = striped_line.rstrip()
|
||||
if striped_line == '@property': # Python functions wrapped with @property decorator
|
||||
new_getter = convert_getter(source, idx)
|
||||
if new_getter:
|
||||
indent = tabs + ' ' * 4
|
||||
new_func, comments, shift = new_getter
|
||||
func_name = re.search(r'def\s+?([A-Za-z0-9_]+)\s*?\(', new_func).group(1)
|
||||
source[idx + 1] = tabs + new_func + '\n'
|
||||
for i in range(shift):
|
||||
source.pop(idx + 2)
|
||||
# This is a workaround to help Doxygen understand "@property" functions as class properties.
|
||||
for comm in comments:
|
||||
source.insert(idx + 2, '{indent}{comment}\n'.format(indent=indent, comment=comm))
|
||||
idx += 1
|
||||
source.insert(idx + 2, '{indent}self.{func_name} = {func_name}\n'.format(
|
||||
indent=indent,
|
||||
func_name=func_name
|
||||
))
|
||||
idx += 1
|
||||
if re.search(r'c?p?def.+\(', striped_line): # Convert cython functions to python format
|
||||
new_sign = get_signature(source, idx)
|
||||
if new_sign:
|
||||
new_func, shift = new_sign
|
||||
args = re.search(r'\((.+)\)', new_func)
|
||||
if args:
|
||||
new_func = new_func.replace(args.group(1), process_args(args.group(1))).replace('cpdef', 'def')
|
||||
source[idx] = tabs + new_func + '\n'
|
||||
for i in range(shift):
|
||||
source.pop(idx + 1)
|
||||
if '__cinit__' in striped_line: # Doxygen only interprets "__init__" constructors
|
||||
source[idx] = source[idx].replace('__cinit__', '__init__')
|
||||
idx += 1
|
||||
|
||||
with open(pyx_file, 'w') as f:
|
||||
f.writelines(source)
|
||||
|
||||
|
||||
def process_args(str_args):
|
||||
"""
|
||||
Convert function arguments to the doxygen readable format.
|
||||
"""
|
||||
args = re.sub(r'\[.*?\]', r'', str_args)
|
||||
args = re.sub(r'\(.*?\)', r'', args)
|
||||
args = args.split(',')
|
||||
for idx, arg in enumerate(args):
|
||||
arg = arg.replace('&', '').strip()
|
||||
if arg.startswith('const'):
|
||||
arg = arg.replace('const', '').strip()
|
||||
if ':' in arg:
|
||||
arg = arg.split(':')[0]
|
||||
match = re.match(r'^[\w\.]+\s+(\w.+)', arg)
|
||||
if match:
|
||||
arg = match.group(1)
|
||||
args[idx] = arg.strip()
|
||||
return ', '.join(args)
|
||||
|
||||
|
||||
def convert_getter(source, start):
|
||||
"""
|
||||
Process a function that is wrapped with @property decorator
|
||||
"""
|
||||
current = source[start + 1].strip()
|
||||
if not current.startswith('def'): # Base Case
|
||||
return
|
||||
new_sign = get_signature(source, start + 1)
|
||||
if new_sign:
|
||||
new_func, shift = new_sign
|
||||
new_func += ':'
|
||||
# get comments
|
||||
comments = []
|
||||
if start > 1:
|
||||
idx = start - 1
|
||||
while source[idx].lstrip().startswith('#') and idx >= 0:
|
||||
comments.append(source[idx].strip())
|
||||
idx -= 1
|
||||
comments.reverse()
|
||||
return new_func, comments, shift
|
||||
|
||||
|
||||
def get_signature(source, start):
|
||||
"""
|
||||
Get function signature and process it
|
||||
"""
|
||||
match = re.search(r'c?p?def.+\(', source[start].strip())
|
||||
if not match:
|
||||
return
|
||||
start_j = match.span()[1]
|
||||
open_brackets = 1
|
||||
new_sign = match.group()
|
||||
|
||||
for i in range(start, len(source)):
|
||||
line = source[i].strip()
|
||||
for j in range(start_j, len(line)):
|
||||
char = line[j]
|
||||
if char == ')':
|
||||
open_brackets -= 1
|
||||
if char == '(':
|
||||
open_brackets += 1
|
||||
new_sign += char
|
||||
if not open_brackets:
|
||||
return new_sign + ':\n', i - start
|
||||
start_j = 0
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('pyx_file', type=str, nargs='+', help='Path to a .pyx file.')
|
||||
args = parser.parse_args()
|
||||
for pyx in args.pyx_file:
|
||||
process_pyx(pyx)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <ngraph/pattern/op/wrap_type.hpp>
|
||||
|
||||
// ! [ngraph:include]
|
||||
#include <ngraph/ngraph.hpp>
|
||||
#include <ngraph/opsets/opset3.hpp>
|
||||
@@ -89,7 +91,7 @@ ngraph::graph_rewrite_callback callback = [](pattern::Matcher& m) {
|
||||
// ! [pattern:label_example]
|
||||
// Detect Multiply with arbitrary first input and second as Constant
|
||||
// ngraph::pattern::op::Label - represent arbitrary input
|
||||
auto input = std::make_shared<ngraph::pattern::op::Label>(ngraph::element::f32, ngraph::Shape{1});
|
||||
auto input = ngraph::pattern::any_input();
|
||||
auto value = ngraph::opset3::Constant::create(ngraph::element::f32, ngraph::Shape{1}, {0.5});
|
||||
auto mul = std::make_shared<ngraph::opset3::Multiply>(input, value);
|
||||
auto m = std::make_shared<ngraph::pattern::Matcher>(mul, "MultiplyMatcher");
|
||||
@@ -99,20 +101,17 @@ auto m = std::make_shared<ngraph::pattern::Matcher>(mul, "MultiplyMatcher");
|
||||
{
|
||||
// ! [pattern:concat_example]
|
||||
// Detect Concat operation with arbitrary number of inputs
|
||||
auto concat = std::make_shared<ngraph::pattern::op::Label>(ngraph::element::f32, ngraph::Shape{}, ngraph::pattern::has_class<ngraph::opset3::Concat>());
|
||||
auto concat = ngraph::pattern::wrap_type<ngraph::opset3::Concat>();
|
||||
auto m = std::make_shared<ngraph::pattern::Matcher>(concat, "ConcatMatcher");
|
||||
// ! [pattern:concat_example]
|
||||
}
|
||||
|
||||
{
|
||||
// ! [pattern:predicate_example]
|
||||
// Detect Multiply or Add operation
|
||||
auto lin_op = std::make_shared<ngraph::pattern::op::Label>(ngraph::element::f32, ngraph::Shape{},
|
||||
[](const std::shared_ptr<ngraph::Node> & node) -> bool {
|
||||
return std::dynamic_pointer_cast<ngraph::opset3::Multiply>(node) ||
|
||||
std::dynamic_pointer_cast<ngraph::opset3::Add>(node);
|
||||
});
|
||||
auto m = std::make_shared<ngraph::pattern::Matcher>(lin_op, "MultiplyOrAddMatcher");
|
||||
// Detect Multiply->Add sequence where mul has exactly one consumer
|
||||
auto mul = ngraph::pattern::wrap_type<ngraph::opset3::Multiply>(ngraph::pattern::consumers_count(1)/*сheck consumers count*/);
|
||||
auto add = ngraph::pattern::wrap_type<ngraph::opset3::Add>({mul, ngraph::pattern::any_input()});
|
||||
auto m = std::make_shared<ngraph::pattern::Matcher>(add, "MultiplyAddMatcher");
|
||||
// Matcher can be used to match pattern manually on given node
|
||||
if (m->match(node->output(0))) {
|
||||
// Successfully matched
|
||||
|
||||
@@ -15,13 +15,13 @@ The toolkit consists of three primary components:
|
||||
|
||||
In addition, demo scripts, code samples and demo applications are provided to help you get up and running with the toolkit:
|
||||
* **Demo Scripts** - Shell scripts that automatically perform the workflow steps to demonstrate running inference pipelines for different scenarios.
|
||||
* [**Code Samples**](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Samples_Overview.html) - Small console applications that show you how to:
|
||||
* **[Code Samples](../IE_DG/Samples_Overview.md)** - Small console applications that show you how to:
|
||||
* Utilize specific OpenVINO capabilities in an application
|
||||
* Perform specific tasks, such as loading a model, running inference, querying specific device capabilities, and more.
|
||||
* [**Demo Applications**](https://docs.openvinotoolkit.org/latest/_demos_README.html) - Console applications that provide robust application templates to help you implement specific deep learning scenarios. These applications involve increasingly complex processing pipelines that gather analysis data from several models that run inference simultaneously, such as detecting a person in a video stream along with detecting the person's physical attributes, such as age, gender, and emotional state.
|
||||
* **[Demo Applications](@ref omz_demos_README)** - Console applications that provide robust application templates to help you implement specific deep learning scenarios. These applications involve increasingly complex processing pipelines that gather analysis data from several models that run inference simultaneously, such as detecting a person in a video stream along with detecting the person's physical attributes, such as age, gender, and emotional state.
|
||||
|
||||
## <a name="openvino-installation"></a>Intel® Distribution of OpenVINO™ toolkit Installation and Deployment Tools Directory Structure
|
||||
This guide assumes you completed all Intel® Distribution of OpenVINO™ toolkit installation and configuration steps. If you have not yet installed and configured the toolkit, see [Install Intel® Distribution of OpenVINO™ toolkit for Linux*](https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_linux.html).
|
||||
This guide assumes you completed all Intel® Distribution of OpenVINO™ toolkit installation and configuration steps. If you have not yet installed and configured the toolkit, see [Install Intel® Distribution of OpenVINO™ toolkit for Linux*](../install_guides/installing-openvino-linux.md).
|
||||
|
||||
By default, the installation directory is `/opt/intel/openvino`, but the installation gave you the option to use the directory of your choice. If you installed the Intel® Distribution of OpenVINO™ toolkit to a directory other than the default, replace `/opt/intel` with the directory in which you installed the software.
|
||||
|
||||
@@ -70,7 +70,9 @@ The demo scripts can run inference on any [supported target device](https://soft
|
||||
./<script_name> -d [CPU, GPU, MYRIAD, HDDL]
|
||||
```
|
||||
|
||||
Before running the demo applications on Intel® Processor Graphics or on an Intel® Neural Compute Stick 2 device, you must complete the [Steps for Intel® Processor Graphics (GPU)](https://docs.openvinotoolkit.org/2020.1/_docs_install_guides_installing_openvino_linux.html#additional-GPU-steps) or [Steps for Intel® Neural Compute Stick 2](https://docs.openvinotoolkit.org/2020.1/_docs_install_guides_installing_openvino_linux.html#additional-NCS-steps).
|
||||
Before running the demo applications on Intel® Processor Graphics or on an Intel® Neural Compute Stick 2 device, you must complete the additional configuration steps. For details, see:
|
||||
* Steps for Intel® Processor Graphics (GPU) section in the [installation instructions](../install_guides/installing-openvino-linux.md)
|
||||
* Steps for Intel® Neural Compute Stick 2 section in the [installation instructions](../install_guides/installing-openvino-linux.md).
|
||||
|
||||
The following paragraphs describe each demo script.
|
||||
|
||||
@@ -149,7 +151,7 @@ To run the script performing inference on Intel® Processor Graphics:
|
||||
|
||||
When the verification script completes, you see an image that displays the resulting frame with detections rendered as bounding boxes, and text:
|
||||
|
||||

|
||||

|
||||
|
||||
</details>
|
||||
|
||||
@@ -187,21 +189,21 @@ You will perform the following steps:
|
||||
|
||||
Each demo and code sample is a separate application, but they use the same behavior and components. The code samples and demo applications are:
|
||||
|
||||
* [Code Samples](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Samples_Overview.html) - Small console applications that show how to utilize specific OpenVINO capabilities within an application and execute specific tasks such as loading a model, running inference, querying specific device capabilities, and more.
|
||||
* [Code Samples](../IE_DG/Samples_Overview.html) - Small console applications that show how to utilize specific OpenVINO capabilities within an application and execute specific tasks such as loading a model, running inference, querying specific device capabilities, and more.
|
||||
|
||||
* [Demo Applications](https://docs.openvinotoolkit.org/latest/_demos_README.html) - Console applications that provide robust application templates to support developers in implementing specific deep learning scenarios. They may also involve more complex processing pipelines that gather analysis from several models that run inference simultaneously. For example concurrently detecting a person in a video stream and detecting attributes such as age, gender and/or emotions.
|
||||
* [Demo Applications](@ref omz_demos_README) - Console applications that provide robust application templates to support developers in implementing specific deep learning scenarios. They may also involve more complex processing pipelines that gather analysis from several models that run inference simultaneously. For example concurrently detecting a person in a video stream and detecting attributes such as age, gender and/or emotions.
|
||||
|
||||
Inputs you'll need to specify:
|
||||
- **A compiled OpenVINO™ code sample or demo application** that runs inferencing against a model that has been run through the Model Optimizer, resuiting in an IR, using the other inputs you provide.
|
||||
- **One or more models** in the Intermediate Representation format. Each model is trained for a specific task. Examples include pedestrian detection, face detection, vehicle detection, license plate recognition, head pose, and others. Different models are used for different applications. Models can be chained together to provide multiple features; for example vehicle + make/model + license plate recognition.
|
||||
- **One or more media files**. The media is typically a video file, but can be a still photo.
|
||||
- **One or more target device** on which you run inference. The target device can be the CPU, GPU, FPGA, or VPU accelerator.
|
||||
- **One or more target device** on which you run inference. The target device can be the CPU, GPU, or VPU accelerator.
|
||||
|
||||
### Build the Code Samples and Demo Applications
|
||||
|
||||
To perform sample inference, run the Image Classification code sample and Security Barrier Camera demo application that were automatically compiled when you ran the Image Classification and Inference Pipeline demo scripts. The binary files are in the `~/inference_engine_cpp_samples_build/intel64/Release` and `~/inference_engine_demos_build/intel64/Release` directories, respectively.
|
||||
|
||||
To run other sample code or demo applications, build them from the source files delivered as part of the OpenVINO toolkit. To learn how to build these, see the [Inference Engine Code Samples Overview](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Samples_Overview.html#build_samples_linux) and the [Demo Applications Overview](https://docs.openvinotoolkit.org/latest/_demos_README.html#build_the_demo_applications) sections.
|
||||
To run other sample code or demo applications, build them from the source files delivered as part of the OpenVINO toolkit. To learn how to build these, see the [Inference Engine Code Samples Overview](../IE_DG/Samples_Overview.md) and [Demo Applications Overview](@ref omz_demos_README) sections.
|
||||
|
||||
### <a name="download-models"></a> Step 1: Download the Models
|
||||
|
||||
@@ -211,7 +213,7 @@ You must have a model that is specific for you inference task. Example model typ
|
||||
- Custom (Often based on SSD)
|
||||
|
||||
Options to find a model suitable for the OpenVINO™ toolkit are:
|
||||
- Download public and Intel's pre-trained models from the [Open Model Zoo](https://github.com/opencv/open_model_zoo) using [Model Downloader tool](https://docs.openvinotoolkit.org/latest/_tools_downloader_README.html#model_downloader_usage).
|
||||
- Download public and Intel's pre-trained models from the [Open Model Zoo](https://github.com/opencv/open_model_zoo) using [Model Downloader tool](@ref omz_tools_downloader_README).
|
||||
- Download from GitHub*, Caffe* Zoo, TensorFlow* Zoo, etc.
|
||||
- Train your own model.
|
||||
|
||||
@@ -362,7 +364,7 @@ As an alternative, the Intel® Distribution of OpenVINO™ toolkit includes two
|
||||
|
||||
### <a name="run-image-classification"></a>Step 4: Run the Image Classification Code Sample
|
||||
|
||||
> **NOTE**: The Image Classification code sample is automatically compiled when you ran the Image Classification demo script. If you want to compile it manually, see the [Inference Engine Code Samples Overview](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Samples_Overview.html#build_samples_linux) section.
|
||||
> **NOTE**: The Image Classification code sample is automatically compiled when you ran the Image Classification demo script. If you want to compile it manually, see the [Inference Engine Code Samples Overview](../IE_DG/Samples_Overview.html#build_samples_linux) section.
|
||||
|
||||
To run the **Image Classification** code sample with an input image on the IR:
|
||||
|
||||
@@ -390,20 +392,24 @@ The following commands run the Image Classification Code Sample using the `car.p
|
||||
|
||||
**GPU:**
|
||||
|
||||
> **NOTE**: Running inference on Intel® Processor Graphics (GPU) requires
|
||||
[additional hardware configuration steps](https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_linux.html#additional-GPU-steps).
|
||||
> **NOTE**: Running inference on Intel® Processor Graphics (GPU) requires additional hardware configuration steps. For details, see the Steps for Intel® Processor Graphics (GPU) section in the [installation instructions](../install_guides/installing-openvino-linux.md).
|
||||
```sh
|
||||
./classification_sample_async -i /opt/intel/openvino/deployment_tools/demo/car.png -m ~/models/public/squeezenet1.1/ir/squeezenet1.1.xml -d GPU
|
||||
```
|
||||
|
||||
**MYRIAD:**
|
||||
|
||||
> **NOTE**: Running inference on VPU devices (Intel® Movidius™ Neural Compute
|
||||
Stick or Intel® Neural Compute Stick 2) with the MYRIAD plugin requires
|
||||
[additional hardware configuration steps](inference-engine/README.md#optional-additional-installation-steps-for-the-intel-movidius-neural-compute-stick-and-neural-compute-stick-2).
|
||||
> **NOTE**: Running inference on VPU devices (Intel® Neural Compute Stick 2) with the MYRIAD plugin requires additional hardware configuration steps. For details, see the Steps for Intel® Neural Compute Stick 2 section in the [installation instructions](../install_guides/installing-openvino-linux.md).
|
||||
```sh
|
||||
./classification_sample_async -i /opt/intel/openvino/deployment_tools/demo/car.png -m ~/models/public/squeezenet1.1/ir/squeezenet1.1.xml -d MYRIAD
|
||||
```
|
||||
|
||||
**HDDL:**
|
||||
|
||||
> **NOTE**: Running inference on the Intel® Vision Accelerator Design with Intel® Movidius™ VPUs device with the HDDL plugin requires additional hardware configuration steps. For details, see the Steps for Intel® Vision Accelerator Design with Intel® Movidius™ VPUs section in the [installation instructions](../install_guides/installing-openvino-linux.md).
|
||||
```sh
|
||||
./classification_sample_async -i /opt/intel/openvino/deployment_tools/demo/car.png -m ~/models/public/squeezenet1.1/ir/squeezenet1.1.xml -d HDDL
|
||||
```
|
||||
|
||||
When the Sample Application completes, you see the label and confidence for the top-10 categories on the display. Below is a sample output with inference results on CPU:
|
||||
```sh
|
||||
@@ -437,7 +443,7 @@ Throughput: 375.3339402 FPS
|
||||
|
||||
### <a name="run-security-barrier"></a>Step 5: Run the Security Barrier Camera Demo Application
|
||||
|
||||
> **NOTE**: The Security Barrier Camera Demo Application is automatically compiled when you ran the Inference Pipeline demo scripts. If you want to build it manually, see the [Demo Applications Overview](https://docs.openvinotoolkit.org/latest/_demos_README.html#build_the_demo_applications) section.
|
||||
> **NOTE**: The Security Barrier Camera Demo Application is automatically compiled when you ran the Inference Pipeline demo scripts. If you want to build it manually, see the [Demo Applications Overview](@ref omz_demos_README) section.
|
||||
|
||||
To run the **Security Barrier Camera Demo Application** using an input image on the prepared IRs:
|
||||
|
||||
@@ -465,20 +471,25 @@ To run the **Security Barrier Camera Demo Application** using an input image on
|
||||
|
||||
**GPU:**
|
||||
|
||||
> **NOTE**: Running inference on Intel® Processor Graphics (GPU) requires [additional hardware configuration steps](https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_linux.html#additional-GPU-steps).
|
||||
> **NOTE**: Running inference on Intel® Processor Graphics (GPU) requires additional hardware configuration steps. For details, see the Steps for Intel® Processor Graphics (GPU) section in the [installation instructions](../install_guides/installing-openvino-linux.md).
|
||||
```sh
|
||||
./security_barrier_camera_demo -i /opt/intel/openvino/deployment_tools/demo/car_1.bmp -m <path_to_model>/vehicle-license-plate-detection-barrier-0106.xml -m_va <path_to_model>/vehicle-attributes-recognition-barrier-0039.xml -m_lpr <path_to_model>/license-plate-recognition-barrier-0001.xml -d GPU
|
||||
```
|
||||
|
||||
**MYRIAD:**
|
||||
|
||||
> **NOTE**: Running inference on VPU devices (Intel® Movidius™ Neural Compute
|
||||
Stick or Intel® Neural Compute Stick 2) with the MYRIAD plugin requires
|
||||
[additional hardware configuration steps](https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_linux.html#additional-NCS-steps).
|
||||
> **NOTE**: Running inference on the Intel® Neural Compute Stick 2 device with the MYRIAD plugin requires additional hardware configuration steps. For details, see the Steps for Intel® Neural Compute Stick 2 section in the [installation instructions](../install_guides/installing-openvino-linux.md).
|
||||
```sh
|
||||
./classification_sample_async -i <DLDT_DIR>/inference-engine/samples/sample_data/car.png -m <ir_dir>/squeezenet1.1.xml -d MYRIAD
|
||||
```
|
||||
|
||||
**HDDL:**
|
||||
|
||||
> **NOTE**: Running inference on the Intel® Vision Accelerator Design with Intel® Movidius™ VPUs device with the HDDL plugin requires additional hardware configuration steps. For details, see the Steps for Intel® Vision Accelerator Design with Intel® Movidius™ VPUs section in the [installation instructions](../install_guides/installing-openvino-linux.md).
|
||||
```sh
|
||||
./classification_sample_async -i <DLDT_DIR>/inference-engine/samples/sample_data/car.png -m <ir_dir>/squeezenet1.1.xml -d HDDL
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## <a name="basic-guidelines-sample-application"></a>Basic Guidelines for Using Code Samples and Demo Applications
|
||||
@@ -548,9 +559,9 @@ You can see all the sample application’s parameters by adding the `-h` or `--h
|
||||
Use these resources to learn more about the OpenVINO™ toolkit:
|
||||
|
||||
* [OpenVINO™ Release Notes](https://software.intel.com/en-us/articles/OpenVINO-RelNotes)
|
||||
* [Introduction to Intel® Deep Learning Deployment Toolkit](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Introduction.html)
|
||||
* [Inference Engine Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Deep_Learning_Inference_Engine_DevGuide.html)
|
||||
* [Model Optimizer Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html)
|
||||
* [Inference Engine Samples Overview](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Samples_Overview.html)
|
||||
* [Introduction to Intel® Deep Learning Deployment Toolkit](../IE_DG/Introduction.md)
|
||||
* [Inference Engine Developer Guide](../IE_DG/Deep_Learning_Inference_Engine_DevGuide.md)
|
||||
* [Model Optimizer Developer Guide](../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md)
|
||||
* [Inference Engine Samples Overview](../IE_DG/Samples_Overview.md)
|
||||
* [Overview of OpenVINO™ Toolkit Pre-Trained Models](https://software.intel.com/en-us/openvino-toolkit/documentation/pretrained-models)
|
||||
* [OpenVINO™ Hello World Face Detection Exercise](https://github.com/intel-iot-devkit/inference-tutorials-generic)
|
||||
|
||||
530
docs/get_started/get_started_macos.md
Normal file
530
docs/get_started/get_started_macos.md
Normal file
@@ -0,0 +1,530 @@
|
||||
# Get Started with OpenVINO™ Toolkit on macOS* {#openvino_docs_get_started_get_started_macos}
|
||||
|
||||
The OpenVINO™ toolkit optimizes and runs Deep Learning Neural Network models on Intel® hardware. This guide helps you get started with the OpenVINO™ toolkit you installed on macOS*.
|
||||
|
||||
In this guide, you will:
|
||||
* Learn the OpenVINO™ inference workflow
|
||||
* Run demo scripts that illustrate the workflow and perform the steps for you
|
||||
* Run the workflow steps yourself, using detailed instructions with a code sample and demo application
|
||||
|
||||
## <a name="openvino-components"></a>OpenVINO™ toolkit Components
|
||||
The toolkit consists of three primary components:
|
||||
* **Model Optimizer:** Optimizes models for Intel® architecture, converting models into a format compatible with the Inference Engine. This format is called an Intermediate Representation (IR).
|
||||
* **Intermediate Representation:** The Model Optimizer output. A model converted to a format that has been optimized for Intel® architecture and is usable by the Inference Engine.
|
||||
* **Inference Engine:** The software libraries that run inference against the IR (optimized model) to produce inference results.
|
||||
|
||||
In addition, demo scripts, code samples and demo applications are provided to help you get up and running with the toolkit:
|
||||
* **Demo Scripts** - Batch scripts that automatically perform the workflow steps to demonstrate running inference pipelines for different scenarios.
|
||||
* **[Code Samples](../IE_DG/Samples_Overview.md)** - Small console applications that show you how to:
|
||||
* Utilize specific OpenVINO capabilities in an application.
|
||||
* Perform specific tasks, such as loading a model, running inference, querying specific device capabilities, and more.
|
||||
* **[Demo Applications](@ref omz_demos_README)** - Console applications that provide robust application templates to help you implement specific deep learning scenarios. These applications involve increasingly complex processing pipelines that gather analysis data from several models that run inference simultaneously, such as detecting a person in a video stream along with detecting the person's physical attributes, such as age, gender, and emotional state.
|
||||
|
||||
## <a name="openvino-installation"></a>Intel® Distribution of OpenVINO™ toolkit Installation and Deployment Tools Directory Structure
|
||||
This guide assumes you completed all Intel® Distribution of OpenVINO™ toolkit installation and configuration steps. If you have not yet installed and configured the toolkit, see [Install Intel® Distribution of OpenVINO™ toolkit for macOS*](../install_guides/installing-openvino-macos.md).
|
||||
|
||||
By default, the Intel® Distribution of OpenVINO™ is installed to the following directory, referred to as `<INSTALL_DIR>`:
|
||||
* For root or administrator: `/opt/intel/openvino/`
|
||||
* For regular users: `/home/<USER>/intel/openvino/`
|
||||
|
||||
If you installed the Intel® Distribution of OpenVINO™ toolkit to a directory other than the default, replace `/opt/intel` or `/home/<USER>/` with the directory in which you installed the software.
|
||||
|
||||
The primary tools for deploying your models and applications are installed to the `<INSTALL_DIR>/deployment_tools` directory.
|
||||
<details>
|
||||
<summary><strong>Click for the Intel® Distribution of OpenVINO™ toolkit directory structure</strong></summary>
|
||||
|
||||
|
||||
| Directory | Description |
|
||||
|:----------------------------------------|:--------------------------------------------------------------------------------------|
|
||||
| `demo/` | Demo scripts. Demonstrate pipelines for inference scenarios, automatically perform steps and print detailed output to the console. For more information, see the [Use OpenVINO: Demo Scripts](#use-openvino-demo-scripts) section.|
|
||||
| `inference_engine/` | Inference Engine directory. Contains Inference Engine API binaries and source files, samples and extensions source files, and resources like hardware drivers.|
|
||||
| `external/` | Third-party dependencies and drivers.|
|
||||
| `include/` | Inference Engine header files. For API documentation, see the [Inference Engine API Reference](./annotated.html). |
|
||||
| `lib/` | Inference Engine static libraries.|
|
||||
| `samples/` | Inference Engine samples. Contains source code for C++ and Python* samples and build scripts. See the [Inference Engine Samples Overview](../IE_DG/Samples_Overview.md). |
|
||||
| `share/` | CMake configuration files for linking with Inference Engine.|
|
||||
| `~intel_models/` | Symbolic link to the `intel_models` subfolder of the `open_model_zoo` folder.|
|
||||
| `model_optimizer/` | Model Optimizer directory. Contains configuration scripts, scripts to run the Model Optimizer and other files. See the [Model Optimizer Developer Guide](../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md).|
|
||||
| `ngraph/` | nGraph directory. Includes the nGraph header and library files. |
|
||||
| `open_model_zoo/` | Open Model Zoo directory. Includes the Model Downloader tool to download [pre-trained OpenVINO](@ref omz_models_intel_index) and public models, OpenVINO models documentation, demo applications and the Accuracy Checker tool to evaluate model accuracy.|
|
||||
| `demos/` | Demo applications for inference scenarios. Also includes documentation and build scripts.|
|
||||
| `intel_models/` | Pre-trained OpenVINO models and associated documentation. See the [Overview of OpenVINO™ Toolkit Pre-Trained Models](@ref omz_models_intel_index).|
|
||||
| `models` | Intel's trained and public models that can be obtained with Model Downloader.|
|
||||
| `tools/` | Model Downloader and Accuracy Checker tools. |
|
||||
| `tools/` | Contains a symbolic link to the Model Downloader folder and auxiliary tools to work with your models: Calibration tool, Benchmark and Collect Statistics tools.|
|
||||
|
||||
</details>
|
||||
|
||||
## <a name="workflow-overview"></a>OpenVINO™ Workflow Overview
|
||||
|
||||
The simplified OpenVINO™ workflow is:
|
||||
1. **Get a trained model** for your inference task. Example inference tasks: pedestrian detection, face detection, vehicle detection, license plate recognition, head pose.
|
||||
2. **Run the trained model through the Model Optimizer** to convert the model to an IR, which consists of a pair of `.xml` and `.bin` files that are used as the input for Inference Engine.
|
||||
3. **Use the Inference Engine API in the application** to run inference against the IR (optimized model) and output inference results. The application can be an OpenVINO™ sample, demo, or your own application.
|
||||
|
||||
## Use the Demo Scripts to Learn the Workflow
|
||||
|
||||
The demo scripts in `<INSTALL_DIR>/deployment_tools/demo` give you a starting point to learn the OpenVINO workflow. These scripts automatically perform the workflow steps to demonstrate running inference pipelines for different scenarios. The demo steps let you see how to:
|
||||
* Compile several samples from the source files delivered as part of the OpenVINO toolkit
|
||||
* Download trained models
|
||||
* Perform pipeline steps and see the output on the console
|
||||
|
||||
> **NOTE**: You must have Internet access to run the demo scripts. If your Internet access is through a proxy server, make sure the operating system environment proxy information is configured.
|
||||
|
||||
The demo scripts can run inference on any [supported target device](https://software.intel.com/en-us/openvino-toolkit/hardware). Although the default inference device is CPU, you can use the `-d` parameter to change the inference device. The general command to run the scripts looks as follows:
|
||||
|
||||
```sh
|
||||
./<script_name> -d [CPU, MYRIAD]
|
||||
```
|
||||
|
||||
Before running the demo applications on Intel® Neural Compute Stick 2 device, you must complete additional configuration steps. For details, see the Steps for Intel® Neural Compute Stick 2 section in the [installation instructions](../install_guides/installing-openvino-macos.md).
|
||||
|
||||
The following paragraphs describe each demo script.
|
||||
|
||||
### Image Classification Demo Script
|
||||
The `demo_squeezenet_download_convert_run` script illustrates the image classification pipeline.
|
||||
|
||||
The script:
|
||||
1. Downloads a SqueezeNet model.
|
||||
2. Runs the Model Optimizer to convert the model to the IR.
|
||||
3. Builds the Image Classification Sample Async application.
|
||||
4. Runs the compiled sample with the `car.png` image located in the `demo` directory.
|
||||
|
||||
<details>
|
||||
<summary><strong>Click for an example of running the Image Classification demo script</strong></summary>
|
||||
|
||||
To run the script to perform inference on a CPU:
|
||||
|
||||
```sh
|
||||
./demo_squeezenet_download_convert_run.sh
|
||||
```
|
||||
|
||||
When the script completes, you see the label and confidence for the top-10 categories:
|
||||
|
||||
```sh
|
||||
|
||||
Top 10 results:
|
||||
|
||||
Image /opt/intel/openvino/deployment_tools/demo/car.png
|
||||
|
||||
classid probability label
|
||||
------- ----------- -----
|
||||
817 0.6853030 sports car, sport car
|
||||
479 0.1835197 car wheel
|
||||
511 0.0917197 convertible
|
||||
436 0.0200694 beach wagon, station wagon, wagon, estate car, beach waggon, station waggon, waggon
|
||||
751 0.0069604 racer, race car, racing car
|
||||
656 0.0044177 minivan
|
||||
717 0.0024739 pickup, pickup truck
|
||||
581 0.0017788 grille, radiator grille
|
||||
468 0.0013083 cab, hack, taxi, taxicab
|
||||
661 0.0007443 Model T
|
||||
|
||||
[ INFO ] Execution successful
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Inference Pipeline Demo Script
|
||||
The `demo_security_barrier_camera` uses vehicle recognition in which vehicle attributes build on each other to narrow in on a specific attribute.
|
||||
|
||||
The script:
|
||||
1. Downloads three pre-trained model IRs.
|
||||
2. Builds the Security Barrier Camera Demo application.
|
||||
3. Runs the application with the downloaded models and the `car_1.bmp` image from the `demo` directory to show an inference pipeline.
|
||||
|
||||
This application:
|
||||
|
||||
1. Identifies an object identified as a vehicle.
|
||||
2. Uses the vehicle identification as input to the second model, which identifies specific vehicle attributes, including the license plate.
|
||||
3. Uses the the license plate as input to the third model, which recognizes specific characters in the license plate.
|
||||
|
||||
<details>
|
||||
<summary><strong>Click for an example of Running the Pipeline demo script</strong></summary>
|
||||
|
||||
To run the script performing inference on a CPU:
|
||||
|
||||
```sh
|
||||
./demo_security_barrier_camera.sh
|
||||
```
|
||||
|
||||
When the verification script completes, you see an image that displays the resulting frame with detections rendered as bounding boxes, and text:
|
||||
|
||||

|
||||
|
||||
</details>
|
||||
|
||||
### Benchmark Demo Script
|
||||
The `demo_benchmark_app` script illustrates how to use the Benchmark Application to estimate deep learning inference performance on supported devices.
|
||||
|
||||
The script:
|
||||
1. Downloads a SqueezeNet model.
|
||||
2. Runs the Model Optimizer to convert the model to the IR.
|
||||
3. Builds the Inference Engine Benchmark tool.
|
||||
4. Runs the tool with the `car.png` image located in the `demo` directory.
|
||||
|
||||
<details>
|
||||
<summary><strong>Click for an example of running the Benchmark demo script</strong></summary>
|
||||
|
||||
To run the script that performs inference on a CPU:
|
||||
|
||||
```sh
|
||||
./demo_squeezenet_download_convert_run.sh
|
||||
```
|
||||
When the verification script completes, you see the performance counters, resulting latency, and throughput values displayed on the screen.
|
||||
</details>
|
||||
|
||||
## <a name="using-sample-application"></a>Use Code Samples and Demo Applications to Learn the Workflow
|
||||
|
||||
This section guides you through a simplified workflow for the Intel® Distribution of OpenVINO™ toolkit using code samples and demo applications.
|
||||
|
||||
You will perform the following steps:
|
||||
|
||||
1. <a href="#download-models">Use the Model Downloader to download suitable models.</a>
|
||||
2. <a href="#convert-models-to-intermediate-representation">Convert the models with the Model Optimizer.</a>
|
||||
3. <a href="#download-media">Download media files to run inference on.</a>
|
||||
4. <a href="#run-image-classification">Run inference on the Image Classification Code Sample and see the results.</a>
|
||||
5. <a href="#run-security-barrier">Run inference on the Security Barrier Camera Demo application and see the results.</a>
|
||||
|
||||
Each demo and code sample is a separate application, but they use the same behavior and components.
|
||||
|
||||
Inputs you need to specify when using a code sample or demo application:
|
||||
- **A compiled OpenVINO™ code sample or demo application** that runs inferencing against a model that has been run through the Model Optimizer, resulting in an IR, using the other inputs you provide.
|
||||
- **One or more models** in the IR format. Each model is trained for a specific task. Examples include pedestrian detection, face detection, vehicle detection, license plate recognition, head pose, and others. Different models are used for different applications. Models can be chained together to provide multiple features; for example, vehicle + make/model + license plate recognition.
|
||||
- **One or more media files**. The media is typically a video file, but can be a still photo.
|
||||
- **One or more target device** on which you run inference. The target device can be the CPU, or VPU accelerator.
|
||||
|
||||
### Build the Code Samples and Demo Applications
|
||||
|
||||
To perform sample inference, run the Image Classification code sample and Security Barrier Camera demo application that are automatically compiled when you run the Image Classification and Inference Pipeline demo scripts. The binary files are in the `~/inference_engine_samples_build/intel64/Release` and `~/inference_engine_demos_build/intel64/Release` directories, respectively.
|
||||
|
||||
You can also build all available sample code and demo applications from the source files delivered with the OpenVINO toolkit. To learn how to do this, see the instructions in the [Inference Engine Code Samples Overview](../IE_DG/Samples_Overview.md) and [Demo Applications Overview](@ref omz_demos_README) sections.
|
||||
|
||||
### <a name="download-models"></a> Step 1: Download the Models
|
||||
|
||||
You must have a model that is specific for you inference task. Example model types are:
|
||||
- Classification (AlexNet, GoogleNet, SqueezeNet, others) - Detects one type of element in a frame.
|
||||
- Object Detection (SSD, YOLO) - Draws bounding boxes around multiple types of objects.
|
||||
- Custom (Often based on SSD)
|
||||
|
||||
Options to find a model suitable for the OpenVINO™ toolkit are:
|
||||
- Download public and Intel's pre-trained models from the [Open Model Zoo](https://github.com/opencv/open_model_zoo) using [Model Downloader tool](@ref omz_tools_downloader_README).
|
||||
- Download from GitHub*, Caffe* Zoo, TensorFlow* Zoo, and other resources.
|
||||
- Train your own model.
|
||||
|
||||
This guide uses the Model Downloader to get pre-trained models. You can use one of the following options to find a model:
|
||||
|
||||
* **List the models available in the downloader**:
|
||||
```sh
|
||||
cd /opt/intel/openvino/deployment_tools/tools/model_downloader/
|
||||
```
|
||||
```sh
|
||||
python3 info_dumper.py --print_all
|
||||
```
|
||||
|
||||
* **Use `grep` to list models that have a specific name pattern**:
|
||||
```sh
|
||||
python3 info_dumper.py --print_all | grep <model_name>
|
||||
```
|
||||
|
||||
Use the Model Downloader to download the models to a models directory. This guide uses `<models_dir>` as the models directory and `<models_name>` as the model name:
|
||||
```sh
|
||||
sudo python3 ./downloader.py --name <model_name> --output_dir <models_dir>
|
||||
```
|
||||
> **NOTE:** Always run the downloader with `sudo`.
|
||||
|
||||
Download the following models if you want to run the Image Classification Sample and Security Barrier Camera Demo application:
|
||||
|
||||
|Model Name | Code Sample or Demo App |
|
||||
|-----------------------------------------------|-----------------------------------------------------|
|
||||
|`squeezenet1.1` | Image Classification Sample |
|
||||
|`vehicle-license-plate-detection-barrier-0106` | Security Barrier Camera Demo application |
|
||||
|`vehicle-attributes-recognition-barrier-0039` | Security Barrier Camera Demo application |
|
||||
|`license-plate-recognition-barrier-0001` | Security Barrier Camera Demo application |
|
||||
|
||||
<details>
|
||||
<summary><strong>Click for an example of downloading the SqueezeNet Caffe* model</strong></summary>
|
||||
|
||||
To download the SqueezeNet 1.1 Caffe* model to the `~/models` folder:
|
||||
|
||||
```sh
|
||||
sudo python3 ./downloader.py --name squeezenet1.1 --output_dir ~/models
|
||||
```
|
||||
|
||||
Your screen looks similar to this after the download:
|
||||
```
|
||||
###############|| Downloading models ||###############
|
||||
|
||||
========= Downloading /Users/username/models/public/squeezenet1.1/squeezenet1.1.prototxt
|
||||
... 100%, 9 KB, 44058 KB/s, 0 seconds passed
|
||||
|
||||
========= Downloading /Users/username/models/public/squeezenet1.1/squeezenet1.1.caffemodel
|
||||
... 100%, 4834 KB, 4877 KB/s, 0 seconds passed
|
||||
|
||||
###############|| Post processing ||###############
|
||||
|
||||
========= Replacing text in /Users/username/models/public/squeezenet1.1/squeezenet1.1.prototxt =========
|
||||
```
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary><strong>Click for an example of downloading models for the Security Barrier Camera Demo application</strong></summary>
|
||||
|
||||
To download all three pre-trained models in FP16 precision to the `~/models` folder:
|
||||
|
||||
```sh
|
||||
./downloader.py --name vehicle-license-plate-detection-barrier-0106,vehicle-attributes-recognition-barrier-0039,license-plate-recognition-barrier-0001 --output_dir ~/models --precisions FP16
|
||||
```
|
||||
Your screen looks similar to this after the download:
|
||||
```
|
||||
################|| Downloading models ||################
|
||||
|
||||
========== Downloading /Users/username/models/intel/vehicle-license-plate-detection-barrier-0106/FP16/vehicle-license-plate-detection-barrier-0106.xml
|
||||
... 100%, 207 KB, 313926 KB/s, 0 seconds passed
|
||||
|
||||
========== Downloading /Users/username/models/intel/vehicle-license-plate-detection-barrier-0106/FP16/vehicle-license-plate-detection-barrier-0106.bin
|
||||
... 100%, 1256 KB, 2552 KB/s, 0 seconds passed
|
||||
|
||||
========== Downloading /Users/username/models/intel/vehicle-attributes-recognition-barrier-0039/FP16/vehicle-attributes-recognition-barrier-0039.xml
|
||||
... 100%, 32 KB, 172042 KB/s, 0 seconds passed
|
||||
|
||||
========== Downloading /Users/username/models/intel/vehicle-attributes-recognition-barrier-0039/FP16/vehicle-attributes-recognition-barrier-0039.bin
|
||||
... 100%, 1222 KB, 2712 KB/s, 0 seconds passed
|
||||
|
||||
========== Downloading /Users/username/models/intel/license-plate-recognition-barrier-0001/FP16/license-plate-recognition-barrier-0001.xml
|
||||
... 100%, 47 KB, 217130 KB/s, 0 seconds passed
|
||||
|
||||
========== Downloading /Users/username/models/intel/license-plate-recognition-barrier-0001/FP16/license-plate-recognition-barrier-0001.bin
|
||||
... 100%, 2378 KB, 4222 KB/s, 0 seconds passed
|
||||
|
||||
################|| Post-processing ||################
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### <a name="convert-models-to-intermediate-representation"></a> Step 2: Convert the Models to the Intermediate Representation
|
||||
|
||||
In this step, your trained models are ready to run through the Model Optimizer to convert them to the Intermediate Representation (IR) format. This is required before using the Inference Engine with the model.
|
||||
|
||||
Models in the Intermediate Representation format always include a pair of `.xml` and `.bin` files. Make sure you have these files for the Inference Engine to find them.
|
||||
- **REQUIRED:** `model_name.xml`
|
||||
- **REQUIRED:** `model_name.bin`
|
||||
|
||||
This guide uses the public SqueezeNet 1.1 Caffe\* model to run the Image Classification Sample. See the example to download a model in the <a href="#download-models">Download Models</a> section to learn how to download this model.
|
||||
|
||||
The `squeezenet1.1` model is downloaded in the Caffe* format. You must use the Model Optimizer to convert the model to the IR.
|
||||
The `vehicle-license-plate-detection-barrier-0106`, `vehicle-attributes-recognition-barrier-0039`, `license-plate-recognition-barrier-0001` models are downloaded in the Intermediate Representation format. You don't need to use the Model Optimizer to convert these models.
|
||||
|
||||
1. Create an `<ir_dir>` directory to contain the model's IR.
|
||||
|
||||
2. The Inference Engine can perform inference on different precision formats, such as `FP32`, `FP16`, `INT8`. To prepare an IR with specific precision, run the Model Optimizer with the appropriate `--data_type` option.
|
||||
|
||||
3. Run the Model Optimizer script:
|
||||
```sh
|
||||
cd /opt/intel/openvino/deployment_tools/model_optimizer
|
||||
```
|
||||
```sh
|
||||
python3 ./mo.py --input_model <model_dir>/<model_file> --data_type <model_precision> --output_dir <ir_dir>
|
||||
```
|
||||
The produced IR files are in the `<ir_dir>` directory.
|
||||
|
||||
<details>
|
||||
<summary><strong>Click for an example of converting the SqueezeNet Caffe* model</strong></summary>
|
||||
|
||||
The following command converts the public SqueezeNet 1.1 Caffe\* model to the FP16 IR and saves to the `~/models/public/squeezenet1.1/ir` output directory:
|
||||
|
||||
```sh
|
||||
cd /opt/intel/openvino/deployment_tools/model_optimizer
|
||||
```
|
||||
```sh
|
||||
python3 ./mo.py --input_model ~/models/public/squeezenet1.1/squeezenet1.1.caffemodel --data_type FP16 --output_dir ~/models/public/squeezenet1.1/ir
|
||||
```
|
||||
|
||||
After the Model Optimizer script is completed, the produced IR files (`squeezenet1.1.xml`, `squeezenet1.1.bin`) are in the specified `~/models/public/squeezenet1.1/ir` directory.
|
||||
|
||||
Copy the `squeezenet1.1.labels` file from the `/opt/intel/openvino/deployment_tools/demo/` to `<ir_dir>`. This file contains the classes that ImageNet uses. Therefore, the inference results show text instead of classification numbers:
|
||||
```sh
|
||||
cp /opt/intel/openvino/deployment_tools/demo/squeezenet1.1.labels <ir_dir>
|
||||
```
|
||||
</details>
|
||||
|
||||
### <a name="download-media"></a> Step 3: Download a Video or a Still Photo as Media
|
||||
|
||||
Many sources are available from which you can download video media to use the code samples and demo applications. Possibilities include:
|
||||
- https://videos.pexels.com
|
||||
- https://images.google.com
|
||||
|
||||
As an alternative, the Intel® Distribution of OpenVINO™ toolkit includes two sample images that you can use for running code samples and demo applications:
|
||||
* `/opt/intel/openvino/deployment_tools/demo/car.png`
|
||||
* `/opt/intel/openvino/deployment_tools/demo/car_1.bmp`
|
||||
|
||||
### <a name="run-image-classification"></a>Step 4: Run the Image Classification Code Sample
|
||||
|
||||
> **NOTE**: The Image Classification code sample is automatically compiled when you ran the Image Classification demo script. If you want to compile it manually, see the [Inference Engine Code Samples Overview](../IE_DG/Samples_Overview.md) document.
|
||||
|
||||
To run the **Image Classification** code sample with an input image on the IR:
|
||||
|
||||
1. Set up the OpenVINO environment variables:
|
||||
```sh
|
||||
source /opt/intel/openvino/bin/setupvars.sh
|
||||
```
|
||||
2. Go to the code samples build directory:
|
||||
```sh
|
||||
cd ~/inference_engine_samples_build/intel64/Release
|
||||
```
|
||||
3. Run the code sample executable, specifying the input media file, the IR of your model, and a target device on which you want to perform inference:
|
||||
```sh
|
||||
classification_sample_async -i <path_to_media> -m <path_to_model> -d <target_device>
|
||||
```
|
||||
<details>
|
||||
<summary><strong>Click for examples of running the Image Classification code sample on different devices</strong></summary>
|
||||
|
||||
The following commands run the Image Classification Code Sample using the `car.png` file from the `/opt/intel/openvino/deployment_tools/demo/` directory as an input image, the IR of your model from `~/models/public/squeezenet1.1/ir` and on different hardware devices:
|
||||
|
||||
**CPU:**
|
||||
```sh
|
||||
./classification_sample_async -i /opt/intel/openvino/deployment_tools/demo/car.png -m ~/models/public/squeezenet1.1/ir/squeezenet1.1.xml -d CPU
|
||||
```
|
||||
|
||||
|
||||
**MYRIAD:**
|
||||
|
||||
> **NOTE**: Running inference on VPU devices (Intel® Neural Compute Stick 2) with the MYRIAD plugin requires additional hardware configuration steps. For details, see the Steps for Intel® Neural Compute Stick 2 section in the [installation instructions](../install_guides/installing-openvino-macos.md).
|
||||
```sh
|
||||
./classification_sample_async -i /opt/intel/openvino/deployment_tools/demo/car.png -m ~/models/public/squeezenet1.1/ir/squeezenet1.1.xml -d MYRIAD
|
||||
```
|
||||
|
||||
When the Sample Application completes, you see the label and confidence for the top-10 categories on the display. Below is a sample output with inference results on CPU:
|
||||
```sh
|
||||
Top 10 results:
|
||||
|
||||
Image /opt/intel/openvino/deployment_tools/demo/car.png
|
||||
|
||||
classid probability label
|
||||
------- ----------- -----
|
||||
817 0.8364177 sports car, sport car
|
||||
511 0.0945683 convertible
|
||||
479 0.0419195 car wheel
|
||||
751 0.0091233 racer, race car, racing car
|
||||
436 0.0068038 beach wagon, station wagon, wagon, estate car, beach waggon, station waggon, waggon
|
||||
656 0.0037315 minivan
|
||||
586 0.0025940 half track
|
||||
717 0.0016044 pickup, pickup truck
|
||||
864 0.0012045 tow truck, tow car, wrecker
|
||||
581 0.0005833 grille, radiator grille
|
||||
|
||||
[ INFO ] Execution successful
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### <a name="run-security-barrier"></a>Step 5: Run the Security Barrier Camera Demo Application
|
||||
|
||||
> **NOTE**: The Security Barrier Camera Demo Application is automatically compiled when you run the Inference Pipeline demo scripts. If you want to build it manually, see the instructions in the [Demo Applications Overview](@ref omz_demos_README) section.
|
||||
|
||||
To run the **Security Barrier Camera Demo Application** using an input image on the prepared IRs:
|
||||
|
||||
1. Set up the OpenVINO environment variables:
|
||||
```sh
|
||||
source /opt/intel/openvino/bin/setupvars.sh
|
||||
```
|
||||
2. Go to the demo application build directory:
|
||||
```sh
|
||||
cd ~/inference_engine_demos_build/intel64/Release
|
||||
```
|
||||
3. Run the demo executable, specifying the input media file, list of model IRs, and a target device on which to perform inference:
|
||||
```sh
|
||||
./security_barrier_camera_demo -i <path_to_media> -m <path_to_vehicle-license-plate-detection_model_xml> -m_va <path_to_vehicle_attributes_model_xml> -m_lpr <path_to_license_plate_recognition_model_xml> -d <target_device>
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary><strong>Click for examples of running the Security Barrier Camera demo application on different devices</strong></summary>
|
||||
|
||||
**CPU:**
|
||||
|
||||
```sh
|
||||
./security_barrier_camera_demo -i /opt/intel/openvino/deployment_tools/demo/car_1.bmp -m ~/models/intel/vehicle-license-plate-detection-barrier-0106/FP16/vehicle-license-plate-detection-barrier-0106.xml -m_va ~/models/intel/vehicle-attributes-recognition-barrier-0039/FP16/vehicle-attributes-recognition-barrier-0039.xml -m_lpr ~/models/intel/license-plate-recognition-barrier-0001/FP16/license-plate-recognition-barrier-0001.xml -d CPU
|
||||
```
|
||||
|
||||
**MYRIAD:**
|
||||
|
||||
> **NOTE**: Running inference on VPU devices (Intel® Neural Compute Stick 2) with the MYRIAD plugin requires additional hardware configuration steps. For details, see the Steps for Intel® Neural Compute Stick 2 section in the [installation instructions](../install_guides/installing-openvino-macos.md).
|
||||
```sh
|
||||
./classification_sample_async -i <INSTALL_DIR>/inference-engine/samples/sample_data/car.png -m <ir_dir>/squeezenet1.1.xml -d MYRIAD
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## <a name="basic-guidelines-sample-application"></a>Basic Guidelines for Using Code Samples and Demo Applications
|
||||
|
||||
Following are some basic guidelines for executing the OpenVINO™ workflow using the code samples and demo applications:
|
||||
|
||||
1. Before using the OpenVINO™ samples, always set up the environment:
|
||||
```sh
|
||||
source /opt/intel/openvino/bin/setupvars.sh
|
||||
```
|
||||
2. Have the directory path for the following:
|
||||
- Code Sample binaries located in `~/inference_engine_cpp_samples_build/intel64/Release`
|
||||
- Demo Application binaries located in `~/inference_engine_demos_build/intel64/Release`
|
||||
- Media: Video or image. See <a href="#download-media">Download Media</a>.
|
||||
- Model: Neural Network topology converted with the Model Optimizer to the IR format (.bin and .xml files). See <a href="#download-models">Download Models</a> for more information.
|
||||
|
||||
## <a name="syntax-examples"></a> Typical Code Sample and Demo Application Syntax Examples
|
||||
|
||||
Template to call sample code or a demo application:
|
||||
|
||||
```sh
|
||||
<path_to_app> -i <path_to_media> -m <path_to_model> -d <target_device>
|
||||
```
|
||||
|
||||
With the sample information specified, the command might look like this:
|
||||
|
||||
```sh
|
||||
./object_detection_demo_ssd_async -i ~/Videos/catshow.mp4 \
|
||||
-m ~/ir/fp32/mobilenet-ssd.xml -d CPU
|
||||
```
|
||||
|
||||
## <a name="advanced-samples"></a> Advanced Demo Use
|
||||
|
||||
Some demo applications let you use multiple models for different purposes. In these cases, the output of the first model is usually used as the input for later models.
|
||||
|
||||
For example, an SSD will detect a variety of objects in a frame, then age, gender, head pose, emotion recognition and similar models target the objects classified by the SSD to perform their functions.
|
||||
|
||||
In these cases, the use pattern in the last part of the template above is usually:
|
||||
|
||||
`-m_<acronym> … -d_<acronym> …`
|
||||
|
||||
For head pose:
|
||||
|
||||
`-m_hp <headpose model> -d_hp <headpose hardware target>`
|
||||
|
||||
**Example of an Entire Command (object_detection + head pose):**
|
||||
|
||||
```sh
|
||||
./object_detection_demo_ssd_async -i ~/Videos/catshow.mp4 \
|
||||
-m ~/ir/fp32/mobilenet-ssd.xml -d CPU -m_hp headpose.xml \
|
||||
-d_hp CPU
|
||||
```
|
||||
|
||||
**Example of an Entire Command (object_detection + head pose + age-gender):**
|
||||
|
||||
```sh
|
||||
./object_detection_demo_ssd_async -i ~/Videos/catshow.mp4 \
|
||||
-m ~/r/fp32/mobilenet-ssd.xml -d CPU -m_hp headpose.xml \
|
||||
-d_hp CPU -m_ag age-gender.xml -d_ag CPU
|
||||
```
|
||||
|
||||
You can see all the sample application’s parameters by adding the `-h` or `--help` option at the command line.
|
||||
|
||||
|
||||
## Additional Resources
|
||||
|
||||
Use these resources to learn more about the OpenVINO™ toolkit:
|
||||
|
||||
* [OpenVINO™ Release Notes](https://software.intel.com/en-us/articles/OpenVINO-RelNotes)
|
||||
* [Introduction to Intel® Deep Learning Deployment Toolkit](../IE_DG/Introduction.md)
|
||||
* [Inference Engine Developer Guide](../IE_DG/Deep_Learning_Inference_Engine_DevGuide.md)
|
||||
* [Model Optimizer Developer Guide](../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md)
|
||||
* [Inference Engine Samples Overview](../IE_DG/Samples_Overview.md)
|
||||
* [Overview of OpenVINO™ Toolkit Pre-Trained Models](https://software.intel.com/en-us/openvino-toolkit/documentation/pretrained-models)
|
||||
* [OpenVINO™ Hello World Face Detection Exercise](https://github.com/intel-iot-devkit/inference-tutorials-generic)
|
||||
@@ -16,10 +16,10 @@ The toolkit consists of three primary components:
|
||||
|
||||
In addition, demo scripts, code samples and demo applications are provided to help you get up and running with the toolkit:
|
||||
* **Demo Scripts** - Batch scripts that automatically perform the workflow steps to demonstrate running inference pipelines for different scenarios.
|
||||
* [**Code Samples**](../IE_DG/Samples_Overview.md) - Small console applications that show you how to:
|
||||
* **[Code Samples](../IE_DG/Samples_Overview.md)** - Small console applications that show you how to:
|
||||
* Utilize specific OpenVINO capabilities in an application.
|
||||
* Perform specific tasks, such as loading a model, running inference, querying specific device capabilities, and more.
|
||||
* [**Demo Applications**](@ref omz_demos_README) - Console applications that provide robust application templates to help you implement specific deep learning scenarios. These applications involve increasingly complex processing pipelines that gather analysis data from several models that run inference simultaneously, such as detecting a person in a video stream along with detecting the person's physical attributes, such as age, gender, and emotional state.
|
||||
* **[Demo Applications](@ref omz_demos_README)** - Console applications that provide robust application templates to help you implement specific deep learning scenarios. These applications involve increasingly complex processing pipelines that gather analysis data from several models that run inference simultaneously, such as detecting a person in a video stream along with detecting the person's physical attributes, such as age, gender, and emotional state.
|
||||
|
||||
## <a name="openvino-installation"></a>Intel® Distribution of OpenVINO™ toolkit Installation and Deployment Tools Directory Structure
|
||||
This guide assumes you completed all Intel® Distribution of OpenVINO™ toolkit installation and configuration steps. If you have not yet installed and configured the toolkit, see [Install Intel® Distribution of OpenVINO™ toolkit for Windows*](../install_guides/installing-openvino-windows.md).
|
||||
@@ -42,7 +42,7 @@ The primary tools for deploying your models and applications are installed to th
|
||||
| `samples\` | Inference Engine samples. Contains source code for C++ and Python* samples and build scripts. See the [Inference Engine Samples Overview](../IE_DG/Samples_Overview.md). |
|
||||
| `share\` | CMake configuration files for linking with Inference Engine.|
|
||||
| `src\` | Source files for CPU extensions.|
|
||||
| `~intel_models\` | Symbolic link to the `intel_models` subfolder of the `open_model-zoo` folder |
|
||||
| `~intel_models\` | Symbolic link to the `intel_models` subfolder of the `open_model_zoo` folder. |
|
||||
| `model_optimizer\` | Model Optimizer directory. Contains configuration scripts, scripts to run the Model Optimizer and other files. See the [Model Optimizer Developer Guide](../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md). |
|
||||
| `ngraph\` | nGraph directory. Includes the nGraph header and library files. |
|
||||
| `open_model_zoo\` | Open Model Zoo directory. Includes the Model Downloader tool to download [pre-trained OpenVINO](@ref omz_models_intel_index) and public models, OpenVINO models documentation, demo applications and the Accuracy Checker tool to evaluate model accuracy.|
|
||||
@@ -76,9 +76,9 @@ The demo scripts can run inference on any [supported target device](https://soft
|
||||
.\<script_name> -d [CPU, GPU, MYRIAD, HDDL]
|
||||
```
|
||||
|
||||
Before running the demo applications on Intel® Processor Graphics, you must complete the [Steps for Intel® Processor Graphics (GPU)](../install_guides/installing-openvino-windows.md#Install-GPU).
|
||||
|
||||
Before running the demo applications on Intel® Vision Accelerator Design with Intel® Movidius™ VPUs, you must complete the [Steps for [Steps for Intel® Vision Accelerator Design with Intel® Movidius™ VPUs](../install_guides/installing-openvino-windows.md#hddl-myriad).
|
||||
Before running the demo applications on Intel® Processor Graphics or Intel® Vision Accelerator Design with Intel® Movidius™ VPUs, you must complete additional hardware configuration steps. For details, see the following sections in the [installation instructions](../install_guides/installing-openvino-windows.md):
|
||||
* Additional Installation Steps for Intel® Processor Graphics (GPU)
|
||||
* Additional Installation Steps for Intel® Vision Accelerator Design with Intel® Movidius™ VPUs
|
||||
|
||||
The following paragraphs describe each demo script.
|
||||
|
||||
@@ -184,8 +184,8 @@ You will perform the following steps:
|
||||
1. <a href="#download-models">Use the Model Downloader to download suitable models.</a>
|
||||
2. <a href="#convert-models-to-intermediate-representation">Convert the models with the Model Optimizer.</a>
|
||||
3. <a href="#download-media">Download media files to run inference on.</a>
|
||||
4. <a href="#run-image-classification">Run inference on the Image Classification Code Sample and see the results</a>.
|
||||
5. <a href="#run-security-barrier">Run inference on the Security Barrier Camera Demo application and see the results</a>.
|
||||
4. <a href="#run-image-classification">Run inference on the Image Classification Code Sample and see the results.</a>
|
||||
5. <a href="#run-security-barrier">Run inference on the Security Barrier Camera Demo application and see the results.</a>
|
||||
|
||||
Each demo and code sample is a separate application, but they use the same behavior and components.
|
||||
|
||||
@@ -193,13 +193,13 @@ Inputs you need to specify when using a code sample or demo application:
|
||||
- **A compiled OpenVINO™ code sample or demo application** that runs inferencing against a model that has been run through the Model Optimizer, resulting in an IR, using the other inputs you provide.
|
||||
- **One or more models** in the IR format. Each model is trained for a specific task. Examples include pedestrian detection, face detection, vehicle detection, license plate recognition, head pose, and others. Different models are used for different applications. Models can be chained together to provide multiple features; for example, vehicle + make/model + license plate recognition.
|
||||
- **One or more media files**. The media is typically a video file, but can be a still photo.
|
||||
- **One or more target device** on which you run inference. The target device can be the CPU, GPU, FPGA, or VPU accelerator.
|
||||
- **One or more target device** on which you run inference. The target device can be the CPU, GPU, or VPU accelerator.
|
||||
|
||||
### Build the Code Samples and Demo Applications
|
||||
|
||||
To perform sample inference, run the Image Classification code sample and Security Barrier Camera demo application that are automatically compiled when you run the Image Classification and Inference Pipeline demo scripts. The binary files are in the `C:\Users\<USER_ID>\Intel\OpenVINO\inference_engine_cpp_samples_build\intel64\Release` and `C:\Users\<USER_ID>\Intel\OpenVINO\inference_engine_demos_build\intel64\Release` directories, respectively.
|
||||
|
||||
You can also build all available sample code and demo applications from the source files delivered with the OpenVINO toolkit. To learn how to do this, see the [Inference Engine Code Samples Overview](../IE_DG/Samples_Overview.md#build_samples_linux) and the [Demo Applications Overview](@ref omz_demos_README#build_the_demo_applications) sections.
|
||||
You can also build all available sample code and demo applications from the source files delivered with the OpenVINO™ toolkit. To learn how to do this, see the instruction in the [Inference Engine Code Samples Overview](../IE_DG/Samples_Overview.md) and [Demo Applications Overview](@ref omz_demos_README) sections.
|
||||
|
||||
### <a name="download-models"></a> Step 1: Download the Models
|
||||
|
||||
@@ -209,7 +209,7 @@ You must have a model that is specific for you inference task. Example model typ
|
||||
- Custom (Often based on SSD)
|
||||
|
||||
Options to find a model suitable for the OpenVINO™ toolkit are:
|
||||
- Download public and Intel's pre-trained models from the [Open Model Zoo](https://github.com/opencv/open_model_zoo) using [Model Downloader tool](@ref omz_tools_downloader_README#model_downloader_usage).
|
||||
- Download public and Intel's pre-trained models from the [Open Model Zoo](https://github.com/opencv/open_model_zoo) using the [Model Downloader tool](@ref omz_tools_downloader_README).
|
||||
- Download from GitHub*, Caffe* Zoo, TensorFlow* Zoo, and other resources.
|
||||
- Train your own model.
|
||||
|
||||
@@ -360,7 +360,7 @@ As an alternative, the Intel® Distribution of OpenVINO™ toolkit includes two
|
||||
|
||||
### <a name="run-image-classification"></a>Step 4: Run the Image Classification Code Sample
|
||||
|
||||
> **NOTE**: The Image Classification code sample is automatically compiled when you run the Image Classification demo script. If you want to compile it manually, see the [Inference Engine Code Samples Overview](../IE_DG/Samples_Overview.md#build_samples_windows) section.
|
||||
> **NOTE**: The Image Classification code sample is automatically compiled when you run the Image Classification demo script. If you want to compile it manually, see the Build the Sample Applications on Microsoft Windows* OS section in [Inference Engine Code Samples Overview](../IE_DG/Samples_Overview.md).
|
||||
|
||||
To run the **Image Classification** code sample with an input image on the IR:
|
||||
|
||||
@@ -388,7 +388,7 @@ The following commands run the Image Classification Code Sample using the `car.p
|
||||
|
||||
**GPU:**
|
||||
|
||||
> **NOTE**: Running inference on Intel® Processor Graphics (GPU) requires [additional hardware configuration steps](../install_guides/installing-openvino-windows.md#Install-GPU).
|
||||
> **NOTE**: Running inference on Intel® Processor Graphics (GPU) requires additional hardware configuration steps. For details, see the Steps for Intel® Processor Graphics (GPU) section in the [installation instructions](../install_guides/installing-openvino-windows.md).
|
||||
```bat
|
||||
.\classification_sample_async -i <INSTALL_DIR>\deployment_tools\demo\car.png -m C:\Users\<USER_ID>\models\public\squeezenet1.1\ir\squeezenet1.1.xml -d GPU
|
||||
```
|
||||
@@ -425,7 +425,7 @@ classid probability label
|
||||
|
||||
### <a name="run-security-barrier"></a>Step 5: Run the Security Barrier Camera Demo Application
|
||||
|
||||
> **NOTE**: The Security Barrier Camera Demo Application is automatically compiled when you run the Inference Pipeline demo scripts. If you want to build it manually, see the [Demo Applications Overview](@ref omz_demos_README#build_the_demo_applications) section.
|
||||
> **NOTE**: The Security Barrier Camera Demo Application is automatically compiled when you run the Inference Pipeline demo scripts. If you want to build it manually, see the instructions in the [Demo Applications Overview](@ref omz_demos_README) section.
|
||||
|
||||
To run the **Security Barrier Camera Demo Application** using an input image on the prepared IRs:
|
||||
|
||||
@@ -453,7 +453,7 @@ To run the **Security Barrier Camera Demo Application** using an input image on
|
||||
|
||||
**GPU:**
|
||||
|
||||
> **NOTE**: Running inference on Intel® Processor Graphics (GPU) requires [additional hardware configuration steps](../install_guides/installing-openvino-windows.md#Install-GPU).
|
||||
> **NOTE**: Running inference on Intel® Processor Graphics (GPU) requires additional hardware configuration steps. For details, see the Steps for Intel® Processor Graphics (GPU) section in the [installation instructions](../install_guides/installing-openvino-windows.md).
|
||||
```bat
|
||||
.\security_barrier_camera_demo -i <INSTALL_DIR>\deployment_tools\demo\car_1.bmp -m <path_to_model>/vehicle-license-plate-detection-barrier-0106.xml -m_va <path_to_model>/vehicle-attributes-recognition-barrier-0039.xml -m_lpr <path_to_model>/license-plate-recognition-barrier-0001.xml -d GPU
|
||||
```
|
||||
@@ -533,9 +533,9 @@ You can see all the sample application’s parameters by adding the `-h` or `--h
|
||||
Use these resources to learn more about the OpenVINO™ toolkit:
|
||||
|
||||
* [OpenVINO™ Release Notes](https://software.intel.com/en-us/articles/OpenVINO-RelNotes)
|
||||
* [Introduction to Intel® Deep Learning Deployment Toolkit](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Introduction.html)
|
||||
* [Inference Engine Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Deep_Learning_Inference_Engine_DevGuide.html)
|
||||
* [Model Optimizer Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html)
|
||||
* [Inference Engine Samples Overview](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Samples_Overview.html)
|
||||
* [Introduction to Intel® Deep Learning Deployment Toolkit](../IE_DG/Introduction.md)
|
||||
* [Inference Engine Developer Guide](../IE_DG/Deep_Learning_Inference_Engine_DevGuide.md)
|
||||
* [Model Optimizer Developer Guide](../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md)
|
||||
* [Inference Engine Samples Overview](../IE_DG/Samples_Overview.md)
|
||||
* [Overview of OpenVINO™ Toolkit Pre-Trained Models](https://software.intel.com/en-us/openvino-toolkit/documentation/pretrained-models)
|
||||
* [OpenVINO™ Hello World Face Detection Exercise](https://github.com/intel-iot-devkit/inference-tutorials-generic)
|
||||
@@ -33,13 +33,6 @@ To learn about what is *custom layers* and how to work with them in the Deep Lea
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/1_iI_4Zgufw" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
||||
|
||||
|
||||
## Deploying Intel® FPGAs for Deep Learning Inferencing with OpenVINO™ Toolkit
|
||||
|
||||
[](https://www.youtube.com/watch?v=7yh1c8kJn1A)
|
||||
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/7yh1c8kJn1A" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
||||
|
||||
|
||||
## Computer Vision at the Edge with OpenVINO by Krishnakumar Shetti at ODSC_India
|
||||
|
||||
[](https://www.youtube.com/watch?v=RfRCrq35LXg)
|
||||
|
||||
3
docs/img/NEO_check_agreement.png
Normal file
3
docs/img/NEO_check_agreement.png
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:091e5320ed2179aeea5da02d26f89b510d6f7b832aa1c98ac5ced65ce55d99a0
|
||||
size 14219
|
||||
3
docs/img/OV-diagram-step2.png
Normal file
3
docs/img/OV-diagram-step2.png
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8a5e64956ea61461c3bf942cd3802c16b33188e7bef8955384d46dd08a84f4d3
|
||||
size 46658
|
||||
3
docs/img/OV-diagram-step3.png
Normal file
3
docs/img/OV-diagram-step3.png
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2f7083e9eff7158ca99990daa1a9ee33c73c09e7a2f3d6c6da316aa9be3ad1ec
|
||||
size 50327
|
||||
3
docs/img/OpenVINO-diagram.png
Normal file
3
docs/img/OpenVINO-diagram.png
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:00ec72e982f658698b599dd8cbcbd50996a1982c4223bce93b807fa6b0c0c825
|
||||
size 233866
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:411d78dc7fa90d6e857d1486eab7c7e7e338f1e27f21d04fadd02433d8a74f32
|
||||
size 29204
|
||||
oid sha256:304869bcbea000f6dbf46dee7900ff01aa61a75a3787969cc307f2f54d57263c
|
||||
size 32185
|
||||
|
||||
126
docs/index.md
126
docs/index.md
@@ -1,66 +1,102 @@
|
||||
# OpenVINO™ Toolkit Documentation {#index}
|
||||
# OpenVINO™ Toolkit Overview {#index}
|
||||
|
||||
## Introduction to OpenVINO™ Toolkit
|
||||
## Introduction
|
||||
|
||||
OpenVINO™ toolkit quickly deploys applications and solutions that emulate human vision. Based on Convolutional Neural Networks (CNNs), the toolkit extends computer vision (CV) workloads across Intel® hardware, maximizing performance. The OpenVINO™ toolkit includes the Deep Learning Deployment Toolkit (DLDT).
|
||||
OpenVINO™ toolkit is a comprehensive toolkit for quickly developing applications and solutions that solve a variety of tasks including emulation of human vision, automatic speech recognition, natural language processing, recommendation systems, and many others. Based on latest generations of artificial neural networks, including Convolutional Neural Networks (CNNs), recurrent and attention-based networks, the toolkit extends computer vision and non-vision workloads across Intel® hardware, maximizing performance. It accelerates applications with high-performance, AI and deep learning inference deployed from edge to cloud.
|
||||
|
||||
OpenVINO™ toolkit:
|
||||
|
||||
- Enables CNN-based deep learning inference on the edge
|
||||
- Supports heterogeneous execution across an Intel® CPU, Intel® Integrated Graphics, Intel® FPGA, Intel® Neural Compute Stick 2 and Intel® Vision Accelerator Design with Intel® Movidius™ VPUs
|
||||
- Supports heterogeneous execution across an Intel® CPU, Intel® Integrated Graphics, Intel® Neural Compute Stick 2 and Intel® Vision Accelerator Design with Intel® Movidius™ VPUs
|
||||
- Speeds time-to-market via an easy-to-use library of computer vision functions and pre-optimized kernels
|
||||
- Includes optimized calls for computer vision standards, including OpenCV\* and OpenCL™
|
||||
|
||||
## Toolkit Components
|
||||
## OpenVINO™ Toolkit Workflow
|
||||
|
||||
OpenVINO™ toolkit includes the following components:
|
||||
The following diagram illustrates the typical OpenVINO™ workflow (click to see the full-size image):
|
||||

|
||||
|
||||
- Deep Learning Deployment Toolkit (DLDT)
|
||||
- [Deep Learning Model Optimizer](MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md) - A cross-platform command-line tool for importing models and
|
||||
preparing them for optimal execution with the Inference Engine. The Model Optimizer imports, converts, and optimizes models, which were trained in popular frameworks, such as Caffe*,
|
||||
TensorFlow*, MXNet*, Kaldi*, and ONNX*.
|
||||
- [Deep Learning Inference Engine](IE_DG/inference_engine_intro.md) - A unified API to allow high performance inference on many hardware types
|
||||
including the following:
|
||||
- Intel® CPU
|
||||
- Intel® Integrated Graphics
|
||||
- Intel® Neural Compute Stick 2
|
||||
- Intel® Vision Accelerator Design with Intel® Movidius™ vision processing unit (VPU)
|
||||
- [Samples](IE_DG/Samples_Overview.md) - A set of simple console applications demonstrating how to use the Inference Engine in your applications
|
||||
- [Tools](IE_DG/Tools_Overview.md) - A set of simple console tools to work with your models
|
||||
### Model Preparation, Conversion and Optimization
|
||||
|
||||
You can use your framework of choice to prepare and train a Deep Learning model or just download a pretrained model from the Open Model Zoo. The Open Model Zoo includes Deep Learning solutions to a variety of vision problems, including object recognition, face recognition, pose estimation, text detection, and action recognition, at a range of measured complexities.
|
||||
Several of these pretrained models are used also in the [code samples](E_DG/Samples_Overview.md) and [application demos](@ref omz_demos_README). To download models from the Open Model Zoo, the [Model Downloader](@ref omz_tools_downloader_README) tool is used.
|
||||
|
||||
One of the core component of the OpenVINO™ toolkit is the [Model Optimizer](MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md) a cross-platform command-line
|
||||
tool that converts a trained neural network from its source framework to an open-source, nGraph-compatible [Intermediate Representation (IR)](MO_DG/IR_and_opsets.md) for use in inference operations. The Model Optimizer imports models trained in popular frameworks such as Caffe*, TensorFlow*, MXNet*, Kaldi*, and ONNX* and performs a few optimizations to remove excess layers and group operations when possible into simpler, faster graphs.
|
||||

|
||||
|
||||
If your neural network model contains layers that are not in the list of known layers for supported frameworks, you can adjust the conversion and optimization process through use of [Custom Layers](HOWTO/Custom_Layers_Guide.md).
|
||||
|
||||
Run the [Accuracy Checker utility](@ref omz_tools_accuracy_checker_README) either against source topologies or against the output representation to evaluate the accuracy of inference. The Accuracy Checker is also part of the [Deep Learning Workbench](@ref workbench_docs_Workbench_DG_Introduction), an integrated web-based performance analysis studio.
|
||||
|
||||
Useful documents for model optimization:
|
||||
* [Model Optimizer Developer Guide](MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md)
|
||||
* [Intermediate Representation and Opsets](MO_DG/IR_and_opsets.md)
|
||||
* [Custom Layers Guide](HOWTO/Custom_Layers_Guide.md)
|
||||
* [Accuracy Checker utility](@ref omz_tools_accuracy_checker_README)
|
||||
* [Deep Learning Workbench](@ref workbench_docs_Workbench_DG_Introduction)
|
||||
* [Model Downloader](@ref omz_tools_downloader_README) utility
|
||||
* [Pretrained Models (Open Model Zoo)](@ref omz_models_public_index)
|
||||
|
||||
### Running and Tuning Inference
|
||||
The other core component of OpenVINO™ is the [Inference Engine](IE_DG/Deep_Learning_Inference_Engine_DevGuide.md), which manages the loading and compiling of the optimized neural network model, runs inference operations on input data, and outputs the results. Inference Engine can execute synchronously or asynchronously, and its plugin architecture manages the appropriate compilations for execution on multiple Intel® devices, including both workhorse CPUs and specialized graphics and video processing platforms (see below, Packaging and Deployment).
|
||||
|
||||
You can use OpenVINO™ Tuning Utilities with the Inference Engine to trial and test inference on your model. The Benchmark utility uses an input model to run iterative tests for throughput or latency measures, and the Cross Check utility compares performance of differently configured inferences. The [Post-Training Optimization Tool](@ref pot_README) integrates a suite of quantization- and calibration-based tools to further streamline performance.
|
||||
|
||||
For a full browser-based studio integrating these other key tuning utilities, try the [Deep Learning Workbench](@ref workbench_docs_Workbench_DG_Introduction).
|
||||

|
||||
|
||||
OpenVINO™ toolkit includes a set of [inference code samples](IE_DG/Samples_Overview.md) and [application demos](@ref omz_demos_README) showing how inference is run and output processed for use in retail environments, classrooms, smart camera applications, and other solutions.
|
||||
|
||||
OpenVINO also makes use of open-Source and Intel™ tools for traditional graphics processing and performance management. Intel® Media SDK supports accelerated rich-media processing, including transcoding. OpenVINO™ optimizes calls to the rich OpenCV and OpenVX libraries for processing computer vision workloads. And the new DL Streamer integration further accelerates video pipelining and performance.
|
||||
|
||||
Useful documents for inference tuning:
|
||||
* [Inference Engine Developer Guide](IE_DG/Deep_Learning_Inference_Engine_DevGuide.md)
|
||||
* [Inference Engine API References](./api_references.html)
|
||||
* [Inference Code Samples](IE_DG/Samples_Overview.md)
|
||||
* [Application Demos](@ref omz_demos_README)
|
||||
* [Post-Training Optimization Tool Guide](@ref pot_README)
|
||||
* [Deep Learning Workbench Guide](@ref workbench_docs_Workbench_DG_Introduction)
|
||||
* [Intel Media SDK](https://github.com/Intel-Media-SDK/MediaSDK)
|
||||
* [DL Streamer Samples](@ref gst_samples_README)
|
||||
* [OpenCV](https://docs.opencv.org/master/)
|
||||
* [OpenVX](https://software.intel.com/en-us/openvino-ovx-guide)
|
||||
|
||||
### Packaging and Deployment
|
||||
The Intel Distribution of OpenVINO™ toolkit outputs optimized inference runtimes for the following devices:
|
||||
* Intel® CPUs
|
||||
* Intel® Processor Graphics
|
||||
* Intel® Neural Compute Stick 2
|
||||
* Intel® Vision Accelerator Design with Intel® Movidius™ VPUs
|
||||
|
||||
The Inference Engine's plug-in architecture can be extended to meet other specialized needs. [Deployment Manager](./install_guides/deployment-manager-tool.md) is a Python* command-line tool that assembles the tuned model, IR files, your application, and required dependencies into a runtime package for your target device. It outputs packages for CPU, GPU, and VPU on Linux* and Windows*, and Neural Compute Stick-optimized packages with Linux.
|
||||
|
||||
* [Inference Engine Integration Workflow](IE_DG/Integrate_with_customer_application_new_API.md)
|
||||
* [Inference Engine API References](./api_references.html)
|
||||
* [Inference Engine Plug-in Developer Guide](./ie_plugin_api/index.html)
|
||||
* [Deployment Manager Guide](./install_guides/deployment-manager-tool.md)
|
||||
|
||||
|
||||
## OpenVINO™ Toolkit Components
|
||||
|
||||
Intel® Distribution of OpenVINO™ toolkit includes the following components:
|
||||
|
||||
- [Deep Learning Model Optimizer](MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md) - A cross-platform command-line tool for importing models and preparing them for optimal execution with the Inference Engine. The Model Optimizer imports, converts, and optimizes models, which were trained in popular frameworks, such as Caffe*, TensorFlow*, MXNet*, Kaldi*, and ONNX*.
|
||||
- [Deep Learning Inference Engine](IE_DG/inference_engine_intro.md) - A unified API to allow high performance inference on many hardware types including Intel® CPU, Intel® Integrated Graphics, Intel® Neural Compute Stick 2, Intel® Vision Accelerator Design with Intel® Movidius™ vision processing unit (VPU)
|
||||
- [Inference Engine Samples](IE_DG/Samples_Overview.md) - A set of simple console applications demonstrating how to use the Inference Engine in your applications
|
||||
- [Tools](IE_DG/Tools_Overview.md) - A set of simple console tools to work with your models
|
||||
- [Open Model Zoo](@ref omz_models_intel_index)
|
||||
- [Demos](@ref omz_demos_README) - Console applications that demonstrate how you can use the Inference Engine in your applications to solve specific use cases
|
||||
- [Tools](IE_DG/Tools_Overview.md) - Additional tools to download models and check accuracy
|
||||
- [Documentation for Pretrained Models](@ref omz_models_intel_index) - Documentation for pretrained models is available in the [Open Model Zoo repository](https://github.com/opencv/open_model_zoo)
|
||||
- [Documentation for Pretrained Models](@ref omz_models_intel_index) - Documentation for pretrained models that are available in the [Open Model Zoo repository](https://github.com/opencv/open_model_zoo)
|
||||
- [Post-Training Optimization tool](@ref pot_README) - A tool to calibrate a model and then execute it in the INT8 precision
|
||||
- [Deep Learning Workbench](@ref workbench_docs_Workbench_DG_Introduction) - A web-based graphical environment that allows you to easily use various sophisticated OpenVINO™ toolkit components
|
||||
- Deep Learning Streamer (DL Streamer) – Streaming analytics framework, based on GStreamer, for constructing graphs of media analytics components. DL Streamer can be installed by the Intel® Distribution of OpenVINO™ toolkit installer. Its open source version is available on [GitHub](https://github.com/opencv/gst-video-analytics). For the DL Streamer documentation, see:
|
||||
- [DL Streamer Samples](IE_DG/Tools_Overview.md)
|
||||
- [API Reference](https://opencv.github.io/gst-video-analytics/)
|
||||
- [DL Streamer Samples](@ref gst_samples_README)
|
||||
- [API Reference](https://openvinotoolkit.github.io/dlstreamer_gst/)
|
||||
- [Elements](https://github.com/opencv/gst-video-analytics/wiki/Elements)
|
||||
- [Tutorial](https://github.com/opencv/gst-video-analytics/wiki/DL%20Streamer%20Tutorial)
|
||||
- [OpenCV](https://docs.opencv.org/master/) - OpenCV* community version compiled for Intel® hardware
|
||||
- Drivers and runtimes for OpenCL™ version 2.1
|
||||
- [Intel® Media SDK](https://software.intel.com/en-us/media-sdk)
|
||||
- [Intel® Media SDK](https://software.intel.com/en-us/media-sdk) (in Intel® Distribution of OpenVINO™ toolkit for Linux only)
|
||||
|
||||
## Documentation Set Contents
|
||||
|
||||
OpenVINO™ toolkit documentation set includes the following documents:
|
||||
|
||||
- [Install the Intel® Distribution of OpenVINO™ Toolkit for Linux*](install_guides/installing-openvino-linux.md)
|
||||
- [Install the Intel® Distribution of OpenVINO™ Toolkit for Linux with FPGA Support](install_guides/installing-openvino-linux-fpga.md)
|
||||
- [Install the Intel® Distribution of OpenVINO™ Toolkit for Windows*](install_guides/installing-openvino-windows.md)
|
||||
- [Install the Intel® Distribution of OpenVINO™ Toolkit for macOS*](install_guides/installing-openvino-macos.md)
|
||||
- [Install the Intel® Distribution of OpenVINO™ Toolkit for Raspbian*](install_guides/installing-openvino-raspbian.md)
|
||||
- [Install OpenVINO™ Deep Learning Workbench](@ref workbench_docs_Workbench_DG_Install_Workbench)
|
||||
- [Introduction to Deep Learning Deployment Toolkit](IE_DG/Introduction.md)
|
||||
- [Model Optimizer Developer Guide](MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md)
|
||||
- [Inference Engine Developer Guide](IE_DG/Deep_Learning_Inference_Engine_DevGuide.md)
|
||||
- [Post-Training Optimization Tool](@ref pot_README)
|
||||
- [Inference Engine Samples](IE_DG/Samples_Overview.md)
|
||||
- [Demo Applications](@ref omz_demos_README)
|
||||
- [Tools](IE_DG/Tools_Overview.md)
|
||||
- [Pretrained Models](@ref omz_models_intel_index)
|
||||
- [Known Issues](IE_DG/Known_Issues_Limitations.md)
|
||||
- [Legal Information](@ref omz_demos_README)
|
||||
|
||||
> **Typical Next Step:** [Introduction to Deep Learning Deployment Toolkit](IE_DG/Introduction.md)
|
||||
OpenVINO™ Toolkit opensource version is available on [GitHub](https://github.com/openvinotoolkit/openvino). For building the Inference Engine from the source code, see the <a href="https://github.com/openvinotoolkit/openvino/blob/master/build-instruction.md">build instructions</a>.
|
||||
@@ -1,241 +1,21 @@
|
||||
# Configuration Guide for Intel® Distribution of OpenVINO™ toolkit 2020.4 and the Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA on CentOS or Ubuntu* {#openvino_docs_install_guides_PAC_Configure}
|
||||
|
||||
> **NOTE**: For previous versions, see [Configuration Guide for OpenVINO 2020.3](https://docs.openvinotoolkit.org/2020.3/_docs_install_guides_PAC_Configure.html), [Configuration Guide for OpenVINO 2020.2](https://docs.openvinotoolkit.org/2020.2/_docs_install_guides_PAC_Configure.html), [Configuration Guide for OpenVINO 2019R1/2019R2/2019R3](https://docs.openvinotoolkit.org/2019_R3.1/_docs_install_guides_PAC_Configure_2019RX.html), [Configuration Guide for OpenVINO 2018R5](https://docs.openvinotoolkit.org/2019_R1/_docs_install_guides_PAC_Configure_2018R5.html).
|
||||
## Product Change Notice
|
||||
Intel® Distribution of OpenVINO™ toolkit for Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA and the Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA
|
||||
|
||||
## Get Started
|
||||
<table>
|
||||
<tr>
|
||||
<td><strong>Change Notice Begins</strong></td>
|
||||
<td>July 2020</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Change Date</strong></td>
|
||||
<td>October 2020</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
The following describes the set-up of the Intel® Distribution of OpenVINO™ toolkit on CentOS* 7.4 or Ubuntu* 16.04, kernel 4.15. This is based upon a completely fresh install of the OS with developer tools included. Official Intel® documentation for the install process can be found in the following locations and it is highly recommended that these are read, especially for new users. This document serves as a guide, and in some cases, adds additional detail where necessary.
|
||||
Intel will be transitioning to the next-generation programmable deep-learning solution based on FPGAs in order to increase the level of customization possible in FPGA deep-learning. As part of this transition, future standard releases (i.e., non-LTS releases) of Intel® Distribution of OpenVINO™ toolkit will no longer include the Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA and the Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA.
|
||||
|
||||
[Intel® Acceleration Stack for FPGAs Quick Start Guide](https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/ug/ug-qs-ias-v1-2-1.pdf)
|
||||
Intel® Distribution of OpenVINO™ toolkit 2020.3.X LTS release will continue to support Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA and the Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA. For questions about next-generation programmable deep-learning solutions based on FPGAs, please talk to your sales representative or contact us to get the latest FPGA updates.
|
||||
|
||||
[OpenCL™ on Intel® PAC Quick Start Guide](https://www.intel.com/content/dam/altera-www/global/en_US/pdfs/literature/ug/ug-qs-ias-opencl-a10.pdf)
|
||||
|
||||
[Installing the Intel® Distribution of OpenVINO™ toolkit for Linux*](https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_linux.html)
|
||||
|
||||
(Optional): Install NTFS support for transferring large installers if already downloaded on another machine.
|
||||
```sh
|
||||
sudo yum -y install epel-release
|
||||
```
|
||||
```sh
|
||||
sudo yum -y install ntfs-3g
|
||||
```
|
||||
|
||||
## Install Intel® PAC and the Intel® Programmable Acceleration Card Stack
|
||||
|
||||
1. Download version 1.2.1 of the Acceleration Stack for Runtime from the [Intel FPGA Acceleration Hub](https://www.altera.com/solutions/acceleration-hub/downloads.html).
|
||||
This downloads as `a10_gx_pac_ias_1_2_1_pv_rte.tar.gz`. Let it download to `~/Downloads`.
|
||||
|
||||
2. Create a new directory to install to:
|
||||
```sh
|
||||
mkdir -p ~/tools/intelrtestack
|
||||
```
|
||||
|
||||
3. Untar and launch the installer:
|
||||
```sh
|
||||
cd ~/Downloads
|
||||
```
|
||||
```sh
|
||||
tar xf a10_gx_pac_ias_1_2_1_pv_rte.tar.gz
|
||||
```
|
||||
```sh
|
||||
cd a10_gx_pac_ias_1_2_1_pv_rte_installer
|
||||
```
|
||||
```sh
|
||||
./setup.sh
|
||||
```
|
||||
|
||||
4. Select **Y** to install OPAE and accept license and when asked, specify `/home/<user>/tools/intelrtestack` as the absolute install path. During the installation there should be a message stating the directory already exists as it was created in the first command above. Select **Y** to install to this directory. If this message is not seen, it suggests that there was a typo when entering the install location.
|
||||
|
||||
5. Tools are installed to the following directories:
|
||||
* OpenCL™ Run-time Environment: `~/tools/intelrtestack/opencl_rte/aclrte-linux64`
|
||||
* Intel® Acceleration Stack for FPGAs: `~/tools/intelrtestack/a10_gx_pac_ias_1_2_1_pv`
|
||||
|
||||
7. Check the version of the FPGA Interface Manager firmware on the PAC board.
|
||||
```sh
|
||||
sudo fpgainfo fme
|
||||
```
|
||||
|
||||
8. If the reported FIM (`Pr Interface Id`) is not `38d782e3-b612-5343-b934-2433e348ac4c` then follow the instructions in Appendix A: Updating the FIM and BMC Firmware of the [Intel® Acceleration Stack for FPGAs Quick Start Guide](https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/ug/ug-qs-ias-v1-2-1.pdf) to update the FIM and BMC.
|
||||
|
||||
9. Run the built in self-test to verify operation of the Acceleration Stack and Intel® PAC in a non-virtualized environment.
|
||||
```sh
|
||||
sudo sh -c "echo 20 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages"
|
||||
```
|
||||
```sh
|
||||
source ~/tools/intelrtestack/init_env.sh
|
||||
```
|
||||
```sh
|
||||
sudo fpgabist $OPAE_PLATFORM_ROOT/hw/samples/nlb_mode_3/bin/nlb_mode_3.gbs
|
||||
```
|
||||
|
||||
## Verify the Intel® Acceleration Stack for FPGAs OpenCL™ BSP
|
||||
|
||||
1. Remove any previous FCD files that may be from previous installations of hardware in the `/opt/Intel/OpenCL/Boards/` directory:
|
||||
```sh
|
||||
cd /opt/Intel/OpenCL/Boards
|
||||
sudo rm -rf *.fcd
|
||||
```
|
||||
|
||||
2. Install `lsb_release` on your system if you are using CentOS:
|
||||
```sh
|
||||
sudo yum install redhat-lsb-core
|
||||
```
|
||||
|
||||
3. Create an initialization script `~/init_openvino.sh` with the following content that can be run upon opening a new terminal or rebooting. This will source the script ran above as well as setting up the OpenCL™ environment.
|
||||
```sh
|
||||
source $HOME/tools/intelrtestack/init_env.sh
|
||||
```
|
||||
```sh
|
||||
export CL_CONTEXT_COMPILER_MODE_ALTERA=3
|
||||
```
|
||||
```sh
|
||||
export CL_CONTEXT_COMPILER_MODE_INTELFPGA=3
|
||||
```
|
||||
```sh
|
||||
export INTELFPGAOCLSDKROOT="/opt/altera/aocl-pro-rte/aclrte-linux64"
|
||||
```
|
||||
```sh
|
||||
export ALTERAOCLSDKROOT="$INTELFPGAOCLSDKROOT"
|
||||
```
|
||||
```sh
|
||||
export AOCL_BOARD_PACKAGE_ROOT="$OPAE_PLATFORM_ROOT/opencl/opencl_bsp"
|
||||
```
|
||||
```sh
|
||||
$AOCL_BOARD_PACKAGE_ROOT/linux64/libexec/setup_permissions.sh
|
||||
```
|
||||
```sh
|
||||
source $INTELFPGAOCLSDKROOT/init_opencl.sh
|
||||
```
|
||||
|
||||
4. Source the script:
|
||||
```sh
|
||||
source ~/init_openvino.sh
|
||||
```
|
||||
|
||||
5. Some of the settings made in the child scripts need a reboot to take effect. Reboot the machine and source the script again. Note that this script should be sourced each time a new terminal is opened for use with the Intel® Acceleration Stack for FPGAs and Intel® Distribution of OpenVINO™ toolkit.
|
||||
```sh
|
||||
source ~/init_openvino.sh
|
||||
```
|
||||
|
||||
6. Install the OpenCL™ driver:
|
||||
```sh
|
||||
cd ~
|
||||
```
|
||||
```sh
|
||||
sudo -E ./tools/intelrtestack/opencl_rte/aclrte-linux64/bin/aocl install
|
||||
```
|
||||
Select **Y** when asked to install the BSP. Note that the following warning can be safely ignored.
|
||||
```sh
|
||||
WARNING: install not implemented. Please refer to DCP Quick Start User Guide.
|
||||
```
|
||||
|
||||
7. Program the Intel® PAC board with a pre-compiled `.aocx` file (OpenCL™ based FPGA bitstream).
|
||||
```sh
|
||||
cd $OPAE_PLATFORM_ROOT/opencl
|
||||
```
|
||||
```sh
|
||||
aocl program acl0 hello_world.aocx
|
||||
```
|
||||
|
||||
8. Build and run the Hello World application:
|
||||
```sh
|
||||
sudo tar xf exm_opencl_hello_world_x64_linux.tgz
|
||||
```
|
||||
```sh
|
||||
sudo chmod -R a+w hello_world
|
||||
```
|
||||
```sh
|
||||
cd hello_world
|
||||
```
|
||||
```sh
|
||||
make
|
||||
```
|
||||
```sh
|
||||
cp ../hello_world.aocx ./bin
|
||||
```
|
||||
```sh
|
||||
./bin/host
|
||||
```
|
||||
|
||||
## Add Intel® Distribution of OpenVINO™ toolkit with FPGA Support to Environment Variables
|
||||
|
||||
1. To run the Intel® Distribution of OpenVINO™ toolkit, add the last four commands to the `~/init_openvino.sh` script. The previous content is shown as well.
|
||||
```sh
|
||||
source $HOME/tools/intelrtestack/init_env.sh
|
||||
export CL_CONTEXT_COMPILER_MODE_ALTERA=3
|
||||
export CL_CONTEXT_COMPILER_MODE_INTELFPGA=3
|
||||
export INTELFPGAOCLSDKROOT="/opt/altera/aocl-pro-rte/aclrte-linux64"
|
||||
export ALTERAOCLSDKROOT="$INTELFPGAOCLSDKROOT"
|
||||
export AOCL_BOARD_PACKAGE_ROOT="$OPAE_PLATFORM_ROOT/opencl/opencl_bsp"
|
||||
$AOCL_BOARD_PACKAGE_ROOT/linux64/libexec/setup_permissions.sh
|
||||
source $INTELFPGAOCLSDKROOT/init_opencl.sh
|
||||
export IE_INSTALL="/opt/intel/openvino/deployment_tools"
|
||||
source $IE_INSTALL/../bin/setupvars.sh
|
||||
export PATH="$PATH:$HOME/inference_engine_samples_build/intel64/Release"
|
||||
alias mo="python3.6 $IE_INSTALL/model_optimizer/mo.py"
|
||||
```
|
||||
For Ubuntu systems, it is recommended to use python3.5 above instead of python3.6.
|
||||
|
||||
2. Source the script
|
||||
```sh
|
||||
source ~/init_openvino.sh
|
||||
```
|
||||
|
||||
## Program a Bitstream
|
||||
|
||||
The bitstream you program should correspond to the topology you want to deploy. In this section, you program a SqueezeNet bitstream and deploy the classification sample with a SqueezeNet model.
|
||||
|
||||
> **IMPORTANT**: Only use bitstreams from the installed version of the Intel® Distribution of OpenVINO™ toolkit. Bitstreams from older versions of the Intel® Distribution of OpenVINO™ toolkit are incompatible with later versions. For example, you cannot use the `2020-3_RC_FP16_AlexNet_GoogleNet_Generic` bitstream, when the Intel® Distribution of OpenVINO™ toolkit supports the `2020-4_RC_FP16_AlexNet_GoogleNet_Generic bitstream`.
|
||||
|
||||
There are different folders for each FPGA card type which were downloaded in the Intel® Distribution of OpenVINO™ toolkit package.
|
||||
For the Intel® Programmable Acceleration Card with Intel® Arria® 10 FPGA GX, the pre-trained bitstreams are in the `/opt/intel/openvino/bitstreams/a10_dcp_bitstreams` directory. This example uses a SqueezeNet bitstream with low precision for the classification sample.
|
||||
|
||||
Program the bitstream for Intel® Programmable Acceleration Card with Intel® Arria® 10 FPGA GX.
|
||||
```sh
|
||||
aocl program acl0 /opt/intel/openvino/bitstreams/a10_dcp_bitstreams/2020-4_RC_FP11_InceptionV1_ResNet_SqueezeNet_TinyYolo_YoloV3.aocx
|
||||
```
|
||||
|
||||
## Use the Intel® Distribution of OpenVINO™ toolkit
|
||||
|
||||
1. Run inference with the Intel® Distribution of OpenVINO™ toolkit independent of the demo scripts using the SqueezeNet model that was download by the scripts. For convenience, copy the necessary files to a local directory. If the workstation has been rebooted or a new terminal is opened, source the script above first.
|
||||
```sh
|
||||
mkdir ~/openvino_test
|
||||
```
|
||||
```sh
|
||||
cd ~/openvino_test
|
||||
```
|
||||
```sh
|
||||
cp ~/openvino_models/models/public/squeezenet1.1/squeezenet1.1.* .
|
||||
```
|
||||
```sh
|
||||
cp ~/openvino_models/ir/public/squeezenet1.1/FP16/squeezenet1.1.labels .
|
||||
```
|
||||
|
||||
2. Note that the `squeezenet1.1.labels` file contains the classes used by ImageNet and is included here so that the inference results show text rather than classification numbers. Convert the model with the [Model Optimizer](https://docs.openvinotoolkit.org/latest/_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html). Note that the command below uses the alias defined in the script above and is not referred to in other documentation.
|
||||
```sh
|
||||
mo --input_model squeezenet1.1.caffemodel
|
||||
```
|
||||
|
||||
3. Now run Inference on the CPU using one of the built in Inference Engine samples:
|
||||
```sh
|
||||
classification_sample_async -m squeezenet1.1.xml -i $IE_INSTALL/demo/car.png
|
||||
```
|
||||
|
||||
4. Add the `-d` option to run on FPGA:
|
||||
```sh
|
||||
classification_sample_async -m squeezenet1.1.xml -i $IE_INSTALL/demo/car.png -d HETERO:FPGA,CPU
|
||||
```
|
||||
|
||||
Congratulations, You are done with the Intel® Distribution of OpenVINO™ toolkit installation for FPGA. To learn more about how the Intel® Distribution of OpenVINO™ toolkit works, the Hello World tutorial and are other resources are provided below.
|
||||
|
||||
## Hello World Face Detection Tutorial
|
||||
|
||||
Use the [Intel® Distribution of OpenVINO™ toolkit with FPGA Hello World Face Detection Exercise](https://github.com/fritzboyle/openvino-with-fpga-hello-world-face-detection) to learn more about how the software and hardware work together.
|
||||
|
||||
## Additional Resources
|
||||
|
||||
Intel® Distribution of OpenVINO™ toolkit home page: [https://software.intel.com/en-us/openvino-toolkit](https://software.intel.com/en-us/openvino-toolkit)
|
||||
|
||||
Intel® Distribution of OpenVINO™ toolkit documentation: [https://docs.openvinotoolkit.org](https://docs.openvinotoolkit.org)
|
||||
|
||||
Inference Engine FPGA plugin documentation: [https://docs.openvinotoolkit.org/latest/_docs_IE_DG_supported_plugins_FPGA.html](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_supported_plugins_FPGA.html)
|
||||
For documentation for previous releases of Intel® Distribution of OpenVINO™ toolkit for Linux* with FPGA Support, see documentation for the [2020.4 version](https://docs.openvinotoolkit.org/2020.4/openvino_docs_install_guides_PAC_Configure.html) and lower.
|
||||
@@ -1,326 +1,21 @@
|
||||
# Configuration Guide for the Intel® Distribution of OpenVINO™ toolkit 2020.4 and the Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA SG2 (IEI's Mustang-F100-A10) on Linux* {#openvino_docs_install_guides_VisionAcceleratorFPGA_Configure}
|
||||
|
||||
> **NOTE**: Intel® Arria® 10 FPGA (Mustang-F100-A10) Speed Grade 1 is not available since the OpenVINO 2020.3 release. If you use Intel® Vision Accelerator Design with an Intel® Arria 10 FPGA (Mustang-F100-A10) Speed Grade 1, we recommend continuing to use the [Intel® Distribution of OpenVINO™ toolkit 2020.1](https://docs.openvinotoolkit.org/2020.1/_docs_install_guides_VisionAcceleratorFPGA_Configure.html) release.
|
||||
For previous versions, see [Configuration Guide for OpenVINO 2019R3](https://docs.openvinotoolkit.org/2019_R3.1/_docs_install_guides_VisionAcceleratorFPGA_Configure_2019R3.html), [Configuration Guide for OpenVINO 2019R1](https://docs.openvinotoolkit.org/2019_R3.1/_docs_install_guides_VisionAcceleratorFPGA_Configure_2019R1.html), [Configuration Guide for OpenVINO 2018R5](https://docs.openvinotoolkit.org/2019_R3.1/_docs_install_guides_VisionAcceleratorFPGA_Configure_2018R5.html).
|
||||
## Product Change Notice
|
||||
Intel® Distribution of OpenVINO™ toolkit for Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA and the Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA
|
||||
|
||||
## 1. Configure and Set Up the Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA
|
||||
<table>
|
||||
<tr>
|
||||
<td><strong>Change Notice Begins</strong></td>
|
||||
<td>July 2020</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Change Date</strong></td>
|
||||
<td>October 2020</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
1. Download [Intel® Quartus® Prime Programmer and Tools Standard Edition 18.1](http://fpgasoftware.intel.com/18.1/?edition=standard&platform=linux&download_manager=direct#tabs-4). Install the Intel® Quartus® Prime Programmer and Tools Software to the `/home/<user>/intelFPGA/18.1` directory.
|
||||
Intel will be transitioning to the next-generation programmable deep-learning solution based on FPGAs in order to increase the level of customization possible in FPGA deep-learning. As part of this transition, future standard releases (i.e., non-LTS releases) of Intel® Distribution of OpenVINO™ toolkit will no longer include the Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA and the Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA.
|
||||
|
||||
2. Download the [fpga_install.sh](https://docs.openvinotoolkit.org/downloads/2020/2/fpga_install.sh) script to the `/home/<user>` directory.
|
||||
Intel® Distribution of OpenVINO™ toolkit 2020.3.X LTS release will continue to support Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA and the Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA. For questions about next-generation programmable deep-learning solutions based on FPGAs, please talk to your sales representative or contact us to get the latest FPGA updates.
|
||||
|
||||
a. Switch to superuser:
|
||||
```sh
|
||||
sudo su
|
||||
```
|
||||
b. Use the `fpga_install.sh` script from `/home/<user>` to install your FPGA card (default is SG2).
|
||||
```sh
|
||||
source /home/<user>/fpga_install.sh
|
||||
```
|
||||
c. To know more about the fpga_install options, invoke the script with `-h` command.
|
||||
```sh
|
||||
source /home/<user>/fpga_install.sh -h
|
||||
```
|
||||
d. Follow the `fpga_install.sh` script prompts to finish installing your FPGA card.
|
||||
|
||||
e. After reboot launch the script again with same options as in step 2.b.
|
||||
|
||||
f. The `fpga_install.sh` script creates an initialization script `/home/<user>/init_openvino.sh` that should be used to setup proper environment variables.
|
||||
|
||||
g. To test if FPGA card was installed succesfully run `aocl diagnose`:
|
||||
```sh
|
||||
aocl diagnose
|
||||
```
|
||||
You should see `DIAGNOSTIC_PASSED` before proceeding to the next steps.
|
||||
|
||||
h. If you prefer to install the FPGA card manually, follow the steps 3-17 in this section and [Steps to Flash the FPGA Card](#steps-to-flash-the-fpga-card), otherwise you can skip to "Program a Bitstream".
|
||||
|
||||
3. Check if /etc/udev/rules.d/51-usbblaster.rules file exists and content matches with 3.b, if it does skip to next step.
|
||||
|
||||
a. Switch to superuser:
|
||||
```sh
|
||||
sudo su
|
||||
```
|
||||
|
||||
b. Create a file named /etc/udev/rules.d/51-usbblaster.rules and add the following lines to it (Red Hat Enterprise 5 and above):
|
||||
```sh
|
||||
# Intel FPGA Download Cable
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6001", MODE="0666"
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6002", MODE="0666"
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6003", MODE="0666"
|
||||
|
||||
# Intel FPGA Download Cable II
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6010", MODE="0666"
|
||||
SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6810", MODE="0666"
|
||||
```
|
||||
> **CAUTION**: Do not add extra line breaks to the .rules file.
|
||||
|
||||
c. Reload udev rules without reboot:
|
||||
```sh
|
||||
udevadm control --reload-rules
|
||||
udevadm trigger
|
||||
```
|
||||
|
||||
d. You can exit superuser if you wish.
|
||||
|
||||
|
||||
4. Unpack the BSP for your Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA SG2:
|
||||
> **NOTE**: If you installed OpenVINO™ as root you will need to switch to superuser
|
||||
```sh
|
||||
cd /opt/intel/openvino/bitstreams/a10_vision_design_sg2_bitstreams/BSP/
|
||||
sudo su
|
||||
tar -xvzf a10_1150_sg2_r4.1.tgz
|
||||
chmod -R 755 /opt/intel/openvino/bitstreams/a10_vision_design_sg2_bitstreams
|
||||
```
|
||||
> **NOTE**: If you do not know which version of the board you have, please refer to the product label on the fan cover side or by the product SKU: Mustang-F100-A10E-R10 => SG2
|
||||
|
||||
5. Create an initialization script `/home/<user>/init_openvino.sh` with the following content that can be run upon opening a new terminal or rebooting. This will setup your proper environment variables.
|
||||
```sh
|
||||
export IOCL_BOARD_PACKAGE_ROOT=/opt/intel/openvino/bitstreams/a10_vision_design_sg2_bitstreams/BSP/a10_1150_sg2
|
||||
export AOCL_BOARD_PACKAGE_ROOT=/opt/intel/openvino/bitstreams/a10_vision_design_sg2_bitstreams/BSP/a10_1150_sg2
|
||||
export QUARTUS_DIR=/home/<user>/intelFPGA/18.1/qprogrammer
|
||||
export QUARTUS_ROOTDIR=/home/<user>/intelFPGA/18.1/qprogrammer
|
||||
export INTELFPGAOCLSDKROOT=/opt/altera/aocl-pro-rte/aclrte-linux64
|
||||
source $INTELFPGAOCLSDKROOT/init_opencl.sh
|
||||
export PATH=$PATH:$INTELFPGAOCLSDKROOT/host/linux64/bin:$QUARTUS_ROOTDIR/bin
|
||||
export CL_CONTEXT_COMPILER_MODE_INTELFPGA=3
|
||||
source /opt/intel/openvino/bin/setupvars.sh
|
||||
```
|
||||
|
||||
6. Source the script. (This assumes you already have installed the Intel® FPGA Runtime Environment for OpenCL Linux x86-64 Pro Edition 19.1)
|
||||
```sh
|
||||
source /home/<user>/init_openvino.sh
|
||||
```
|
||||
|
||||
7. Uninstall any previous BSP before installing the OpenCL BSP for the 2020.4 BSP. Enter **Y** when prompted to uninstall (Enter sudo credentials when prompted):
|
||||
```sh
|
||||
aocl uninstall
|
||||
```
|
||||
|
||||
8. Install the new BSP. Enter **Y** when prompted to install (Enter sudo credentials when prompted):
|
||||
```sh
|
||||
aocl install
|
||||
```
|
||||
|
||||
9. Set up the USB Blaster:
|
||||
|
||||
1. Connect the cable between the board and the host system. Use the letter codes in the diagram below for the connection points:
|
||||
|
||||
2. Connect the B end of the cable to point B on the board.
|
||||
|
||||
3. Connect the F end of the cable to point F on the FPGA download cable.
|
||||
|
||||
4. From point F end of the cable to point F on the FPGA download cable, the connection is as shown:
|
||||

|
||||
|
||||
10. Run `jtagconfig` to ensure that your Intel FPGA Download Cable driver is ready to use:
|
||||
```sh
|
||||
jtagconfig
|
||||
```
|
||||
Your output is similar to:
|
||||
```sh
|
||||
1) USB-Blaster [1-6]
|
||||
02E660DD 10AX115H1(.|E2|ES)/10AX115H2/..
|
||||
```
|
||||
or:
|
||||
```sh
|
||||
1) USB-BlasterII [3-3]
|
||||
02E660DD 10AX115H1(.|E2|ES)/10AX115H2/..
|
||||
```
|
||||
|
||||
11. Use `jtagconfig` to slow the clock. The message "No parameter named JtagClock" can be safely ignored.
|
||||
```sh
|
||||
jtagconfig --setparam 1 JtagClock 6M
|
||||
```
|
||||
|
||||
12. (OPTIONAL) Confirm the clock is set to 6M:
|
||||
```sh
|
||||
jtagconfig --getparam 1 JtagClock
|
||||
```
|
||||
You should see the following:
|
||||
```sh
|
||||
6M
|
||||
```
|
||||
|
||||
13. Go to `/opt/intel/openvino/bitstreams/a10_vision_design_sg2_bitstreams/BSP/a10_1150_sg2/bringup`, where `sg2_boardtest_2ddr_base.sof`is located:
|
||||
```sh
|
||||
cd /opt/intel/openvino/bitstreams/a10_vision_design_sg2_bitstreams/BSP/a10_1150_sg2/bringup
|
||||
```
|
||||
|
||||
14. Program the new sof file to the board:
|
||||
```sh
|
||||
quartus_pgm -c 1 -m JTAG -o "p;sg2_boardtest_2ddr_base.sof"
|
||||
```
|
||||
|
||||
15. Soft reboot:
|
||||
```sh
|
||||
reboot
|
||||
```
|
||||
|
||||
16. Source the environment variable script you made.
|
||||
```sh
|
||||
source /home/<user>/init_openvino.sh
|
||||
```
|
||||
|
||||
17. Run `aocl diagnose`:
|
||||
```sh
|
||||
aocl diagnose
|
||||
```
|
||||
Your screen displays `DIAGNOSTIC_PASSED`.
|
||||
|
||||
> **NOTE**: at this point if you do not want to flash the FPGA Card you can go to "Program a Bitstream"
|
||||
|
||||
### <a name="steps-to-flash-the-fpga-card"></a>Steps to Flash the FPGA Card
|
||||
|
||||
> **NOTE**:
|
||||
> - To avoid having to reprogram the board after a power down, a bitstream will be programmed to permanent memory on the Intel® Vision Accelerator Design with Intel® Arria® 10 FPGA. This will take about 20 minutes.
|
||||
> - The steps can be followed below in this guide to do this.
|
||||
|
||||
18. Use `jtagconfig` to slow the clock. The message "No parameter named JtagClock" can be safely ignored.
|
||||
```sh
|
||||
jtagconfig --setparam 1 JtagClock 6M
|
||||
```
|
||||
|
||||
19. Check if $QUARTUS_ROOTDIR/linux64/perl/bin exists
|
||||
```sh
|
||||
ls $QUARTUS_ROOTDIR/linux64/perl/bin
|
||||
```
|
||||
|
||||
20. If you see message "ls: cannot access /home/<user>/intelFPGA/18.1/qprogrammer/linux64/perl/bin: No such file or directory" create perl/bin directory and a symbolic link to perl
|
||||
```sh
|
||||
mkdir -p $QUARTUS_ROOTDIR/linux64/perl/bin
|
||||
ln -s /usr/bin/perl $QUARTUS_ROOTDIR/linux64/perl/bin/perl
|
||||
```
|
||||
|
||||
21. If you see message "perl" go to the next step
|
||||
|
||||
22. Go to `/opt/intel/openvino/bitstreams/a10_vision_design_sg2_bitstreams/BSP/a10_1150_sg2/bringup`, where `sg2_boardtest_2ddr_top.aocx` is located:
|
||||
```sh
|
||||
cd /opt/intel/openvino/bitstreams/a10_vision_design_sg2_bitstreams/BSP/a10_1150_sg2/bringup
|
||||
```
|
||||
|
||||
23. Program the `sg2_boardtest_2ddr_top.aocx` file to the flash to be made permanently available even after power cycle:
|
||||
```sh
|
||||
sudo su
|
||||
aocl flash acl0 sg2_boardtest_2ddr_top.aocx
|
||||
```
|
||||
> **NOTE**: You will need the USB Blaster for this.
|
||||
|
||||
24. Hard reboot the host system including powering off.
|
||||
|
||||
25. Source the environment variable script you made.
|
||||
```sh
|
||||
source /home/<user>/init_openvino.sh
|
||||
```
|
||||
|
||||
26. Check if the host system recognizes the Intel® Vision Accelerator Design with Intel® Arria® 10 FPGA board. Confirm you can detect the PCIe card:
|
||||
```sh
|
||||
lspci | grep -i Altera
|
||||
```
|
||||
Your output is similar to:
|
||||
```sh
|
||||
01:00.0 Processing accelerators: Altera Corporation Device 2494 (rev 01)
|
||||
```
|
||||
|
||||
27. Run `aocl diagnose`:
|
||||
```sh
|
||||
aocl diagnose
|
||||
```
|
||||
You should see `DIAGNOSTIC_PASSED` before proceeding to the next steps.
|
||||
|
||||
## 2. Program a Bitstream
|
||||
|
||||
The bitstream you program should correspond to the topology you want to deploy. In this section, you program a SqueezeNet bitstream and deploy the classification sample with a SqueezeNet model that you used the Model Optimizer to convert in the steps before.
|
||||
|
||||
> **IMPORTANT**: Only use bitstreams from the installed version of the Intel® Distribution of OpenVINO™ toolkit. Bitstreams from older versions of the Intel® Distribution of OpenVINO™ toolkit are incompatible with later versions of the Intel® Distribution of OpenVINO™ toolkit. For example, you cannot use the `2019R4_PL2_FP11_AlexNet_GoogleNet_Generic` bitstream, when the Intel® Distribution of OpenVINO™ toolkit supports the `2020-2_PL2_FP11_AlexNet_GoogleNet_Generic` bitstream.
|
||||
|
||||
Depending on how many bitstreams you selected, there are different folders for each FPGA card type which were downloaded in the Intel® Distribution of OpenVINO™ toolkit package:
|
||||
|
||||
1. For the Intel® Vision Accelerator Design with Intel® Arria® 10 FPGA SG2, the pre-trained bitstreams are in `/opt/intel/openvino/bitstreams/a10_vision_design_sg2_bitstreams/`. This example uses a SqueezeNet bitstream with low precision for the classification sample.
|
||||
|
||||
2. Source the environment variable script you made.
|
||||
```sh
|
||||
source /home/<user>/init_openvino.sh
|
||||
```
|
||||
|
||||
3. Change to your home directory:
|
||||
```sh
|
||||
cd /home/<user>
|
||||
```
|
||||
|
||||
4. Program the bitstream for the Intel® Vision Accelerator Design with Intel® Arria® 10 FPGA SG2:
|
||||
```sh
|
||||
aocl program acl0 /opt/intel/openvino/bitstreams/a10_vision_design_sg2_bitstreams/2020-4_PL2_FP16_SqueezeNet_TinyYolo_VGG.aocx
|
||||
```
|
||||
|
||||
## 3. Set up a Sample Neural Network Model for FPGA
|
||||
|
||||
> **NOTE**: The SqueezeNet Caffe* model was already downloaded and converted to an FP16 IR when you ran the Image Classification Verification Script while [installing the Intel® Distribution of OpenVINO™ toolkit for Linux* with FPGA Support](installing-openvino-linux-fpga.md). Read this section only if you want to convert the model manually, otherwise skip and go to the next section to run the Image Classification sample application.
|
||||
|
||||
In this section, you will create an FP16 model suitable for hardware accelerators. For more information, see the [FPGA plugin](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_supported_plugins_FPGA.html) section in the Inference Engine Developer Guide.
|
||||
|
||||
|
||||
1. Create a directory for the FP16 SqueezeNet Model:
|
||||
```sh
|
||||
mkdir ~/squeezenet1.1_FP16
|
||||
```
|
||||
|
||||
2. Go to `~/squeezenet1.1_FP16`:
|
||||
```sh
|
||||
cd ~/squeezenet1.1_FP16
|
||||
```
|
||||
|
||||
3. Use the Model Optimizer to convert the FP16 SqueezeNet Caffe* model into an FP16 optimized Intermediate Representation (IR). The model files were downloaded when you ran the the Image Classification verification script while [installing the Intel® Distribution of OpenVINO™ toolkit for Linux* with FPGA Support](installing-openvino-linux-fpga.md). To convert, run the Model Optimizer script with the following arguments:
|
||||
```sh
|
||||
python3 /opt/intel/openvino/deployment_tools/model_optimizer/mo.py --input_model ~/openvino_models/models/public/squeezenet1.1/squeezenet1.1.caffemodel --data_type FP16 --output_dir .
|
||||
```
|
||||
|
||||
4. The `squeezenet1.1.labels` file contains the classes `ImageNet` uses. This file is included so that the inference results show text instead of classification numbers. Copy `squeezenet1.1.labels` to the your optimized model location:
|
||||
```sh
|
||||
cp /opt/intel/openvino/deployment_tools/demo/squeezenet1.1.labels .
|
||||
```
|
||||
|
||||
5. Copy a sample image to the release directory. You will use this with your optimized model:
|
||||
```sh
|
||||
cp /opt/intel/openvino/deployment_tools/demo/car.png ~/inference_engine_samples_build/intel64/Release
|
||||
```
|
||||
|
||||
## 4. Run the Image Classification Sample Application
|
||||
|
||||
In this section you will run the Image Classification sample application, with the Caffe* Squeezenet1.1 model on your Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA.
|
||||
|
||||
Image Classification sample application binary file was automatically built and the FP16 model IR files are created when you ran the Image Classification Verification Script while [installing the Intel® Distribution of OpenVINO™ toolkit for Windows* with FPGA Support](installing-openvino-windows-fpga.md):
|
||||
* Compiled sample Application binaries are located in the `~/inference_engine_samples_build/intel64/Release` directory.
|
||||
* Generated IR files are in the `~/openvino_models/ir/public/squeezenet1.1/FP16/` directory.
|
||||
|
||||
|
||||
1. Go to the samples directory
|
||||
```sh
|
||||
cd ~/inference_engine_samples_build/intel64/Release
|
||||
```
|
||||
|
||||
2. Use an Inference Engine sample to run a sample inference on the CPU:
|
||||
```sh
|
||||
./classification_sample_async -i car.png -m ~/openvino_models/ir/public/squeezenet1.1/FP16/squeezenet1.1.xml
|
||||
```
|
||||
Note the CPU throughput in Frames Per Second (FPS). This tells you how quickly the inference is done on the hardware. Now run the inference using the FPGA.
|
||||
|
||||
3. Add the `-d` option to target the FPGA:
|
||||
```sh
|
||||
./classification_sample_async -i car.png -m ~/openvino_models/ir/public/squeezenet1.1/FP16/squeezenet1.1.xml -d HETERO:FPGA,CPU
|
||||
```
|
||||
The throughput on FPGA is listed and may show a lower FPS. This may be due to the initialization time. To account for that, increase the number of iterations or batch size when deploying to get a better sense of the speed the FPGA can run inference at.
|
||||
|
||||
Congratulations, you are done with the Intel® Distribution of OpenVINO™ toolkit installation for FPGA. To learn more about how the Intel® Distribution of OpenVINO™ toolkit works, the Hello World tutorial and are other resources are provided below.
|
||||
|
||||
## Hello World Face Detection Tutorial
|
||||
|
||||
Use the [Intel® Distribution of OpenVINO™ toolkit with FPGA Hello World Face Detection Exercise](https://github.com/fritzboyle/openvino-with-fpga-hello-world-face-detection) to learn more about how the software and hardware work together.
|
||||
|
||||
## Additional Resources
|
||||
|
||||
Intel® Distribution of OpenVINO™ toolkit home page: [https://software.intel.com/en-us/openvino-toolkit](https://software.intel.com/en-us/openvino-toolkit)
|
||||
|
||||
Intel® Distribution of OpenVINO™ toolkit documentation: [https://docs.openvinotoolkit.org/](https://docs.openvinotoolkit.org/)
|
||||
|
||||
Inference Engine FPGA plugin documentation: [https://docs.openvinotoolkit.org/latest/_docs_IE_DG_supported_plugins_FPGA.html](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_supported_plugins_FPGA.html)
|
||||
For documentation for previous releases of Intel® Distribution of OpenVINO™ toolkit for Linux* with FPGA Support, see documentation for the [2020.4 version](https://docs.openvinotoolkit.org/2020.4/openvino_docs_install_guides_VisionAcceleratorFPGA_Configure.html) and lower.
|
||||
@@ -1,115 +1,21 @@
|
||||
# Configuration Guide for the Intel® Distribution of OpenVINO™ toolkit and the Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA SG2 (IEI's Mustang-F100-A10) on Windows* {#openvino_docs_install_guides_VisionAcceleratorFPGA_Configure_Windows}
|
||||
|
||||
> **NOTE**: Intel® Arria® 10 FPGA (Mustang-F100-A10) Speed Grade 1 is not available in the OpenVINO 2020.3 package.
|
||||
## Product Change Notice
|
||||
Intel® Distribution of OpenVINO™ toolkit for Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA and the Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA
|
||||
|
||||
## 1. Configure and Set Up the Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA
|
||||
<table>
|
||||
<tr>
|
||||
<td><strong>Change Notice Begins</strong></td>
|
||||
<td>July 2020</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Change Date</strong></td>
|
||||
<td>October 2020</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
1. Download [Intel® Quartus® Prime Programmer and Tools Standard Edition 18.1](http://fpgasoftware.intel.com/18.1/?edition=standard&platform=windows&download_manager=direct#tabs-4). Install the Intel® Quartus® Prime Programmer and Tools Software to the `C:\intelFPGA\18.1` directory.
|
||||
Intel will be transitioning to the next-generation programmable deep-learning solution based on FPGAs in order to increase the level of customization possible in FPGA deep-learning. As part of this transition, future standard releases (i.e., non-LTS releases) of Intel® Distribution of OpenVINO™ toolkit will no longer include the Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA and the Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA.
|
||||
|
||||
2. Download [OpenSSL](http://slproweb.com/download/Win64OpenSSL_Light-1_1_1f.exe). Install the OpenSSL and add the `<install location>\bin` path to your system `PATH` variable.
|
||||
Intel® Distribution of OpenVINO™ toolkit 2020.3.X LTS release will continue to support Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA and the Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA. For questions about next-generation programmable deep-learning solutions based on FPGAs, please talk to your sales representative or contact us to get the latest FPGA updates.
|
||||
|
||||
3. Unpack the BSP for your Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA SG2:
|
||||
Extract `Intel_vision_accel_win_driver_1.2_SG2.zip` from `C:\Program Files (x86)\IntelSWTools\openvino\a10_vision_design_sg2_bitstreams\BSP` to `C:\intelFPGA\19.2\aclrte-windows64\board`
|
||||
5. Open an admin command prompt.
|
||||
6. Setup your environment variables:
|
||||
```sh
|
||||
set INTELFPGAOCLSDKROOT=C:\intelFPGA\19.2\aclrte-windows64
|
||||
set AOCL_BOARD_PACKAGE_ROOT=%INTELFPGAOCLSDKROOT%\board\a10_1150_sg2
|
||||
set IOCL_BOARD_PACKAGE_ROOT=%INTELFPGAOCLSDKROOT%\board\a10_1150_sg2
|
||||
C:\intelFPGA\19.2\aclrte-windows64\init_opencl.bat
|
||||
"C:\Program Files (x86)\IntelSWTools\openvino\bin\setupvars.bat"
|
||||
```
|
||||
7. Uninstall any previous BSP before installing the OpenCL BSP for the 2020.3 BSP. Enter **Y** when prompted to uninstall:
|
||||
```sh
|
||||
aocl uninstall
|
||||
```
|
||||
8. Install the new BSP. Enter **Y** when prompted to install
|
||||
```sh
|
||||
aocl install
|
||||
```
|
||||
9. Run `aocl diagnose`:
|
||||
```sh
|
||||
aocl diagnose
|
||||
```
|
||||
Your screen displays `DIAGNOSTIC_PASSED`.
|
||||
|
||||
## 2. Program a Bitstream
|
||||
|
||||
The bitstream you program should correspond to the topology you want to deploy. In this section, you program a SqueezeNet bitstream and deploy the classification sample with a SqueezeNet model that you used the Model Optimizer to convert in the steps before.
|
||||
|
||||
> **IMPORTANT**: Only use bitstreams from the installed version of the Intel® Distribution of OpenVINO™ toolkit. Bitstreams from older versions of the Intel® Distribution of OpenVINO™ toolkit are incompatible with later versions of the Intel® Distribution of OpenVINO™ toolkit. For example, you cannot use the `2019R4_PL2_FP11_AlexNet_GoogleNet_Generic` bitstream, when the Intel® Distribution of OpenVINO™ toolkit supports the `2020-3_PL2_FP11_AlexNet_GoogleNet_Generic` bitstream.
|
||||
|
||||
Depending on how many bitstreams you selected, there are different folders for each FPGA card type which were downloaded in the Intel® Distribution of OpenVINO™ toolkit package:
|
||||
|
||||
1. For the Intel® Vision Accelerator Design with Intel® Arria® 10 FPGA SG2, the pre-trained bitstreams are in `C:\Program Files (x86)\IntelSWTools\openvino\a10_vision_design_sg2_bitstreams`. This example uses a SqueezeNet bitstream with low precision for the classification sample.
|
||||
|
||||
2. Program the bitstream for the Intel® Vision Accelerator Design with Intel® Arria® 10 FPGA SG2:
|
||||
```sh
|
||||
aocl program acl0 "C:\Program Files (x86)\IntelSWTools\openvino\a10_vision_design_sg2_bitstreams/2020-3_PL2_FP16_SqueezeNet_TinyYolo_VGG.aocx"
|
||||
```
|
||||
|
||||
## 3. Set up a Sample Neural Network Model for FPGA
|
||||
|
||||
> **NOTE**: The SqueezeNet Caffe* model was already downloaded and converted to an FP16 IR when you ran the Image Classification Verification Script while [installing the Intel® Distribution of OpenVINO™ toolkit for Windows* with FPGA Support](installing-openvino-windows-fpga.md). Read this section only if you want to convert the model manually, otherwise skip and go to the next section to run the Image Classification sample application.
|
||||
|
||||
In this section, you will prepare a sample FP16 model suitable for hardware accelerators. For more information, see the [FPGA plugin](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_supported_plugins_FPGA.html) section in the Inference Engine Developer Guide.
|
||||
|
||||
1. Create a directory for the FP16 SqueezeNet Model:
|
||||
```sh
|
||||
mkdir %HOMEPATH%\squeezenet1.1_FP16
|
||||
```
|
||||
|
||||
2. Go to `%HOMEPATH%\squeezenet1.1_FP16`:
|
||||
```sh
|
||||
cd %HOMEPATH%\squeezenet1.1_FP16
|
||||
```
|
||||
|
||||
3. Use the Model Optimizer to convert the FP16 SqueezeNet Caffe* model into an FP16 optimized Intermediate Representation (IR). The model files were downloaded when you ran the the Image Classification verification script while [installing the Intel® Distribution of OpenVINO™ toolkit for Windows* with FPGA Support](installing-openvino-windows-fpga.md). To convert, run the Model Optimizer script with the following arguments:
|
||||
```sh
|
||||
python "C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\model_optimizer\mo.py" --input_model %HOMEPATH%\Documents\Intel\OpenVINO\openvino_models\models\public\squeezenet1.1\squeezenet1.1.caffemodel --data_type FP16 --output_dir .
|
||||
```
|
||||
|
||||
4. The `squeezenet1.1.labels` file contains the classes `ImageNet` uses. This file is included so that the inference results show text instead of classification numbers. Copy `squeezenet1.1.labels` to the your optimized model location:
|
||||
```sh
|
||||
xcopy "C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\demo\squeezenet1.1.labels" .
|
||||
```
|
||||
|
||||
5. Copy a sample image to the release directory. You will use this with your optimized model:
|
||||
```sh
|
||||
xcopy "C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\demo\car.png" %HOMEPATH%\Documents\Intel\OpenVINO\inference_engine_samples_build\intel64\Release
|
||||
```
|
||||
|
||||
## 4. Run the Image Classification Sample Application
|
||||
|
||||
In this section you will run the Image Classification sample application, with the Caffe* Squeezenet1.1 model on your Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA.
|
||||
|
||||
Image Classification sample application binary file was automatically built and the FP16 model IR files are created when you ran the Image Classification Verification Script while [installing the Intel® Distribution of OpenVINO™ toolkit for Windows* with FPGA Support](installing-openvino-windows-fpga.md):
|
||||
* Compiled sample Application binaries are located in the `%HOMEPATH%\Documents\Intel\OpenVINO\inference_engine_samples_build\intel64\Release` folder.
|
||||
* Generated IR files are in the `%HOMEPATH%\Documents\Intel\OpenVINO\openvino_models\ir\public\squeezenet1.1\FP16` folder.
|
||||
|
||||
1. Go to the samples directory
|
||||
```sh
|
||||
cd %HOMEPATH%\Documents\Intel\OpenVINO\inference_engine_samples_build\intel64\Release
|
||||
```
|
||||
|
||||
2. Use an Inference Engine sample to run a sample inference on the CPU:
|
||||
```sh
|
||||
classification_sample_async -i car.png -m %HOMEPATH%\Documents\Intel\OpenVINO\openvino_models\ir\public\squeezenet1.1\FP16\squeezenet1.1.xml
|
||||
```
|
||||
Note the CPU throughput in Frames Per Second (FPS). This tells you how quickly the inference is done on the hardware. Now run the inference using the FPGA.
|
||||
|
||||
3. Add the `-d` option to target the FPGA:
|
||||
```sh
|
||||
classification_sample_async -i car.png -m %HOMEPATH%\Documents\Intel\OpenVINO\openvino_models\ir\public\squeezenet1.1\FP16\squeezenet1.1.xml -d HETERO:FPGA,CPU
|
||||
```
|
||||
The throughput on FPGA is listed and may show a lower FPS. This may be due to the initialization time. To account for that, increase the number of iterations or batch size when deploying to get a better sense of the speed the FPGA can run inference at.
|
||||
|
||||
Congratulations, you are done with the Intel® Distribution of OpenVINO™ toolkit installation for FPGA. To learn more about how the Intel® Distribution of OpenVINO™ toolkit works, try the other resources that are provided below.
|
||||
|
||||
## Additional Resources
|
||||
|
||||
Intel® Distribution of OpenVINO™ toolkit home page: [https://software.intel.com/en-us/openvino-toolkit](https://software.intel.com/en-us/openvino-toolkit)
|
||||
|
||||
Intel® Distribution of OpenVINO™ toolkit documentation: [https://docs.openvinotoolkit.org/](https://docs.openvinotoolkit.org/)
|
||||
|
||||
Inference Engine FPGA plugin documentation: [https://docs.openvinotoolkit.org/latest/_docs_IE_DG_supported_plugins_FPGA.html](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_supported_plugins_FPGA.html)
|
||||
For documentation for previous releases of Intel® Distribution of OpenVINO™ toolkit for Windows* with FPGA Support, see documentation for the [2020.4 version](https://docs.openvinotoolkit.org/2020.4/openvino_docs_install_guides_VisionAcceleratorFPGA_Configure_Windows.html) and lower.
|
||||
@@ -8,17 +8,17 @@ The Deployment Manager is a Python\* command-line tool that is delivered within
|
||||
|
||||
* Intel® Distribution of OpenVINO™ toolkit for Linux\* (version 2019 R3 or higher) or Intel® Distribution of OpenVINO™ toolkit for Windows\* (version 2019 R4 or higher) installed on your development machine.
|
||||
* Python\* 3.6 or higher is required to run the Deployment Manager.
|
||||
* To run inference on a target device other than CPU, device drivers must be pre-installed. To install, see the following steps:
|
||||
* **For Linux**:
|
||||
* [Steps for Intel® Processor Graphics (GPU)](https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_linux.html#additional-GPU-steps)
|
||||
* [Steps for Intel® Neural Compute Stick 2](https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_linux.html#additional-NCS-steps)
|
||||
* [Steps for Intel® Vision Accelerator Design with Intel® Movidius™ VPUs](https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_linux.html#install-VPU)
|
||||
* **For Windows**:
|
||||
* [Steps for Intel® Processor Graphics (GPU)](https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_windows.html#Install-GPU)
|
||||
* [Steps for the Intel® Vision Accelerator Design with Intel® Movidius™ VPUs](https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_windows.html#hddl-myriad)
|
||||
* To run inference on a target device other than CPU, device drivers must be pre-installed:
|
||||
* For **Linux**, see the following sections in the [installation instructions for Linux](../install_guides/installing-openvino-linux.md):
|
||||
* Steps for Intel® Processor Graphics (GPU) section
|
||||
* Steps for Intel® Neural Compute Stick 2 section
|
||||
* Steps for Intel® Vision Accelerator Design with Intel® Movidius™ VPUs
|
||||
* **For Windows**, see the following sections in the [installation instructions for Windows](../install_guides/installing-openvino-windows.md):
|
||||
* Steps for Intel® Processor Graphics (GPU)
|
||||
* Steps for the Intel® Vision Accelerator Design with Intel® Movidius™ VPUs
|
||||
|
||||
|
||||
> **IMPORTANT**: The operating system on the target host must be the same as the development system on which you are creating the package. For example, if the target system is Ubuntu 16.04, the deployment package must be created from the OpenVINO™ toolkit installed on Ubuntu 16.04.
|
||||
> **IMPORTANT**: The operating system on the target host must be the same as the development system on which you are creating the package. For example, if the target system is Ubuntu 18.04, the deployment package must be created from the OpenVINO™ toolkit installed on Ubuntu 18.04.
|
||||
|
||||
## Create Deployment Package Using Deployment Manager
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ This guide provides installation steps for Intel® Distribution of OpenVINO™ t
|
||||
## Set up the Repository
|
||||
### Install the GPG key for the repository
|
||||
|
||||
1. Download the public key from [https://apt.repos.intel.com/openvino/2020/GPG-PUB-KEY-INTEL-OPENVINO-2020](https://apt.repos.intel.com/openvino/2020/GPG-PUB-KEY-INTEL-OPENVINO-2020) and save it to a file.
|
||||
1. Download the public key from [https://apt.repos.intel.com/openvino/2021/GPG-PUB-KEY-INTEL-OPENVINO-2021](https://apt.repos.intel.com/openvino/2021/GPG-PUB-KEY-INTEL-OPENVINO-2021) and save it to a file.
|
||||
2. Add this key to the system keyring:
|
||||
```sh
|
||||
sudo apt-key add <PATH_TO_DOWNLOADED_GPG_KEY>
|
||||
@@ -23,7 +23,7 @@ sudo apt-key list
|
||||
|
||||
Run the following command:
|
||||
```sh
|
||||
echo "deb https://apt.repos.intel.com/openvino/2020 all main" | sudo tee /etc/apt/sources.list.d/intel-openvino-2020.list
|
||||
echo "deb https://apt.repos.intel.com/openvino/2021 all main" | sudo tee /etc/apt/sources.list.d/intel-openvino-2021.list
|
||||
```
|
||||
|
||||
### Update the list of packages
|
||||
@@ -36,11 +36,11 @@ There are full release Runtime and Developer packages, and also some available c
|
||||
|
||||
**Runtime Packages**
|
||||
- Ubuntu 18.04: `intel-openvino-runtime-ubuntu18`
|
||||
- Ubuntu 16.04: `intel-openvino-runtime-ubuntu16`
|
||||
- Ubuntu 20.04: `intel-openvino-runtime-ubuntu20`
|
||||
|
||||
**Developer Packages**
|
||||
- Ubuntu 18.04: `intel-openvino-dev-ubuntu18`
|
||||
- Ubuntu 16.04: `intel-openvino-dev-ubuntu16`
|
||||
- Ubuntu 20.04: `intel-openvino-dev-ubuntu20`
|
||||
|
||||
### Get the list of available packages
|
||||
|
||||
@@ -57,9 +57,9 @@ apt-cache search openvino
|
||||
```sh
|
||||
sudo apt-cache search intel-openvino-runtime-ubuntu18
|
||||
```
|
||||
On Ubuntu 16.04:
|
||||
On Ubuntu 20.04:
|
||||
```sh
|
||||
sudo apt-cache search intel-openvino-runtime-ubuntu16
|
||||
sudo apt-cache search intel-openvino-runtime-ubuntu20
|
||||
```
|
||||
* **Developer Packages**
|
||||
|
||||
@@ -67,9 +67,9 @@ apt-cache search openvino
|
||||
```sh
|
||||
sudo apt-cache search intel-openvino-dev-ubuntu18
|
||||
```
|
||||
On Ubuntu 16.04:
|
||||
On Ubuntu 20.04:
|
||||
```sh
|
||||
sudo apt-cache search intel-openvino-dev-ubuntu16
|
||||
sudo apt-cache search intel-openvino-dev-ubuntu20
|
||||
```
|
||||
|
||||
|
||||
@@ -97,20 +97,20 @@ sudo apt install intel-openvino-<PACKAGE_TYPE>-ubuntu<OS_VERSION>-<VERSION>.<UPD
|
||||
|
||||
On Ubuntu 18.04:
|
||||
```sh
|
||||
sudo apt install intel-openvino-runtime-ubuntu18-2020.1.023
|
||||
sudo apt install intel-openvino-runtime-ubuntu18-2021.1.105
|
||||
```
|
||||
On Ubuntu 16.04:
|
||||
On Ubuntu 20.04:
|
||||
```sh
|
||||
sudo apt install intel-openvino-runtime-ubuntu16-2020.1.023
|
||||
sudo apt install intel-openvino-runtime-ubuntu20-2021.1.105
|
||||
```
|
||||
* **Developer Package**<br>
|
||||
On Ubuntu 18.04:
|
||||
```sh
|
||||
sudo apt install intel-openvino-dev-ubuntu18-2020.1.023
|
||||
sudo apt install intel-openvino-dev-ubuntu18-2021.1.105
|
||||
```
|
||||
On Ubuntu 16.04:
|
||||
On Ubuntu 20.04:
|
||||
```sh
|
||||
sudo apt install intel-openvino-dev-ubuntu16-2020.1.023
|
||||
sudo apt install intel-openvino-dev-ubuntu20-2021.1.105
|
||||
```
|
||||
|
||||
---
|
||||
@@ -124,11 +124,11 @@ sudo apt autoremove intel-openvino-<PACKAGE_TYPE>-ubuntu<OS_VERSION>-<VERSION>.<
|
||||
|
||||
**Additional Resources**
|
||||
|
||||
- Intel® Distribution of OpenVINO™ toolkit home page: [https://software.intel.com/en-us/openvino-toolkit](https://software.intel.com/en-us/openvino-toolkit)
|
||||
- OpenVINO™ toolkit online documentation: [https://docs.openvinotoolkit.org](https://docs.openvinotoolkit.org)
|
||||
- [Model Optimizer Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html).
|
||||
- [Inference Engine Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Deep_Learning_Inference_Engine_DevGuide.html)
|
||||
- For more information on Sample Applications, see the [Inference Engine Samples Overview](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Samples_Overview.html).
|
||||
- Intel® Distribution of OpenVINO™ toolkit home page: [https://software.intel.com/en-us/openvino-toolkit](https://software.intel.com/en-us/openvino-toolkit).
|
||||
- OpenVINO™ toolkit online documentation: [https://docs.openvinotoolkit.org](https://docs.openvinotoolkit.org).
|
||||
- [Model Optimizer Developer Guide](../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md).
|
||||
- [Inference Engine Developer Guide](../IE_DG/Deep_Learning_Inference_Engine_DevGuide.md).
|
||||
- For more information on Sample Applications, see the [Inference Engine Samples Overview](../IE_DG/Samples_Overview.md).
|
||||
- For information on Inference Engine Tutorials, see the [Inference Tutorials](https://github.com/intel-iot-devkit/inference-tutorials-generic).
|
||||
- For IoT Libraries & Code Samples see the [Intel® IoT Developer Kit](https://github.com/intel-iot-devkit).
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ This guide provides installation steps for Intel® Distribution of OpenVINO™ t
|
||||
**Operating Systems**
|
||||
|
||||
- Ubuntu* 18.04 long-term support (LTS), 64-bit
|
||||
- CentOS* 7.4, 64-bit
|
||||
- CentOS* 7.6, 64-bit
|
||||
- macOS* 10.14.x versions.
|
||||
- Windows 10*, 64-bit Pro, Enterprise or Education (1607 Anniversary Update, Build 14393 or higher) editions
|
||||
- Windows Server* 2016 or higher
|
||||
@@ -30,7 +30,7 @@ This guide provides installation steps for Intel® Distribution of OpenVINO™ t
|
||||
```sh
|
||||
conda install openvino-ie4py-ubuntu18 -c intel
|
||||
```
|
||||
- CentOS* 7.4
|
||||
- CentOS* 7.6
|
||||
```sh
|
||||
conda install openvino-ie4py-centos7 -c intel
|
||||
```
|
||||
@@ -54,11 +54,11 @@ Now you can start to develop and run your application.
|
||||
|
||||
## Additional Resources
|
||||
|
||||
- Intel® Distribution of OpenVINO™ toolkit home page: [https://software.intel.com/en-us/openvino-toolkit](https://software.intel.com/en-us/openvino-toolkit)
|
||||
- OpenVINO™ toolkit online documentation: [https://docs.openvinotoolkit.org](https://docs.openvinotoolkit.org)
|
||||
- [Model Optimizer Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html).
|
||||
- [Inference Engine Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Deep_Learning_Inference_Engine_DevGuide.html)
|
||||
- For more information on Sample Applications, see the [Inference Engine Samples Overview](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Samples_Overview.html).
|
||||
- Intel® Distribution of OpenVINO™ toolkit home page: [https://software.intel.com/en-us/openvino-toolkit](https://software.intel.com/en-us/openvino-toolkit).
|
||||
- OpenVINO™ toolkit online documentation: [https://docs.openvinotoolkit.org](https://docs.openvinotoolkit.org).
|
||||
- [Model Optimizer Developer Guide](../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md).
|
||||
- [Inference Engine Developer Guide](../IE_DG/Deep_Learning_Inference_Engine_DevGuide.md).
|
||||
- For more information on Sample Applications, see the [Inference Engine Samples Overview](../IE_DG/Samples_Overview.md).
|
||||
- For information on Inference Engine Tutorials, see the [Inference Tutorials](https://github.com/intel-iot-devkit/inference-tutorials-generic).
|
||||
- Intel® Distribution of OpenVINO™ toolkit Anaconda* home page: [https://anaconda.org/intel/openvino-ie4py](https://anaconda.org/intel/openvino-ie4py)
|
||||
|
||||
|
||||
@@ -284,45 +284,12 @@ docker run --rm --net=host -v /var/tmp:/var/tmp –ipc=host -ti <image_name>
|
||||
> - Alternatively, you can start hddldaemon with the root user on host, but this approach is not recommended.
|
||||
|
||||
## Use a Docker* Image for FPGA
|
||||
### Build a Docker* Image for FPGA
|
||||
|
||||
FPGA card is not available in container by default, but it can be mounted there with the following pre-requisites:
|
||||
- FPGA device is up and ready to run inference.
|
||||
- FPGA bitstreams were pushed to the device over PCIe.
|
||||
Intel will be transitioning to the next-generation programmable deep-learning solution based on FPGAs in order to increase the level of customization possible in FPGA deep-learning. As part of this transition, future standard releases (i.e., non-LTS releases) of Intel® Distribution of OpenVINO™ toolkit will no longer include the Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA and the Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA.
|
||||
|
||||
To build a Docker* image for FPGA:
|
||||
Intel® Distribution of OpenVINO™ toolkit 2020.3.X LTS release will continue to support Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA and the Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA. For questions about next-generation programmable deep-learning solutions based on FPGAs, please talk to your sales representative or contact us to get the latest FPGA updates.
|
||||
|
||||
1. Set additional environment variables in the `Dockerfile`:<br>
|
||||
```sh
|
||||
ENV CL_CONTEXT_COMPILER_MODE_INTELFPGA=3
|
||||
ENV DLA_AOCX=/opt/intel/openvino/a10_devkit_bitstreams/2-0-1_RC_FP11_Generic.aocx
|
||||
ENV PATH=/opt/altera/aocl-pro-rte/aclrte-linux64/bin:$PATH
|
||||
```
|
||||
2. Install the following UDEV rule:<br>
|
||||
```sh
|
||||
cat <<EOF > fpga.rules
|
||||
KERNEL=="acla10_ref*",GROUP="users",MODE="0660"
|
||||
EOF
|
||||
sudo cp fpga.rules /etc/udev/rules.d/
|
||||
sudo udevadm control --reload-rules
|
||||
sudo udevadm trigger
|
||||
sudo ldconfig
|
||||
```
|
||||
Make sure that a container user is added to the "users" group with the same GID as on host.
|
||||
|
||||
### Run the Docker* container for FPGA
|
||||
|
||||
To run the built Docker* container for FPGA, use the following command:
|
||||
|
||||
```sh
|
||||
docker run --rm -it \
|
||||
--mount type=bind,source=/opt/intel/intelFPGA_pro,destination=/opt/intel/intelFPGA_pro \
|
||||
--mount type=bind,source=/opt/altera,destination=/opt/altera \
|
||||
--mount type=bind,source=/etc/OpenCL/vendors,destination=/etc/OpenCL/vendors \
|
||||
--mount type=bind,source=/opt/Intel/OpenCL/Boards,destination=/opt/Intel/OpenCL/Boards \
|
||||
--device /dev/acla10_ref0:/dev/acla10_ref0 \
|
||||
<image_name>
|
||||
```
|
||||
For instructions for previous releases with FPGA Support, see documentation for the [2020.4 version](https://docs.openvinotoolkit.org/2020.4/openvino_docs_install_guides_installing_openvino_docker_linux.html#use_a_docker_image_for_fpga) or lower.
|
||||
|
||||
## Examples
|
||||
* [ubuntu18_runtime dockerfile](https://docs.openvinotoolkit.org/downloads/ubuntu18_runtime.dockerfile) - Can be used to build OpenVINO™ runtime image containing minimal dependencies needed to use OpenVINO™ in production environment.
|
||||
|
||||
@@ -1,16 +1,5 @@
|
||||
# Install Intel® Distribution of OpenVINO™ toolkit for Linux* with FPGA Support {#openvino_docs_install_guides_installing_openvino_linux_fpga}
|
||||
|
||||
**NOTES**:
|
||||
- [Intel® System Studio](https://software.intel.com/en-us/system-studio) is an all-in-one, cross-platform tool suite, purpose-built to simplify system bring-up and improve system and IoT device application performance on Intel® platforms. If you are using the Intel® Distribution of OpenVINO™ with Intel® System Studio, go to [Get Started with Intel® System Studio](https://software.intel.com/en-us/articles/get-started-with-openvino-and-intel-system-studio-2019).
|
||||
- The Intel® Distribution of OpenVINO™ toolkit was formerly known as the Intel® Computer Vision SDK.
|
||||
- These steps apply to Ubuntu\*, CentOS\*, and Yocto\*.
|
||||
- If you are using Intel® Distribution of OpenVINO™ toolkit on Windows\* OS, see the [Installation Guide for Windows*](installing-openvino-windows.md).
|
||||
- For the Intel Distribution of OpenVINO toolkit without FPGA
|
||||
support, see [Installation Guide for Linux*](installing-openvino-linux.md).
|
||||
- CentOS and Yocto installations will require some modifications that
|
||||
are not covered in this guide.
|
||||
- An internet connection is required to follow the steps in this guide.
|
||||
|
||||
## Product Change Notice
|
||||
Intel® Distribution of OpenVINO™ toolkit for Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA and the Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA
|
||||
|
||||
@@ -29,323 +18,4 @@ Intel will be transitioning to the next-generation programmable deep-learning so
|
||||
|
||||
Intel® Distribution of OpenVINO™ toolkit 2020.3.X LTS release will continue to support Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA and the Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA. For questions about next-generation programmable deep-learning solutions based on FPGAs, please talk to your sales representative or contact us to get the latest FPGA updates.
|
||||
|
||||
## Introduction
|
||||
|
||||
The Intel® Distribution of OpenVINO™ toolkit quickly deploys applications and solutions that emulate human vision. Based on Convolutional Neural Networks (CNN), the toolkit extends computer vision (CV) workloads across Intel® hardware, maximizing performance. The Intel® Distribution of OpenVINO™ toolkit includes the Intel® Deep Learning Deployment Toolkit (Intel® DLDT).
|
||||
|
||||
The Intel® Distribution of OpenVINO™ toolkit for Linux\* with FPGA Support:
|
||||
|
||||
- Enables CNN-based deep learning inference on the edge
|
||||
- Supports heterogeneous execution across Intel® CPU, Intel® Integrated Graphics, Intel® FPGA, Intel® Neural Compute Stick 2
|
||||
- Speeds time-to-market via an easy-to-use library of computer vision functions and pre-optimized kernels
|
||||
- Includes optimized calls for computer vision standards including OpenCV\* and OpenCL™
|
||||
|
||||
**Included with the Installation and installed by default:**
|
||||
|
||||
| Component | Description |
|
||||
|-----------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| [Model Optimizer](../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md) | This tool imports, converts, and optimizes models that were trained in popular frameworks to a format usable by Intel tools, especially the Inference Engine. <br>Popular frameworks include Caffe\*, TensorFlow\*, MXNet\*, and ONNX\*. |
|
||||
| [Inference Engine](../IE_DG/inference_engine_intro.md) | This is the engine that runs the deep learning model. It includes a set of libraries for an easy inference integration into your applications. |
|
||||
| Drivers and runtimes for OpenCL™ version 2.1 | Enables OpenCL on the GPU/CPU for Intel® processors |
|
||||
| Intel® Media SDK | Offers access to hardware accelerated video codecs and frame processing |
|
||||
| Pre-compiled FPGA bitstream samples | Pre-compiled bitstream samples for the Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA, and Intel® Vision Accelerator Design with an Intel® Arria 10 FPGA SG2. |
|
||||
| Intel® FPGA SDK for OpenCL™ software technology | The Intel® FPGA RTE for OpenCL™ provides utilities, host runtime libraries, drivers, and RTE-specific libraries and files |
|
||||
| [OpenCV](https://docs.opencv.org/master/) | OpenCV\* community version compiled for Intel® hardware |
|
||||
| [Inference Engine Code Samples](../IE_DG/Samples_Overview.md) | A set of simple console applications demonstrating how to utilize specific OpenVINO capabilities in an application and how to perform specific tasks, such as loading a model, running inference, querying specific device capabilities, and more. |
|
||||
| [Demo Applications](@ref omz_demos_README) | A set of simple console applications that provide robust application templates to help you implement specific deep learning scenarios. |
|
||||
|
||||
|
||||
## Development and Target Platform
|
||||
|
||||
The development and target platforms have the same requirements, but you can select different components during the installation, based on your intended use.
|
||||
|
||||
**Hardware**
|
||||
|
||||
* 6th to 10th generation Intel® Core™ processors and Intel® Xeon® processors
|
||||
* Intel® Xeon® processor E family (formerly code named Sandy Bridge, Ivy Bridge, Haswell, and Broadwell)
|
||||
* 3rd generation Intel® Xeon® Scalable processor (formerly code named Cooper Lake)
|
||||
* Intel® Xeon® Scalable processor (formerly Skylake and Cascade Lake)
|
||||
* Intel Atom® processor with support for Intel® Streaming SIMD Extensions 4.1 (Intel® SSE4.1)
|
||||
* Intel Pentium® processor N4200/5, N3350/5, or N3450/5 with Intel® HD Graphics
|
||||
* Intel® Neural Compute Stick 2
|
||||
* Intel® Vision Accelerator Design with Intel® Movidius™ VPUs
|
||||
* Intel® Programmable Acceleration Card (PAC) with Intel® Arria® 10 GX FPGA
|
||||
* Intel® Vision Accelerator Design with an Intel® Arria 10 FPGA (Mustang-F100-A10) SG2
|
||||
|
||||
> **NOTE**: With OpenVINO™ 2020.4 release, Intel® Movidius™ Neural Compute Stick is no longer supported.
|
||||
|
||||
> **NOTE**: Intel® Arria 10 FPGA (Mustang-F100-A10) SG1 is no longer supported. If you use Intel® Vision Accelerator Design with an Intel® Arria 10 FPGA (Mustang-F100-A10) Speed Grade 1, we recommend continuing to use the [Intel® Distribution of OpenVINO™ toolkit 2020.1](https://docs.openvinotoolkit.org/2020.1/_docs_install_guides_VisionAcceleratorFPGA_Configure.html) release.
|
||||
|
||||
> **NOTE**: Intel® Arria® 10 GX FPGA Development Kit is no longer supported. For the Intel® Arria® 10 FPGA GX Development Kit configuration guide, refer to the [2019 R1.1 documentation](http://docs.openvinotoolkit.org/2019_R1.1/_docs_install_guides_GX_Configure_2019R1.html).
|
||||
|
||||
**Processor Notes:**
|
||||
|
||||
- Processor graphics are not included in all processors. See [Product Specifications](https://ark.intel.com/) for information about your processor.
|
||||
- A chipset that supports processor graphics is required for Intel® Xeon® processors.
|
||||
|
||||
**Operating Systems:**
|
||||
|
||||
- Ubuntu 18.04 or 16.04 long-term support (LTS), 64-bit: Minimum supported kernel is 4.15
|
||||
- CentOS 7.4, 64-bit
|
||||
- Yocto Project v3.0, 64-bit (for target only and requires modifications)
|
||||
|
||||
## Overview
|
||||
|
||||
This guide provides step-by-step instructions on how to install the Intel® Distribution of OpenVINO™ toolkit with FPGA Support. Links are provided for each type of compatible hardware including downloads, initialization and configuration steps. The following steps will be covered:
|
||||
|
||||
1. <a href="#install-openvino">Install the Intel® Distribution of OpenVINO™ Toolkit </a>
|
||||
2. <a href="#install-external-dependencies">Install External software dependencies</a>
|
||||
3. <a href="#configure-model-optimizer">Configure the Model Optimizer </a>
|
||||
4. <a href="#run-the-demos">Run the Verification Scripts to Verify Installation and Compile Samples</a>
|
||||
5. <a href="#install-hardware">Install your compatible hardware from the list of supported hardware</a><br>
|
||||
6. <a href="#Hello-World-Face-Detection-Tutorial">Use the Face Detection Tutorial</a>
|
||||
|
||||
## <a name="install-openvino"></a>Install the Intel® Distribution of OpenVINO™ Toolkit Core Components
|
||||
|
||||
Download the Intel® Distribution of OpenVINO™ toolkit package file from [Intel® Distribution of OpenVINO™ toolkit for Linux* with FPGA Support](https://software.intel.com/en-us/openvino-toolkit/choose-download).
|
||||
Select the Intel® Distribution of OpenVINO™ toolkit for Linux with FPGA Support package from the dropdown menu.
|
||||
|
||||
1. Open a command prompt terminal window.
|
||||
2. Change directories to where you downloaded the Intel Distribution of
|
||||
OpenVINO toolkit for Linux\* with FPGA Support package file.<br>
|
||||
If you downloaded the package file to the current user's `Downloads`
|
||||
directory:
|
||||
```sh
|
||||
cd ~/Downloads/
|
||||
```
|
||||
By default, the file is saved as `l_openvino_toolkit_fpga_p_<version>.tgz`.
|
||||
|
||||
3. Unpack the .tgz file:
|
||||
```sh
|
||||
tar -xvzf l_openvino_toolkit_fpga_p_<version>.tgz
|
||||
```
|
||||
The files are unpacked to the `l_openvino_toolkit_fpga_p_<version>` directory.
|
||||
|
||||
4. Go to the `l_openvino_toolkit_fpga_p_<version>` directory:
|
||||
```sh
|
||||
cd l_openvino_toolkit_fpga_p_<version>
|
||||
```
|
||||
If you have a previous version of the Intel Distribution of OpenVINO toolkit installed, rename or delete these two directories:
|
||||
- `/home/<user>/inference_engine_samples`
|
||||
- `/home/<user>/openvino_models`
|
||||
|
||||
**Installation Notes:**
|
||||
- Choose an installation option and run the related script as root.
|
||||
- You can use either a GUI installation wizard or command-line instructions (CLI).
|
||||
- Screenshots are provided for the GUI, but not for CLI. The following information also applies to CLI and will be helpful to your installation where you will be presented with the same choices and tasks.
|
||||
|
||||
5. Choose your installation option:
|
||||
- **Option 1:** GUI Installation Wizard:
|
||||
```sh
|
||||
sudo ./install_GUI.sh
|
||||
```
|
||||
- **Option 2:** Command-Line Instructions:
|
||||
```sh
|
||||
sudo ./install.sh
|
||||
```
|
||||
6. Follow the instructions on your screen. Watch for informational
|
||||
messages such as the following in case you must complete additional
|
||||
steps:
|
||||

|
||||
|
||||
7. If you select the default options, the **Installation summary** GUI screen looks like this:
|
||||

|
||||
- **Optional:** You can choose **Customize** and select only the bitstreams for your card. This will allow you to minimize
|
||||
the size of the download by several gigabytes.
|
||||
- The following bitstreams listed at the bottom of the customization screen are highlighted below. Choose the one for your FPGA:
|
||||

|
||||
- When installed as **root** the default installation directory for the Intel Distribution of OpenVINO is
|
||||
`/opt/intel/openvino_fpga_2019.<version>/`.<br>
|
||||
For simplicity, a symbolic link to the latest installation is also created: `/opt/intel/openvino/`.
|
||||
|
||||
8. A Complete screen indicates that the core components have been installed:
|
||||

|
||||
|
||||
The first core components are installed. Continue to the next section to install additional dependencies.
|
||||
|
||||
## <a name="install-external-dependencies"></a>Install External Software Dependencies
|
||||
|
||||
These dependencies are required for:
|
||||
|
||||
- Intel-optimized build of OpenCV library
|
||||
- Deep Learning Inference Engine
|
||||
- Deep Learning Model Optimizer tools
|
||||
|
||||
1. Change to the `install_dependencies` directory:
|
||||
```sh
|
||||
cd /opt/intel/openvino/install_dependencies
|
||||
```
|
||||
2. Run a script to download and install the external software dependencies:
|
||||
```sh
|
||||
sudo -E ./install_openvino_dependencies.sh
|
||||
```
|
||||
|
||||
The dependencies are installed. Continue to the next section to configure the Model Optimizer.
|
||||
|
||||
## <a name="configure-model-optimizer"></a>Configure the Model Optimizer
|
||||
|
||||
The 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 Distribution of
|
||||
OpenVINO toolkit. You cannot perform inference on your trained model without
|
||||
running the model through the Model Optimizer. When you run a
|
||||
pre-trained model through the Model Optimizer, your output is an
|
||||
Intermediate Representation (IR) of the network. The Intermediate
|
||||
Representation is a pair of files that describe the whole model:
|
||||
|
||||
- `.xml`: Describes the network topology
|
||||
- `.bin`: Contains the weights and biases binary data
|
||||
|
||||
For more information about the Model Optimizer, refer to the [Model Optimizer Developer Guide](../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md).
|
||||
|
||||
### Model Optimizer Configuration Steps
|
||||
|
||||
> **IMPORTANT**: The Internet access is required to execute the following steps successfully. If you have access to the Internet through the proxy server only, please make sure that it is configured in your environment.
|
||||
|
||||
You can choose to either configure all supported frameworks at once **OR** configure one framework at a time. Choose the option that best suits your needs. If you see error messages, make sure you installed all dependencies.
|
||||
|
||||
> **NOTE**: If you installed the Intel® Distribution of OpenVINO™ to the non-default install directory, replace `/opt/intel` with the directory in which you installed the software.
|
||||
|
||||
**Option 1: Configure all supported frameworks at the same time**
|
||||
|
||||
1. Go to the Model Optimizer prerequisites directory:
|
||||
```sh
|
||||
cd /opt/intel/openvino/deployment_tools/model_optimizer/install_prerequisites
|
||||
```
|
||||
2. Run the script to configure the Model Optimizer for Caffe,
|
||||
TensorFlow 1.x, MXNet, Kaldi\*, and ONNX:
|
||||
```sh
|
||||
sudo ./install_prerequisites.sh
|
||||
```
|
||||
|
||||
**Option 2: Configure each framework separately**
|
||||
|
||||
Configure individual frameworks separately **ONLY** if you did not select **Option 1** above.
|
||||
1. Go to the Model Optimizer prerequisites directory:
|
||||
```sh
|
||||
cd /opt/intel/openvino/deployment_tools/model_optimizer/install_prerequisites
|
||||
```
|
||||
2. Run the script for your model framework. You can run more than one script:
|
||||
- For **Caffe**:
|
||||
|
||||
```sh
|
||||
sudo ./install_prerequisites_caffe.sh
|
||||
```
|
||||
- For **TensorFlow 1.x**:
|
||||
```sh
|
||||
sudo ./install_prerequisites_tf.sh
|
||||
```
|
||||
- For **TensorFlow 2.x**:
|
||||
```sh
|
||||
sudo ./install_prerequisites_tf2.sh
|
||||
```
|
||||
- For **MXNet**:
|
||||
```sh
|
||||
sudo ./install_prerequisites_mxnet.sh
|
||||
```
|
||||
- For **ONNX**:
|
||||
```sh
|
||||
sudo ./install_prerequisites_onnx.sh
|
||||
```
|
||||
- For **Kaldi**:
|
||||
```sh
|
||||
sudo ./install_prerequisites_kaldi.sh
|
||||
```
|
||||
The Model Optimizer is configured for one or more frameworks.
|
||||
|
||||
You are ready to compile the samples by <a href="#run-the-demos">running the verification scripts</a>.
|
||||
|
||||
## <a name="run-the-demos"></a>Run the Verification Scripts to Verify Installation and Compile Samples
|
||||
|
||||
To verify the installation and compile two samples, run the verification applications provided with the product on the CPU:
|
||||
|
||||
1. Go to the **Inference Engine demo** directory:
|
||||
```sh
|
||||
cd /opt/intel/openvino/deployment_tools/demo
|
||||
```
|
||||
|
||||
2. Run the **Image Classification verification script**:
|
||||
```sh
|
||||
./demo_squeezenet_download_convert_run.sh
|
||||
```
|
||||
This verification script downloads a SqueezeNet model, uses the Model Optimizer to convert the model to the .bin and .xml Intermediate Representation (IR) files. The Inference Engine requires this model conversion so it can use the IR as input and achieve optimum performance on Intel hardware.<br>
|
||||
This verification script builds the [Image Classification Sample Async](../../inference-engine/samples/classification_sample_async/README.md) application and run it with the `car.png` image in the demo directory. When the verification script completes, you will have the label and confidence for the top-10 categories:
|
||||

|
||||
|
||||
3. Run the **Inference Pipeline verification script**:
|
||||
```sh
|
||||
./demo_security_barrier_camera.sh
|
||||
```
|
||||
This verification script builds the [Security Barrier Camera Demo](@ref omz_demos_security_barrier_camera_demo_README) application included in the package.
|
||||
|
||||
This verification script uses the `car_1.bmp` image in the demo directory to show an inference pipeline using three of the pre-trained models. The verification script uses vehicle recognition in which vehicle attributes build on each other to narrow in on a specific attribute.
|
||||
|
||||
First, an object is identified as a vehicle. This identification is used as input to the next model, which identifies specific vehicle attributes, including the license plate. Finally, the attributes identified as the license plate are used as input to the third model, which recognizes specific characters in the license plate.
|
||||
|
||||
When the verification script completes, you will see an image that displays the resulting frame with detections rendered as bounding boxes, and text:
|
||||

|
||||
|
||||
4. Close the image viewer window to complete the verification script.
|
||||
|
||||
|
||||
To learn about the verification scripts, see the `README.txt` file in `/opt/intel/openvino/deployment_tools/demo`.
|
||||
|
||||
For a description of the Intel Distribution of OpenVINO™ pre-trained object detection and object recognition models, see [Overview of OpenVINO™ Toolkit Pre-Trained Models](@ref omz_models_intel_index).
|
||||
|
||||
You have completed all required installation, configuration and build steps in this guide to use your CPU to work with your trained models. To use other hardware, see <a href="#install hardware">Install and Configure your Compatible Hardware</a> below.
|
||||
|
||||
## <a name="install-hardware"></a>Install and Configure Your Compatible Hardware
|
||||
|
||||
Install your compatible hardware from the list of supported components below.
|
||||
|
||||
> **NOTE**: Once you've completed your hardware installation, you'll return to this guide to finish installation and configuration of the Intel® Distribution of OpenVINO™ toolkit.
|
||||
|
||||
Links to install and configure compatible hardware
|
||||
- [The Intel® Programmable Acceleration Card (PAC) with Intel® Arria® 10 GX FPGA](PAC_Configure.md)
|
||||
- [The Intel® Vision Accelerator Design with an Intel® Arria 10 FPGA SG2 (Mustang-F100-A10)](VisionAcceleratorFPGA_Configure.md)
|
||||
- [Intel® Vision Accelerator Design with Intel® Movidius™ VPUs](installing-openvino-linux-ivad-vpu.md)
|
||||
|
||||
Congratulations, you have finished the Intel® Distribution of OpenVINO™ toolkit installation for FPGA. To learn more about how the Intel® Distribution of OpenVINO™ toolkit works, the Hello World tutorial and other resources are provided below.
|
||||
|
||||
## <a name="Hello-World-Face-Detection-Tutorial"></a>Hello World Face Detection Tutorial
|
||||
|
||||
Refer to the [OpenVINO™ with FPGA Hello World Face Detection Exercise](https://github.com/intel-iot-devkit/openvino-with-fpga-hello-world-face-detection).
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
PRC developers might encounter pip installation related issues during OpenVINO™ installation. To resolve the issues, you may use one of the following options at your discretion:
|
||||
* Add the download source with `-i` parameter in the `pip` command. For example:
|
||||
```
|
||||
pip install numpy.py -i https://mirrors.aliyun.com/pypi/simple/
|
||||
```
|
||||
Use the `--trusted-host` parameter if the URL above is `http` instead of `https`.
|
||||
|
||||
* Modify or create `~/.pip/pip.conf` file to change the default download source with the content below:
|
||||
```
|
||||
[global]
|
||||
index-url = http://mirrors.aliyun.com/pypi/simple/
|
||||
[install]
|
||||
trusted-host = mirrors.aliyun.com
|
||||
```
|
||||
|
||||
**Additional Resources**
|
||||
|
||||
- Intel® Distribution of OpenVINO™ toolkit home page: [https://software.intel.com/en-us/openvino-toolkit](https://software.intel.com/en-us/openvino-toolkit)
|
||||
- OpenVINO™ toolkit online documentation: [https://docs.openvinotoolkit.org](https://docs.openvinotoolkit.org)
|
||||
- [Inference Engine FPGA plugin documentation](../IE_DG/supported_plugins/FPGA.md)
|
||||
- [Model Optimizer Developer Guide](../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md).
|
||||
- For more information on Sample Applications, see the [Inference Engine Samples Overview](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Samples_Overview.html)
|
||||
- To learn about pre-trained models for OpenVINO™ toolkit, see the [Pre-Trained Models Overview](https://docs.openvinotoolkit.org/latest/_docs_docs_Pre_Trained_Models.html)
|
||||
- For information on Inference Engine Tutorials, see the [Inference Tutorials](https://github.com/intel-iot-devkit/inference-tutorials-generic)
|
||||
- For IoT Libraries & Code Samples see the [Intel® IoT Developer Kit](https://github.com/intel-iot-devkit).
|
||||
|
||||
To learn more about converting models, go to:
|
||||
|
||||
- [Convert Your Caffe* Model](../MO_DG/prepare_model/convert_model/Convert_Model_From_Caffe.md)
|
||||
- [Convert Your TensorFlow* Model](../MO_DG/prepare_model/convert_model/Convert_Model_From_TensorFlow.md)
|
||||
- [Convert Your MXNet* Model](../MO_DG/prepare_model/convert_model/Convert_Model_From_MxNet.md)
|
||||
- [Convert Your ONNX* Model](../MO_DG/prepare_model/convert_model/Convert_Model_From_ONNX.md)
|
||||
|
||||
|
||||
For installation instructions for the last release of Intel® Distribution of OpenVINO™ toolkit for Linux* with FPGA Support, see documentation for the [2020.4 version](https://docs.openvinotoolkit.org/2020.4/openvino_docs_install_guides_installing_openvino_linux_fpga.html).
|
||||
@@ -3,7 +3,6 @@
|
||||
> **NOTES**:
|
||||
> - These steps apply to Ubuntu\*, CentOS\*, and Yocto\*.
|
||||
> - If you are using Intel® Distribution of OpenVINO™ toolkit on Windows\* OS, see the [Installation Guide for Windows*](installing-openvino-windows.md).
|
||||
> - For the Intel Distribution of OpenVINO toolkit with FPGA support, see [Installation Guide for Linux* with FPGA support](installing-openvino-linux-fpga.md).
|
||||
> - CentOS and Yocto installations will require some modifications that are not covered in this guide.
|
||||
> - An internet connection is required to follow the steps in this guide.
|
||||
> - [Intel® System Studio](https://software.intel.com/en-us/system-studio) is an all-in-one, cross-platform tool suite, purpose-built to simplify system bring-up and improve system and IoT device application performance on Intel® platforms. If you are using the Intel® Distribution of OpenVINO™ with Intel® System Studio, go to [Get Started with Intel® System Studio](https://software.intel.com/en-us/articles/get-started-with-openvino-and-intel-system-studio-2019).
|
||||
@@ -24,19 +23,18 @@ The Intel® Distribution of OpenVINO™ toolkit for Linux\*:
|
||||
|-----------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| [Model Optimizer](../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md) | This tool imports, converts, and optimizes models that were trained in popular frameworks to a format usable by Intel tools, especially the Inference Engine. <br>Popular frameworks include Caffe\*, TensorFlow\*, MXNet\*, and ONNX\*. |
|
||||
| [Inference Engine](../IE_DG/inference_engine_intro.md) | This is the engine that runs the deep learning model. It includes a set of libraries for an easy inference integration into your applications. |
|
||||
| Drivers and runtimes for OpenCL™ version 2.1 | Enables OpenCL on the GPU/CPU for Intel® processors |
|
||||
| Intel® Media SDK | Offers access to hardware accelerated video codecs and frame processing |
|
||||
| [OpenCV](https://docs.opencv.org/master/) | OpenCV\* community version compiled for Intel® hardware |
|
||||
| [Inference Engine Code Samples](../IE_DG/Samples_Overview.md) | A set of simple console applications demonstrating how to utilize specific OpenVINO capabilities in an application and how to perform specific tasks, such as loading a model, running inference, querying specific device capabilities, and more. |
|
||||
| [Demo Applications](@ref omz_demos_README) | A set of simple console applications that provide robust application templates to help you implement specific deep learning scenarios. |
|
||||
| [Additional Tools](../IE_DG/Tools_Overview.md) | A set of tools to work with your models |
|
||||
| Additional Tools | A set of tools to work with your models including [Accuracy Checker utility](@ref omz_tools_accuracy_checker_README), [Post-Training Optimization Tool Guide](@ref pot_README), [Model Downloader](@ref omz_tools_downloader_README) and other |
|
||||
| [Documentation for Pre-Trained Models ](@ref omz_models_intel_index) | Documentation for the pre-trained models available in the [Open Model Zoo repo](https://github.com/opencv/open_model_zoo) |
|
||||
|
||||
## System Requirements
|
||||
|
||||
**Hardware**
|
||||
|
||||
* 6th to 10th generation Intel® Core™ processors and Intel® Xeon® processors
|
||||
* 6th to 11th generation Intel® Core™ processors and Intel® Xeon® processors
|
||||
* Intel® Xeon® processor E family (formerly code named Sandy Bridge, Ivy Bridge, Haswell, and Broadwell)
|
||||
* 3rd generation Intel® Xeon® Scalable processor (formerly code named Cooper Lake)
|
||||
* Intel® Xeon® Scalable processor (formerly Skylake and Cascade Lake)
|
||||
@@ -55,7 +53,7 @@ The Intel® Distribution of OpenVINO™ toolkit for Linux\*:
|
||||
**Operating Systems**
|
||||
|
||||
- Ubuntu 18.04.x long-term support (LTS), 64-bit
|
||||
- CentOS 7.4, 64-bit (for target only)
|
||||
- CentOS 7.6, 64-bit (for target only)
|
||||
- Yocto Project v3.0, 64-bit (for target only and requires modifications)
|
||||
|
||||
## Overview
|
||||
@@ -320,17 +318,24 @@ cd /opt/intel/openvino/install_dependencies/
|
||||
```sh
|
||||
sudo -E su
|
||||
```
|
||||
3. Install the **Intel® Graphics Compute Runtime for OpenCL™** driver components required to use the GPU plugin and write custom layers for Intel® Integrated Graphics:
|
||||
3. Install the **Intel® Graphics Compute Runtime for OpenCL™** driver components required to use the GPU plugin and write custom layers for Intel® Integrated Graphics. Run the installation script:
|
||||
```sh
|
||||
./install_NEO_OCL_driver.sh
|
||||
```
|
||||
You may see the following command line output:
|
||||
|
||||
- Add OpenCL user to video group
|
||||
- Run script to install the 4.14 kernel script
|
||||
|
||||
Ignore those suggestions and continue.
|
||||
The drivers are not included in the package and the script downloads them. Make sure you have the
|
||||
internet connection for this step.
|
||||
|
||||
The script compares the driver version on the system to the current version.
|
||||
If the driver version on the system is higher or equal to the current version, the script does
|
||||
not install a new driver.
|
||||
If the version of the driver is lower than the current version, the script uninstalls the lower
|
||||
and installs the current version with your permission:
|
||||

|
||||
Higher hardware versions require a higher driver version, namely 20.35 instead of 19.41.
|
||||
If the script fails to uninstall the driver, uninstall it manually.
|
||||
During the script execution, you may see the following command line output:
|
||||
- Add OpenCL user to video group
|
||||
Ignore this suggestion and continue.
|
||||
4. **Optional** Install header files to allow compiling a new code. You can find the header files at [Khronos OpenCL™ API Headers](https://github.com/KhronosGroup/OpenCL-Headers.git).
|
||||
|
||||
## <a name="additional-NCS-steps"></a>Steps for Intel® Neural Compute Stick 2
|
||||
@@ -458,9 +463,9 @@ trusted-host = mirrors.aliyun.com
|
||||
|
||||
- Intel® Distribution of OpenVINO™ toolkit home page: [https://software.intel.com/en-us/openvino-toolkit](https://software.intel.com/en-us/openvino-toolkit)
|
||||
- OpenVINO™ toolkit online documentation: [https://docs.openvinotoolkit.org](https://docs.openvinotoolkit.org)
|
||||
- [Model Optimizer Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html)
|
||||
- [Inference Engine Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Deep_Learning_Inference_Engine_DevGuide.html)
|
||||
- For more information on Sample Applications, see the [Inference Engine Samples Overview](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Samples_Overview.html)
|
||||
- [Model Optimizer Developer Guide](../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md).
|
||||
- [Inference Engine Developer Guide](../IE_DG/Deep_Learning_Inference_Engine_DevGuide.md).
|
||||
- For more information on Sample Applications, see the [Inference Engine Samples Overview](../IE_DG/Samples_Overview.md).
|
||||
- For information on a set of pre-trained models, see the [Overview of OpenVINO™ Toolkit Pre-Trained Models](@ref omz_models_intel_index)
|
||||
- For information on Inference Engine Tutorials, see the [Inference Tutorials](https://github.com/intel-iot-devkit/inference-tutorials-generic)
|
||||
- For IoT Libraries and Code Samples see the [Intel® IoT Developer Kit](https://github.com/intel-iot-devkit).
|
||||
|
||||
@@ -29,7 +29,7 @@ The following components are installed by default:
|
||||
| [OpenCV\*](https://docs.opencv.org/master/) | OpenCV\* community version compiled for Intel® hardware |
|
||||
| [Sample Applications](../IE_DG/Samples_Overview.md) | A set of simple console applications demonstrating how to use the Inference Engine in your applications. |
|
||||
| [Demos](@ref omz_demos_README) | A set of console applications that demonstrate how you can use the Inference Engine in your applications to solve specific use-cases |
|
||||
| [Additional Tools](../IE_DG/Tools_Overview.md) | A set of tools to work with your models |
|
||||
| Additional Tools | A set of tools to work with your models including [Accuracy Checker utility](@ref omz_tools_accuracy_checker_README), [Post-Training Optimization Tool Guide](@ref pot_README), [Model Downloader](@ref omz_tools_downloader_README) and other |
|
||||
| [Documentation for Pre-Trained Models ](@ref omz_models_intel_index) | Documentation for the pre-trained models available in the [Open Model Zoo repo](https://github.com/opencv/open_model_zoo) |
|
||||
|
||||
## Development and Target Platform
|
||||
@@ -40,7 +40,7 @@ The development and target platforms have the same requirements, but you can sel
|
||||
|
||||
> **NOTE**: The current version of the Intel® Distribution of OpenVINO™ toolkit for macOS* supports inference on Intel CPUs and Intel® Neural Compute Sticks 2 only.
|
||||
|
||||
* 6th to 10th generation Intel® Core™ processors and Intel® Xeon® processors
|
||||
* 6th to 11th generation Intel® Core™ processors and Intel® Xeon® processors
|
||||
* Intel® Xeon® processor E family (formerly code named Sandy Bridge, Ivy Bridge, Haswell, and Broadwell)
|
||||
* 3rd generation Intel® Xeon® Scalable processor (formerly code named Cooper Lake)
|
||||
* Intel® Xeon® Scalable processor (formerly Skylake and Cascade Lake)
|
||||
@@ -48,14 +48,14 @@ The development and target platforms have the same requirements, but you can sel
|
||||
|
||||
**Software Requirements**
|
||||
|
||||
- CMake 3.9 or higher
|
||||
- Python 3.5 - 3.7
|
||||
- CMake 3.10 or higher
|
||||
- Python 3.6 - 3.7
|
||||
- Apple Xcode\* Command Line Tools
|
||||
- (Optional) Apple Xcode\* IDE (not required for OpenVINO, but useful for development)
|
||||
|
||||
**Operating Systems**
|
||||
|
||||
- macOS\* 10.14.4
|
||||
- macOS\* 10.15
|
||||
|
||||
## Overview
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ mkdir build && cd build
|
||||
|
||||
2. Build the Object Detection Sample:
|
||||
```sh
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-march=armv7-a" /opt/intel/openvino/deployment_tools/inference_engine/samples
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-march=armv7-a" /opt/intel/openvino/deployment_tools/inference_engine/samples*/cpp*
|
||||
```
|
||||
```sh
|
||||
make -j2 object_detection_sample_ssd
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
# Install Intel® Distribution of OpenVINO™ toolkit for Windows* with FPGA Support {#openvino_docs_install_guides_installing_openvino_windows_fpga}
|
||||
|
||||
**NOTES**:
|
||||
- These steps apply to Microsoft Windows 10*.
|
||||
- For the Intel Distribution of OpenVINO toolkit for Windows* without FPGA
|
||||
support, see [Installation Guide for Windows*](installing-openvino-windows.md).
|
||||
- An internet connection is required to follow the steps in this guide.
|
||||
- [Intel® System Studio](https://software.intel.com/en-us/system-studio) is an all-in-one, cross-platform tool suite, purpose-built to simplify system bring-up and improve system and IoT device application performance on Intel® platforms. If you are using the Intel® Distribution of OpenVINO™ with Intel® System Studio, go to [Get Started with Intel® System Studio](https://software.intel.com/en-us/articles/get-started-with-openvino-and-intel-system-studio-2019).
|
||||
|
||||
## Product Change Notice
|
||||
Intel® Distribution of OpenVINO™ toolkit for Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA and the Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA
|
||||
|
||||
@@ -25,429 +18,4 @@ Intel will be transitioning to the next-generation programmable deep-learning so
|
||||
|
||||
Intel® Distribution of OpenVINO™ toolkit 2020.3.X LTS release will continue to support Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA and the Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA. For questions about next-generation programmable deep-learning solutions based on FPGAs, please talk to your sales representative or contact us to get the latest FPGA updates.
|
||||
|
||||
## Introduction
|
||||
|
||||
> **IMPORTANT**:
|
||||
> - All steps in this guide are required, unless otherwise stated.<br>
|
||||
> - In addition to the download package, you must install dependencies and complete configuration steps.
|
||||
|
||||
Your installation is complete when these are all completed:
|
||||
|
||||
1. Install the <a href="#Install-Core-Components">Intel® Distribution of OpenVINO™ toolkit core components</a>
|
||||
|
||||
2. Install the dependencies:
|
||||
|
||||
- [Microsoft Visual Studio* with C++ **2019 or 2017** with MSBuild](http://visualstudio.microsoft.com/downloads/)
|
||||
- [CMake **2.8.12 or higher** 64-bit](https://cmake.org/download/)
|
||||
> **NOTE**: If you want to use Microsoft Visual Studio 2019, you are required to install CMake 3.14.
|
||||
- [Python **3.5**-**3.7** 64-bit](https://www.python.org/downloads/windows/)
|
||||
> **IMPORTANT**: As part of this installation, make sure you click the option to add the application to your `PATH` environment variable.
|
||||
|
||||
3. <a href="#set-the-environment-variables">Set Environment Variables</a>
|
||||
|
||||
4. <a href="#Configure_MO">Configure the Model Optimizer</a>
|
||||
|
||||
5. Run two <a href="#Using-Demo-Scripts">Verification Scripts to Verify Installation</a>
|
||||
|
||||
6. <a href="#install-hardware">Install your compatible hardware from the list of supported hardware</a><br>
|
||||
|
||||
7. <a href="#Hello-World-Face-Detection-Tutorial">Use the Face Detection Tutorial</a>
|
||||
|
||||
### About the Intel® Distribution of OpenVINO™ toolkit
|
||||
|
||||
The Intel® Distribution of OpenVINO™ toolkit speeds the deployment of applications and solutions that emulate human vision. Based on Convolutional Neural Networks (CNN), the toolkit extends computer vision (CV) workloads across Intel® hardware to maximize performance.
|
||||
|
||||
The Intel® Distribution of OpenVINO™ toolkit includes the Intel® Deep Learning Deployment Toolkit (Intel® DLDT). For more information, see the online [Intel® Distribution of OpenVINO™ toolkit Overview](https://software.intel.com/en-us/OpenVINO-toolkit) page.
|
||||
|
||||
The Intel® Distribution of OpenVINO™ toolkit for Windows\* with FPGA Support:
|
||||
|
||||
- Enables CNN-based deep learning inference on the edge
|
||||
- Supports heterogeneous execution across Intel® CPU, Intel® Integrated Graphics, Intel® FPGA, Intel® Neural Compute Stick 2
|
||||
- Speeds time-to-market via an easy-to-use library of computer vision functions and pre-optimized kernels
|
||||
- Includes optimized calls for computer vision standards including OpenCV\* and OpenCL™
|
||||
|
||||
#### <a name="InstallPackageContents"></a>Included in the Installation Package
|
||||
|
||||
The following components are installed by default:
|
||||
|
||||
| Component | Description |
|
||||
|-----------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| [Model Optimizer](../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md) | This tool imports, converts, and optimizes models that were trained in popular frameworks to a format usable by Intel tools, especially the Inference Engine. <br>Popular frameworks include Caffe\*, TensorFlow\*, MXNet\*, and ONNX\*. |
|
||||
| [Inference Engine](../IE_DG/inference_engine_intro.md) | This is the engine that runs the deep learning model. It includes a set of libraries for an easy inference integration into your applications. |
|
||||
| Pre-compiled FPGA bitstream samples | Pre-compiled bitstream samples for the Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA, and Intel® Vision Accelerator Design with an Intel® Arria 10 FPGA SG2. |
|
||||
| Intel® FPGA SDK for OpenCL™ software technology | The Intel® FPGA RTE for OpenCL™ provides utilities, host runtime libraries, drivers, and RTE-specific libraries and files |
|
||||
| [OpenCV](https://docs.opencv.org/master/) | OpenCV\* community version compiled for Intel® hardware |
|
||||
| [Inference Engine Code Samples](../IE_DG/Samples_Overview.md) | A set of simple console applications demonstrating how to utilize specific OpenVINO capabilities in an application and how to perform specific tasks, such as loading a model, running inference, querying specific device capabilities, and more. |
|
||||
| [Demo Applications](@ref omz_demos_README) | A set of simple console applications that provide robust application templates to help you implement specific deep learning scenarios. |
|
||||
|
||||
|
||||
### System Requirements
|
||||
|
||||
The development and target platforms have the same requirements, but you can select different components during the installation, based on your intended use.
|
||||
|
||||
**Hardware**
|
||||
|
||||
* 6th to 10th generation Intel® Core™ processors and Intel® Xeon® processors
|
||||
* Intel® Xeon® processor E family (formerly code named Sandy Bridge, Ivy Bridge, Haswell, and Broadwell)
|
||||
* 3rd generation Intel® Xeon® Scalable processor (formerly code named Cooper Lake)
|
||||
* Intel® Xeon® Scalable processor (formerly Skylake and Cascade Lake)
|
||||
* Intel Atom® processor with support for Intel® Streaming SIMD Extensions 4.1 (Intel® SSE4.1)
|
||||
* Intel Pentium® processor N4200/5, N3350/5, or N3450/5 with Intel® HD Graphics
|
||||
* Intel® Neural Compute Stick 2
|
||||
* Intel® Vision Accelerator Design with Intel® Movidius™ VPUs
|
||||
* Intel® Vision Accelerator Design with an Intel® Arria® 10 FPGA (Mustang-F100-A10) SG2
|
||||
|
||||
> **NOTE**: With OpenVINO™ 2020.4 release, Intel® Movidius™ Neural Compute Stick is no longer supported.
|
||||
|
||||
> **NOTE**: With OpenVINO™ 2020.4 release, Intel® Programmable Acceleration Card (PAC) with Intel® Arria® 10 GX FPGA is no longer supported on Windows.
|
||||
|
||||
**Processor Notes:**
|
||||
|
||||
- Processor graphics are not included in all processors. See [Product Specifications](https://ark.intel.com/) for information about your processor.
|
||||
- A chipset that supports processor graphics is required for Intel® Xeon® processors.
|
||||
|
||||
**Operating Systems:**
|
||||
|
||||
- Microsoft Windows 10*, 64-bit
|
||||
|
||||
**Software**
|
||||
- [Microsoft Visual Studio* with C++ **2019 or 2017** with MSBuild](http://visualstudio.microsoft.com/downloads/)
|
||||
- [CMake **2.8.12 or higher** 64-bit](https://cmake.org/download/)
|
||||
> **NOTE**: If you want to use Microsoft Visual Studio 2019, you are required to install CMake 3.14.
|
||||
- [Python **3.6.5** 64-bit](https://www.python.org/downloads/release/python-365/)
|
||||
|
||||
## Installation Steps
|
||||
|
||||
### <a name="Install-Core-Components"></a>Install the Intel® Distribution of OpenVINO™ toolkit Core Components
|
||||
|
||||
1. If you have not downloaded the Intel® Distribution of OpenVINO™ toolkit for Windows* with FPGA Support, [download the latest version](https://software.intel.com/content/www/us/en/develop/tools/openvino-toolkit/choose-download/windows-fpga.html). By default, the file is saved to the `Downloads` directory as `w_openvino_toolkit_fpga_p_<version>.exe`.
|
||||
Select the Intel® Distribution of OpenVINO™ toolkit for Windows with FPGA Support package from the dropdown menu.
|
||||
|
||||
2. Go to the `Downloads` folder and double-click `w_openvino_toolkit_fpga_p_<version>.exe`. A window opens to let you choose your installation directory and components. You can also select only the bitstreams for your card. This will allow you to minimize the size of the installation by several gigabytes. The default installation directory is `C:\Program Files (x86)\IntelSWTools\openvino_<version>`, for simplicity, a shortcut to the latest installation is also created: `C:\Program Files (x86)\IntelSWTools\openvino`. If you choose a different installation directory, the installer will create the directory for you. For the default options, the **Installation summary** GUI screen looks like this::
|
||||
|
||||

|
||||
|
||||
3. Click **Next**.
|
||||
|
||||
4. You are asked if you want to provide consent to gather information. Choose the option of your choice. Click **Next**.
|
||||
|
||||
5. If you are missing external dependencies, you will see a warning screen. Write down the dependencies you are missing. **You need to take no other action at this time**. After installing the Intel® Distribution of OpenVINO™ toolkit core components, install the missing dependencies.
|
||||
The screen example below indicates you are missing one dependency:
|
||||
|
||||

|
||||
|
||||
6. Click **Next**.
|
||||
|
||||
7. When the first part of installation is complete, the final screen informs you that the core components have been installed and additional steps still required:
|
||||
|
||||

|
||||
|
||||
8. Click **Finish** to close the installation wizard. A new browser window opens to the next section of the installation guide to set the environment variables. You are in the same document. The new window opens in case you ran the installation without first opening this installation guide.
|
||||
|
||||
9. If the installation indicated you must install dependencies, install them first. If there are no missing dependencies, you can go ahead and <a href="#set-the-environment-variables">set the environment variables</a>.
|
||||
|
||||
### Set the Environment Variables <a name="set-the-environment-variables"></a>
|
||||
|
||||
> **NOTE**: If you installed the Intel® Distribution of OpenVINO™ to the non-default install directory, replace `C:\Program Files (x86)\IntelSWTools` with the directory in which you installed the software.
|
||||
|
||||
You must update several environment variables before you can compile and run OpenVINO™ applications. Open the Command Prompt, and run the `setupvars.bat` batch file to temporarily set your environment variables:
|
||||
```sh
|
||||
cd C:\Program Files (x86)\IntelSWTools\openvino\bin\
|
||||
```
|
||||
|
||||
```sh
|
||||
setupvars.bat
|
||||
```
|
||||
|
||||
<strong>(Optional)</strong>: OpenVINO toolkit environment variables are removed when you close the Command Prompt window. As an option, you can permanently set the environment variables manually.
|
||||
|
||||
The environment variables are set. Continue to the next section to configure the Model Optimizer.
|
||||
|
||||
## Configure the Model Optimizer <a name="Configure_MO"></a>
|
||||
|
||||
> **IMPORTANT**: These steps are required. You must configure the Model Optimizer for at least one framework. The Model Optimizer will fail if you do not complete the steps in this section.
|
||||
|
||||
> **NOTE**: If you see an error indicating Python is not installed when you know you installed it, your computer might not be able to find the program. For the instructions to add Python to your system environment variables, see <a href="#Update-Path">Update Your Windows Environment Variables</a>.
|
||||
|
||||
The Model Optimizer is a key component of the Intel® Distribution of OpenVINO™ toolkit. You cannot do inference on your trained model without running the model through the Model Optimizer. When you run a pre-trained model through the Model Optimizer, your output is an Intermediate Representation (IR) of the network. The IR is a pair of files that describe the whole model:
|
||||
|
||||
- `.xml`: Describes the network topology
|
||||
- `.bin`: Contains the weights and biases binary data
|
||||
|
||||
The Inference Engine reads, loads, and infers the IR files, using a common API across the CPU, GPU, or VPU hardware.
|
||||
|
||||
The Model Optimizer is a Python*-based command line tool (`mo.py`), which is located in `C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\model_optimizer`. Use this tool on models trained with popular deep learning frameworks such as Caffe\*, TensorFlow\*, MXNet\*, and ONNX\* to convert them to an optimized IR format that the Inference Engine can use.
|
||||
|
||||
This section explains how to use scripts to configure the Model Optimizer either for all of the supported frameworks at the same time or for individual frameworks. If you want to manually configure the Model Optimizer instead of using scripts, see the **Using Manual Configuration Process** section on the [Configuring the Model Optimizer](../MO_DG/prepare_model/Config_Model_Optimizer.md) page.
|
||||
|
||||
For more information about the Model Optimizer, see the [Model Optimizer Developer Guide](../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md).
|
||||
|
||||
|
||||
### Model Optimizer Configuration Steps
|
||||
|
||||
You can configure the Model Optimizer either for all supported frameworks at once or for one framework at a time. Choose the option that best suits your needs. If you see error messages, make sure you installed all dependencies.
|
||||
|
||||
> **IMPORTANT**: The Internet access is required to execute the following steps successfully. If you have access to the Internet through the proxy server only, please make sure that it is configured in your environment.
|
||||
|
||||
> **NOTE**:
|
||||
> In the steps below:
|
||||
> - If you you want to use the Model Optimizer from another installed versions of Intel® Distribution of OpenVINO™ toolkit installed, replace `openvino` with `openvino_<version>`.
|
||||
> - If you installed the Intel® Distribution of OpenVINO™ toolkit to the non-default installation directory, replace `C:\Program Files (x86)\IntelSWTools` with the directory where you installed the software.
|
||||
|
||||
These steps use a command prompt to make sure you see error messages.
|
||||
|
||||
#### Option 1: Configure the Model Optimizer for all supported frameworks at the same time:
|
||||
|
||||
1. Open a command prompt. To do so, type `cmd` in your **Search Windows** box and then press **Enter**.
|
||||
Type commands in the opened window:
|
||||
|
||||

|
||||
|
||||
2. Go to the Model Optimizer prerequisites directory.<br>
|
||||
```sh
|
||||
cd C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\model_optimizer\install_prerequisites
|
||||
```
|
||||
|
||||
3. Run the following batch file to configure the Model Optimizer for Caffe\*, TensorFlow\* 1.x, MXNet\*, Kaldi\*, and ONNX\*:<br>
|
||||
```sh
|
||||
install_prerequisites.bat
|
||||
```
|
||||
|
||||
#### Option 2: Configure the Model Optimizer for each framework separately:
|
||||
|
||||
1. Go to the Model Optimizer prerequisites directory:<br>
|
||||
```sh
|
||||
cd C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\model_optimizer\install_prerequisites
|
||||
```
|
||||
|
||||
2. Run the batch file for the framework you will use with the Model Optimizer. You can use more than one:
|
||||
|
||||
* For **Caffe**:<br>
|
||||
```sh
|
||||
install_prerequisites_caffe.bat
|
||||
```
|
||||
|
||||
* For **TensorFlow 1.x**:<br>
|
||||
```sh
|
||||
install_prerequisites_tf.bat
|
||||
```
|
||||
|
||||
* For **TensorFlow 2.x**:<br>
|
||||
```sh
|
||||
install_prerequisites_tf2.bat
|
||||
```
|
||||
|
||||
* For **MXNet**:<br>
|
||||
```sh
|
||||
install_prerequisites_mxnet.bat
|
||||
```
|
||||
|
||||
* For **ONNX**:
|
||||
```sh
|
||||
install_prerequisites_onnx.bat
|
||||
```
|
||||
|
||||
* For **Kaldi**:
|
||||
```sh
|
||||
install_prerequisites_kaldi.bat
|
||||
```
|
||||
|
||||
The Model Optimizer is configured for one or more frameworks. Success is indicated by a screen similar to this:
|
||||
|
||||

|
||||
|
||||
You are ready to use two short demos to see the results of running the Intel Distribution of OpenVINO toolkit and to verify your installation was successful. The demo scripts are required since they perform additional configuration steps. Continue to the next section.
|
||||
|
||||
If you want to use a GPU or VPU, or update your Windows* environment variables, read through the <a href="#optional-steps">Optional Steps</a> section.
|
||||
|
||||
|
||||
## <a name="Using-Demo-Scripts"></a>Use Verification Scripts to Verify Your Installation
|
||||
|
||||
> **IMPORTANT**: This section is required. In addition to confirming your installation was successful, demo scripts perform other steps, such as setting up your computer to use the Inference Engine samples.
|
||||
|
||||
> **NOTE**:
|
||||
> The paths in this section assume you used the default installation directory. If you used a directory other than `C:\Program Files (x86)\IntelSWTools`, update the directory with the location where you installed the software.
|
||||
To verify the installation and compile two samples, run the verification applications provided with the product on the CPU:
|
||||
|
||||
1. Open a command prompt window.
|
||||
|
||||
2. Go to the Inference Engine demo directory:<br>
|
||||
```sh
|
||||
cd C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\demo\
|
||||
```
|
||||
|
||||
3. Run the verification scripts by following the instructions in the next section.
|
||||
|
||||
|
||||
### <a name="run-the-image-classification-verification-script"></a>Run the Image Classification Verification Script
|
||||
|
||||
To run the script, start the `demo_squeezenet_download_convert_run.bat` file:
|
||||
```sh
|
||||
demo_squeezenet_download_convert_run.bat
|
||||
```
|
||||
|
||||
This script downloads a SqueezeNet model, uses the Model Optimizer to convert the model to the `.‍bin` and `.‍xml` Intermediate Representation (IR) files. The Inference Engine requires this model conversion so it can use the IR as input and achieve optimum performance on Intel hardware.<br>
|
||||
This verification script builds the [Image Classification Sample Async](../../inference-engine/samples/classification_sample_async/README.md) application and run it with the `car.png` image in the demo directory. For a brief description of the Intermediate Representation, see <a href="#Configure_MO">Configuring the Model Optimizer</a>.
|
||||
|
||||
When the verification script completes, you will have the label and confidence for the top-10 categories:
|
||||

|
||||
|
||||
This demo is complete. Leave the console open and continue to the next section to run the Inference Pipeline demo.
|
||||
|
||||
|
||||
### Run the Inference Pipeline Verification Script
|
||||
|
||||
To run the script, start the `demo_security_barrier_camera.bat` file while still in the console:
|
||||
```sh
|
||||
demo_security_barrier_camera.bat
|
||||
```
|
||||
|
||||
This script downloads three pre-trained model IRs, builds the [Security Barrier Camera Demo](@ref omz_demos_security_barrier_camera_demo_README) application, and runs it with the downloaded models and the `car_1.bmp` image from the `demo` directory to show an inference pipeline. The verification script uses vehicle recognition in which vehicle attributes build on each other to narrow in on a specific attribute.
|
||||
|
||||
First, an object is identified as a vehicle. This identification is used as input to the next model, which identifies specific vehicle attributes, including the license plate. Finally, the attributes identified as the license plate are used as input to the third model, which recognizes specific characters in the license plate.
|
||||
|
||||
When the demo completes, you have two windows open:
|
||||
|
||||
* A console window that displays information about the tasks performed by the demo
|
||||
* An image viewer window that displays a resulting frame with detections rendered as bounding boxes, similar to the following:
|
||||
|
||||

|
||||
|
||||
Close the image viewer window to end the demo.
|
||||
|
||||
To learn more about the verification scripts, see `README.txt` in `C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\demo`.
|
||||
|
||||
For detailed description of the OpenVINO™ pre-trained object detection and object recognition models, see the [Overview of OpenVINO™ toolkit Pre-Trained Models](@ref omz_models_intel_index) page.
|
||||
|
||||
In this section, you saw a preview of the Intel® Distribution of OpenVINO™ toolkit capabilities.
|
||||
|
||||
Congratulations. You have completed all the required installation, configuration, and build steps to work with your trained models using CPU.
|
||||
|
||||
If you want to use Intel® Processor graphics (GPU), Intel® Neural Compute Stick 2 or Intel® Vision Accelerator Design with Intel® Movidius™ (VPU), or add CMake* and Python* to your Windows* environment variables, read through the next section for additional steps.
|
||||
|
||||
If you want to continue and run the Image Classification Sample Application on one of the supported hardware device, see the [Run the Image Classification Sample Application](#run-the-image-classification-sample-application) section.
|
||||
|
||||
## <a name="install-hardware"></a>Install and Configure Your Compatible FPGA Hardware
|
||||
|
||||
Install your compatible hardware from the list of supported components below.
|
||||
|
||||
> **NOTE**: Once you've completed your hardware installation, you'll return to this guide to finish installation and configuration of the Intel® Distribution of OpenVINO™ toolkit.
|
||||
|
||||
Links to install and configure compatible hardware
|
||||
- [The Intel® Vision Accelerator Design with an Intel® Arria 10 FPGA SG2 (Mustang-F100-A10)](VisionAcceleratorFPGA_Configure_Windows.md)
|
||||
|
||||
Congratulations, you have finished the Intel® Distribution of OpenVINO™ toolkit installation for FPGA. To learn more about how the Intel® Distribution of OpenVINO™ toolkit works, the Hello World tutorial and other resources are provided below.
|
||||
|
||||
## <a name="optional-steps"></a>Optional Steps
|
||||
|
||||
Use the optional steps below if you want to:
|
||||
* Infer models on <a href="#Install-GPU">Intel® Processor Graphics</a>
|
||||
* Infer models on <a href="#usb-myriad">Intel® Vision Accelerator Design with Intel® Movidius™ VPUs</a>
|
||||
* <a href="#Update-Path">Add CMake* or Python* to your Windows* environment variables</a>.
|
||||
|
||||
### <a name="Install-GPU"></a>Optional: Additional Installation Steps for Intel® Processor Graphics (GPU)
|
||||
|
||||
> **NOTE**: These steps are required only if you want to use a GPU.
|
||||
|
||||
If your applications offload computation to Intel® Integrated Graphics, you must have the Intel Graphics Driver for Windows version 15.65 or higher. To see if you have this driver installed:
|
||||
|
||||
1. Type **device manager** in your **Search Windows** box. The **Device Manager** opens.
|
||||
|
||||
2. Click the drop-down arrow to view the **Display adapters**. You see the adapter that is installed in your computer:
|
||||
|
||||

|
||||
|
||||
3. Right-click the adapter name and select **Properties**.
|
||||
|
||||
4. Click the **Driver** tab to see the driver version. Make sure the version number is 15.65 or higher.
|
||||
|
||||

|
||||
|
||||
5. If your device driver version is lower than 15.65, [download and install a higher version](http://downloadcenter.intel.com/product/80939/Graphics-Drivers).
|
||||
|
||||
You are done updating your device driver and are ready to use your GPU.
|
||||
|
||||
|
||||
### <a name="hddl-myriad"></a> Optional: Additional Installation Steps for the Intel® Vision Accelerator Design with Intel® Movidius™ VPUs
|
||||
|
||||
> **NOTE**: These steps are required only if you want to use Intel® Vision Accelerator Design with Intel® Movidius™ VPUs.
|
||||
|
||||
To perform inference on Intel® Vision Accelerator Design with Intel® Movidius™ VPUs, the following additional installation steps are required:
|
||||
|
||||
1. If your Intel® Vision Accelerator Design with Intel® Movidius™ VPUs card requires SMBUS connection to PCIe slot (Raw video data card with HW version Fab-B and before), install the SMBUS driver:
|
||||
1. Go to the `<INSTALL_DIR>\deployment_tools\inference-engine\external\hddl\SMBusDriver` directory, where `<INSTALL_DIR>` is the directory in which the Intel Distribution of OpenVINO toolkit is installed.
|
||||
2. Right click on the `hddlsmbus.inf` file and choose **Install** from the pop up menu.
|
||||
|
||||
2. Download and install <a href="https://www.microsoft.com/en-us/download/details.aspx?id=48145">Visual C++ Redistributable for Visual Studio 2017</a>
|
||||
|
||||
You are done installing your device driver and are ready to use your Intel® Vision Accelerator Design with Intel® Movidius™ VPUs.
|
||||
|
||||
See also:
|
||||
|
||||
* For advanced configuration steps for your IEI Mustang-V100-MX8 accelerator, see [Intel® Movidius™ VPUs Setup Guide for Use with Intel® Distribution of OpenVINO™ toolkit](movidius-setup-guide.md).
|
||||
|
||||
* After you've configurated your Intel® Vision Accelerator Design with Intel® Movidius™ VPUs, see [Intel® Movidius™ VPUs Programming Guide for Use with Intel® Distribution of OpenVINO™ toolkit](movidius-programming-guide.md) to learn how to distribute a model across all 8 VPUs to maximize performance.
|
||||
|
||||
After configuration is done, you are ready to run the verification scripts with the HDDL Plugin for your Intel® Vision Accelerator Design with Intel® Movidius™ VPUs.
|
||||
|
||||
1. Open a command prompt window.
|
||||
|
||||
2. Go to the Inference Engine demo directory:
|
||||
```sh
|
||||
cd C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\demo\
|
||||
```
|
||||
3. Run the Image Classification verification script. If you have access to the Internet through the proxy server only, please make sure that it is configured in your environment.
|
||||
```sh
|
||||
demo_squeezenet_download_convert_run.bat -d HDDL
|
||||
```
|
||||
4. Run the Inference Pipeline verification script:
|
||||
```sh
|
||||
demo_security_barrier_camera.bat -d HDDL
|
||||
```
|
||||
|
||||
### <a name="Update-Path"></a>Optional: Update Your Windows Environment Variables
|
||||
|
||||
> **NOTE**: These steps are only required under special circumstances, such as if you forgot to check the box during the CMake\* or Python\* installation to add the application to your Windows `PATH` environment variable.
|
||||
|
||||
Use these steps to update your Windows `PATH` if a command you execute returns an error message stating that an application cannot be found. This might happen if you do not add CMake or Python to your `PATH` environment variable during the installation.
|
||||
|
||||
1. In your **Search Windows** box, type **Edit the system environment variables** and press **Enter**. A window similar to the following displays:
|
||||

|
||||
|
||||
2. At the bottom of the screen, click **Environment Variables**.
|
||||
|
||||
3. Under **System variables**, click **Path** and then **Edit**:
|
||||

|
||||
|
||||
4. In the opened window, click **Browse**. A browse window opens:
|
||||

|
||||
|
||||
5. If you need to add CMake to the `PATH`, browse to the directory in which you installed CMake. The default directory is `C:\Program Files\CMake`.
|
||||
|
||||
6. If you need to add Python to the `PATH`, browse to the directory in which you installed Python. The default directory is `C:\Users\<USER_ID>\AppData\Local\Programs\Python\Python36\Python`.
|
||||
|
||||
7. Click **OK** repeatedly to close each screen.
|
||||
|
||||
Your `PATH` environment variable is updated.
|
||||
|
||||
## <a name="Hello-World-Face-Detection-Tutorial"></a>Hello World Face Detection Tutorial
|
||||
|
||||
Refer to the [OpenVINO™ with FPGA Hello World Face Detection Exercise](https://github.com/intel-iot-devkit/openvino-with-fpga-hello-world-face-detection).
|
||||
|
||||
**Additional Resources**
|
||||
|
||||
- Intel® Distribution of OpenVINO™ toolkit home page: [https://software.intel.com/en-us/openvino-toolkit](https://software.intel.com/en-us/openvino-toolkit)
|
||||
- OpenVINO™ toolkit online documentation: [https://docs.openvinotoolkit.org](https://docs.openvinotoolkit.org)
|
||||
- [Inference Engine FPGA plugin documentation](../IE_DG/supported_plugins/FPGA.md)
|
||||
- [Model Optimizer Developer Guide](../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md).
|
||||
- For more information on Sample Applications, see the [Inference Engine Samples Overview](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Samples_Overview.html)
|
||||
- To learn about pre-trained models for OpenVINO™ toolkit, see the [Pre-Trained Models Overview](https://docs.openvinotoolkit.org/latest/_docs_docs_Pre_Trained_Models.html)
|
||||
- For information on Inference Engine Tutorials, see the [Inference Tutorials](https://github.com/intel-iot-devkit/inference-tutorials-generic)
|
||||
- For IoT Libraries & Code Samples see the [Intel® IoT Developer Kit](https://github.com/intel-iot-devkit).
|
||||
|
||||
To learn more about converting models, go to:
|
||||
|
||||
- [Convert Your Caffe* Model](../MO_DG/prepare_model/convert_model/Convert_Model_From_Caffe.md)
|
||||
- [Convert Your TensorFlow* Model](../MO_DG/prepare_model/convert_model/Convert_Model_From_TensorFlow.md)
|
||||
- [Convert Your MXNet* Model](../MO_DG/prepare_model/convert_model/Convert_Model_From_MxNet.md)
|
||||
- [Convert Your ONNX* Model](../MO_DG/prepare_model/convert_model/Convert_Model_From_ONNX.md)
|
||||
For installation instructions for the last release of Intel® Distribution of OpenVINO™ toolkit for Windows* with FPGA Support, see documentation for the [2020.4 version](https://docs.openvinotoolkit.org/2020.4/openvino_docs_install_guides_installing_openvino_windows_fpga.html).
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
> **NOTES**:
|
||||
> - This guide applies to Microsoft Windows\* 10 64-bit. For Linux* OS information and instructions, see the [Installation Guide for Linux](installing-openvino-linux.md).
|
||||
> - For the Intel® Distribution of OpenVINO™ toolkit for Windows* 10 with FPGA
|
||||
support, see [Installation Guide for Windows* with FPGA support](installing-openvino-windows-fpga.md).
|
||||
> - [Intel® System Studio](https://software.intel.com/en-us/system-studio) is an all-in-one, cross-platform tool suite, purpose-built to simplify system bring-up and improve system and IoT device application performance on Intel® platforms. If you are using the Intel® Distribution of OpenVINO™ with Intel® System Studio, go to [Get Started with Intel® System Studio](https://software.intel.com/en-us/articles/get-started-with-openvino-and-intel-system-studio-2019).
|
||||
|
||||
## Introduction
|
||||
@@ -19,9 +17,9 @@ Your installation is complete when these are all completed:
|
||||
2. Install the dependencies:
|
||||
|
||||
- [Microsoft Visual Studio* with C++ **2019 or 2017** with MSBuild](http://visualstudio.microsoft.com/downloads/)
|
||||
- [CMake **2.8.12 or higher** 64-bit](https://cmake.org/download/)
|
||||
- [CMake **3.10 or higher** 64-bit](https://cmake.org/download/)
|
||||
> **NOTE**: If you want to use Microsoft Visual Studio 2019, you are required to install CMake 3.14.
|
||||
- [Python **3.5** - **3.7** 64-bit](https://www.python.org/downloads/windows/)
|
||||
- [Python **3.6** - **3.8** 64-bit](https://www.python.org/downloads/windows/)
|
||||
> **IMPORTANT**: As part of this installation, make sure you click the option to add the application to your `PATH` environment variable.
|
||||
|
||||
3. <a href="#set-the-environment-variables">Set Environment Variables</a>
|
||||
@@ -62,14 +60,14 @@ The following components are installed by default:
|
||||
|[OpenCV\*](https://docs.opencv.org/master/) |OpenCV* community version compiled for Intel® hardware |
|
||||
|[Inference Engine Samples](../IE_DG/Samples_Overview.md) |A set of simple console applications demonstrating how to use Intel's Deep Learning Inference Engine in your applications. |
|
||||
| [Demos](@ref omz_demos_README) | A set of console applications that demonstrate how you can use the Inference Engine in your applications to solve specific use-cases |
|
||||
| [Additional Tools](../IE_DG/Tools_Overview.md) | A set of tools to work with your models |
|
||||
| Additional Tools | A set of tools to work with your models including [Accuracy Checker utility](@ref omz_tools_accuracy_checker_README), [Post-Training Optimization Tool Guide](@ref pot_README), [Model Downloader](@ref omz_tools_downloader_README) and other |
|
||||
| [Documentation for Pre-Trained Models ](@ref omz_models_intel_index) | Documentation for the pre-trained models available in the [Open Model Zoo repo](https://github.com/opencv/open_model_zoo) |
|
||||
|
||||
### System Requirements
|
||||
|
||||
**Hardware**
|
||||
|
||||
* 6th to 10th generation Intel® Core™ processors and Intel® Xeon® processors
|
||||
* 6th to 11th generation Intel® Core™ processors and Intel® Xeon® processors
|
||||
* Intel® Xeon® processor E family (formerly code named Sandy Bridge, Ivy Bridge, Haswell, and Broadwell)
|
||||
* 3rd generation Intel® Xeon® Scalable processor (formerly code named Cooper Lake)
|
||||
* Intel® Xeon® Scalable processor (formerly Skylake and Cascade Lake)
|
||||
@@ -91,9 +89,9 @@ The following components are installed by default:
|
||||
|
||||
**Software**
|
||||
- [Microsoft Visual Studio* with C++ **2019 or 2017** with MSBuild](http://visualstudio.microsoft.com/downloads/)
|
||||
- [CMake **2.8.12 or higher** 64-bit](https://cmake.org/download/)
|
||||
- [CMake **3.10 or higher** 64-bit](https://cmake.org/download/)
|
||||
> **NOTE**: If you want to use Microsoft Visual Studio 2019, you are required to install CMake 3.14.
|
||||
- [Python **3.5** - **3.7** 64-bit](https://www.python.org/downloads/windows/)
|
||||
- [Python **3.6** - **3.8** 64-bit](https://www.python.org/downloads/windows/)
|
||||
|
||||
## Installation Steps
|
||||
|
||||
@@ -341,12 +339,11 @@ You are done updating your device driver and are ready to use your GPU.
|
||||
|
||||
To perform inference on Intel® Vision Accelerator Design with Intel® Movidius™ VPUs, the following additional installation steps are required:
|
||||
|
||||
1. If your Intel® Vision Accelerator Design with Intel® Movidius™ VPUs card requires SMBUS connection to PCIe slot (Raw video data card with HW version Fab-B and before), install the SMBUS driver:
|
||||
1. Download and install <a href="https://www.microsoft.com/en-us/download/details.aspx?id=48145">Visual C++ Redistributable for Visual Studio 2017</a>
|
||||
2. Check with a support engineer if your Intel® Vision Accelerator Design with Intel® Movidius™ VPUs card requires SMBUS connection to PCIe slot (most unlikely). Install the SMBUS driver only if confirmed (by default, it's not required):
|
||||
1. Go to the `<INSTALL_DIR>\deployment_tools\inference-engine\external\hddl\SMBusDriver` directory, where `<INSTALL_DIR>` is the directory in which the Intel Distribution of OpenVINO toolkit is installed.
|
||||
2. Right click on the `hddlsmbus.inf` file and choose **Install** from the pop up menu.
|
||||
|
||||
2. Download and install <a href="https://www.microsoft.com/en-us/download/details.aspx?id=48145">Visual C++ Redistributable for Visual Studio 2017</a>
|
||||
|
||||
You are done installing your device driver and are ready to use your Intel® Vision Accelerator Design with Intel® Movidius™ VPUs.
|
||||
|
||||
See also:
|
||||
@@ -443,7 +440,7 @@ cd C:\Users\<username>\Documents\Intel\OpenVINO\inference_engine_samples_build\i
|
||||
classification_sample_async.exe -i "C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\demo\car.png" -m "C:\Users\<username>\Documents\Intel\OpenVINO\openvino_models\ir\public\squeezenet1.1\FP16\squeezenet1.1.xml" -d HDDL
|
||||
```
|
||||
|
||||
For information on Sample Applications, see the [Inference Engine Samples Overview](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Samples_Overview.html).
|
||||
For information on Sample Applications, see the [Inference Engine Samples Overview](../IE_DG/Samples_Overview.md).
|
||||
|
||||
Congratulations, you have finished the installation of the Intel® Distribution of OpenVINO™ toolkit for Windows*. To learn more about how the Intel® Distribution of OpenVINO™ toolkit works, the Hello World tutorial and other resources are provided below.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Create a Yocto* Image with OpenVINO™ toolkit {#openvino_docs_install_guides_installing_openvino_yocto}
|
||||
This document provides instructions for creating a Yocto* image with OpenVINO™ toolkit.
|
||||
|
||||
Instructions were validated and tested for [Yocto OpenVINO 2020.3 release](http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel).
|
||||
Instructions were validated and tested for [Yocto OpenVINO 2020.4 release](http://git.yoctoproject.org/cgit/cgit.cgi/meta-intel).
|
||||
|
||||
## System Requirements
|
||||
Use the [Yocto Project* official documentation](https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#brief-compatible-distro) to set up and configure your host machine to be compatible with BitBake*.
|
||||
@@ -60,9 +60,6 @@ CORE_IMAGE_EXTRA_INSTALL_append = " openvino-inference-engine-samples"
|
||||
# Include inference engine python API package in the target image.
|
||||
CORE_IMAGE_EXTRA_INSTALL_append = " openvino-inference-engine-python3"
|
||||
|
||||
# This adds inference engine unit tests in the target image.
|
||||
CORE_IMAGE_EXTRA_INSTALL_append = " openvino-inference-engine-ptest"
|
||||
|
||||
# Enable MYRIAD plugin
|
||||
CORE_IMAGE_EXTRA_INSTALL_append = " openvino-inference-engine-vpu-firmware"
|
||||
|
||||
@@ -90,7 +87,6 @@ Verify that it returns the list of packages below:
|
||||
openvino-inference-engine
|
||||
openvino-inference-engine-dbg
|
||||
openvino-inference-engine-dev
|
||||
openvino-inference-engine-ptest
|
||||
openvino-inference-engine-python3
|
||||
openvino-inference-engine-samples
|
||||
openvino-inference-engine-src
|
||||
|
||||
@@ -19,11 +19,11 @@ Configure YUM with the OpenVINO repository to install OpenVINO. You have two opt
|
||||
```
|
||||
2. Add repository using the `yum-config-manager`:
|
||||
```sh
|
||||
sudo yum-config-manager --add-repo https://yum.repos.intel.com/openvino/2020/setup/intel-openvino-2020.repo
|
||||
sudo yum-config-manager --add-repo https://yum.repos.intel.com/openvino/2021/setup/intel-openvino-2021.repo
|
||||
```
|
||||
3. Import the gpg public key for the repository:
|
||||
```sh
|
||||
sudo rpm --import https://yum.repos.intel.com/openvino/2020/setup/RPM-GPG-KEY-INTEL-OPENVINO-2020
|
||||
sudo rpm --import https://yum.repos.intel.com/openvino/2021/setup/RPM-GPG-KEY-INTEL-OPENVINO-2021
|
||||
```
|
||||
|
||||
* **OPTION 2:** Create the repository file manually:
|
||||
@@ -33,21 +33,21 @@ Configure YUM with the OpenVINO repository to install OpenVINO. You have two opt
|
||||
```
|
||||
2. Edit the repo file:
|
||||
```sh
|
||||
vi intel-openvino-2020.repo
|
||||
vi intel-openvino-2021.repo
|
||||
```
|
||||
3. Append the following code:
|
||||
```sh
|
||||
[intel-openvino-2020]
|
||||
name=Intel(R) Distribution of OpenVINO 2020
|
||||
baseurl=https://yum.repos.intel.com/openvino/2020
|
||||
[intel-openvino-2021]
|
||||
name=Intel(R) Distribution of OpenVINO 2021
|
||||
baseurl=https://yum.repos.intel.com/openvino/2021
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-INTEL-OPENVINO-2020
|
||||
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-INTEL-OPENVINO-2021
|
||||
```
|
||||
4. Save and close the `intel-openvino-2020.repo` file.
|
||||
4. Save and close the `intel-openvino-2021.repo` file.
|
||||
5. Import the gpg public key for the repository:
|
||||
```sh
|
||||
sudo rpm --import https://yum.repos.intel.com/openvino/2020/setup/RPM-GPG-KEY-INTEL-OPENVINO-2020
|
||||
sudo rpm --import https://yum.repos.intel.com/openvino/2021/setup/RPM-GPG-KEY-INTEL-OPENVINO-2021
|
||||
```
|
||||
|
||||
### Verify that the new repo is properly setup
|
||||
@@ -58,7 +58,7 @@ yum repolist | grep -i openvino
|
||||
|
||||
Results:
|
||||
```sh
|
||||
intel-openvino-2020 Intel(R) Distribution of OpenVINO 2020
|
||||
intel-openvino-2021 Intel(R) Distribution of OpenVINO 2021
|
||||
```
|
||||
|
||||
### To list the available OpenVINO packages
|
||||
@@ -103,9 +103,9 @@ sudo yum autoremove intel-openvino-runtime-centos<OS_VERSION>-<VERSION>.<UPDATE>
|
||||
|
||||
- Intel® Distribution of OpenVINO™ toolkit home page: [https://software.intel.com/en-us/openvino-toolkit](https://software.intel.com/en-us/openvino-toolkit)
|
||||
- OpenVINO™ toolkit online documentation: [https://docs.openvinotoolkit.org](https://docs.openvinotoolkit.org)
|
||||
- [Model Optimizer Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html).
|
||||
- [Inference Engine Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Deep_Learning_Inference_Engine_DevGuide.html)
|
||||
- For more information on Sample Applications, see the [Inference Engine Samples Overview](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Samples_Overview.html).
|
||||
- [Model Optimizer Developer Guide](../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md).
|
||||
- [Inference Engine Developer Guide](../IE_DG/Deep_Learning_Inference_Engine_DevGuide.md).
|
||||
- For more information on Sample Applications, see the [Inference Engine Samples Overview](../IE_DG/Samples_Overview.md).
|
||||
- For information on Inference Engine Tutorials, see the [Inference Tutorials](https://github.com/intel-iot-devkit/inference-tutorials-generic).
|
||||
- For IoT Libraries & Code Samples see the [Intel® IoT Developer Kit](https://github.com/intel-iot-devkit).
|
||||
|
||||
|
||||
36
docs/nGraph_DG/build_function.md
Normal file
36
docs/nGraph_DG/build_function.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# Build nGraph Function {#openvino_docs_nGraph_DG_build_function}
|
||||
|
||||
This section illustrates how to construct an nGraph function
|
||||
composed of operations from an available opset. Once created,
|
||||
it can wrap into a `CNNNetwork`, creating utility for data scientists
|
||||
or app developers to define a deep-learning model in a neutral way
|
||||
that does not depend on existing Deep Learning (DL) frameworks.
|
||||
|
||||
Operation Set `opsetX` integrates a list of nGraph pre-compiled operations that work
|
||||
for this purpose. In other words, `opsetX` defines a set of operations for building a graph.
|
||||
|
||||
For a complete list of operation sets supported by Inference Engine, see [Available Operations Sets](../ops/opset.md).
|
||||
|
||||
To add custom nGraph operations to an existing `CNNNetwork`, see
|
||||
the [Add Custom nGraph Operations](../IE_DG/Extensibility_DG/Intro.md) document.
|
||||
|
||||
Below you can find examples on to how build `ngraph::Function` from the `opset3` operations:
|
||||
|
||||
@snippet example_ngraph_utils.cpp ngraph:include
|
||||
|
||||
@snippet example_ngraph_utils.cpp ngraph_utils:simple_function
|
||||
|
||||
@snippet example_ngraph_utils.cpp ngraph_utils:advanced_function
|
||||
|
||||
To wrap it into a CNNNetwork, use:
|
||||
```cpp
|
||||
CNNNetwork net (ng_function);
|
||||
```
|
||||
## See Also
|
||||
|
||||
* [Available Operation Sets](../ops/opset.md)
|
||||
* [Operation Set `opset1` Specification](../ops/opset1.md)
|
||||
* [Operation Set `opset2` Specification](../ops/opset2.md)
|
||||
* [Operation Set `opset3` Specification](../ops/opset3.md)
|
||||
* [Operation Set `opset4` Specification](../ops/opset4.md)
|
||||
* [Inference Engine Extensibility Developer Guide](../IE_DG/Extensibility_DG/Intro.md)
|
||||
3
docs/nGraph_DG/img/graph_rewrite_efficient_search.png
Normal file
3
docs/nGraph_DG/img/graph_rewrite_efficient_search.png
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:05eb8600d2c905975674f3a0a5dc676107d22f65f2a1f78ee1cfabc1771721ea
|
||||
size 41307
|
||||
3
docs/nGraph_DG/img/graph_rewrite_execution.png
Normal file
3
docs/nGraph_DG/img/graph_rewrite_execution.png
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:17cd470c6d04d7aabbdb4a08e31f9c97eab960cf7ef5bbd3a541df92db38f26b
|
||||
size 40458
|
||||
3
docs/nGraph_DG/img/register_new_node.png
Normal file
3
docs/nGraph_DG/img/register_new_node.png
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:80297287c81a2f27b7e74895738afd90844354a8dd745757e8321e2fb6ed547e
|
||||
size 31246
|
||||
3
docs/nGraph_DG/img/transformations_structure.png
Normal file
3
docs/nGraph_DG/img/transformations_structure.png
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0b206c602626f17ba5787810b9a28f9cde511448c3e63a5c7ba976cee7868bdb
|
||||
size 14907
|
||||
46
docs/nGraph_DG/intro.md
Normal file
46
docs/nGraph_DG/intro.md
Normal file
@@ -0,0 +1,46 @@
|
||||
# Introduction to the nGraph {#openvino_docs_nGraph_DG_Introduction}
|
||||
|
||||
The Inference Engine integrates the nGraph to represent a model in run time underneath of the conventional
|
||||
`CNNNetwork` API, which is an instance of `ngraph::Function`.
|
||||
|
||||
Besides the representation update, nGraph supports new features:
|
||||
|
||||
1. nGraph contains several [sets of operations which are called `opset1`, `opset2` and etc.](../ops/opset.md).
|
||||
Operations from these operation sets are generated by the Model Optimizer and are accepted in the Inference Engine.
|
||||
|
||||
2. Operation version is attached to each operation rather than to the entire IR file format.
|
||||
IR is still versioned but has a different meaning. For details, see [Deep Learning Network Intermediate Representation and Operation Sets in OpenVINO™](../MO_DG/IR_and_opsets.md).
|
||||
|
||||
3. Creating models in run-time without loading IR from an xml/binary file. You can enable it by creating
|
||||
`ngraph::Function` passing it to `CNNNetwork`.
|
||||
|
||||
4. Run-time reshape capability and constant folding are implemented through the nGraph code for more operations compared to previous releases.
|
||||
As a result, more models can be reshaped. For details, see the [dedicated guide about the reshape capability](../IE_DG/ShapeInference.md).
|
||||
|
||||
5. Loading [model from ONNX format](../IE_DG/ONNX_Support.md) without converting it to the Inference Engine IR.
|
||||
|
||||
6. nGraph representation supports dynamic shapes. You can use `CNNNetwork::reshape()` method in order to specialize input shapes.
|
||||
|
||||
The complete picture of existed flow is presented below.
|
||||
|
||||

|
||||
|
||||
## Read the Intermediate Representation to `CNNNetwork`
|
||||
|
||||
The IR version 10 automatically triggers the nGraph flow inside the Inference Engine.
|
||||
When such IR is read in an application, the Inference Engine IR reader produces `CNNNetwork` that encapsulates the `ngraph::Function` instance underneath.
|
||||
|
||||
Interpretation of the IR version 10 differs from the old IR version.
|
||||
Besides having a different operations set, the IR version 10 ignores the shapes and data types assigned to the ports in an XML file.
|
||||
Both shapes and types are reinferred while loading to the Inference Engine using the nGraph shape and type propagation function that is a part of each nGraph operation.
|
||||
|
||||
## Build a Model in the Application
|
||||
|
||||
Alternative method to feed the Inference Engine with a model is to create the model in the run time.
|
||||
It is achieved by creation of the `ngraph::Function` construction using nGraph operation classes and optionally user-defined operations.
|
||||
For details, see [Add Custom nGraph Operations](../IE_DG/Extensibility_DG/AddingNGraphOps.md) and [examples](build_function.md).
|
||||
At this stage, the code is completely independent of the rest of the Inference Engine code and can be built separately.
|
||||
After you construct an instance of `ngraph::Function`, you can use it to create `CNNNetwork` by passing it to the new constructor for this class.
|
||||
|
||||
## See Also
|
||||
- [Available Operations Sets](../ops/opset.md)
|
||||
443
docs/nGraph_DG/nGraphTransformation.md
Normal file
443
docs/nGraph_DG/nGraphTransformation.md
Normal file
@@ -0,0 +1,443 @@
|
||||
# Overview of Transformations API {#ngraph_transformation}
|
||||
|
||||
This guide contains all necessary information that you need to start implementing nGraph transformations.
|
||||
|
||||
## Prerequisites
|
||||
Before creating a transformation, do the following:
|
||||
|
||||
* Make sure that there is no transformation with the same functionality in the [Transformation Library](group__ie__transformation__api.html)
|
||||
* Learn how the [Transformation Library](group__ie__transformation__api.html) is structured and how transformations are organized
|
||||
* Understand where to put your transformation code
|
||||
|
||||
### Transformation Library Structure
|
||||
Transformation library is independent from Inference Engine target library named as `inference_engine_transformations`
|
||||
and is located in the `inference-engine/src/transformations` directory.
|
||||
|
||||
Transformations root directory contains two folders:
|
||||
* `ngraph_ops` - Contains legacy opset operations needed for nGraph to CNNNetwork conversion.
|
||||
> **NOTE**: This operation is prohibited inside new plugins until they are not moved to a separate directory with allowed operations.
|
||||
* `transformations` - Includes all transformations, utils, runtime info attributes, and pass managers.
|
||||
> **NOTE**: Do not use transformation that belongs to `ngraph::pass::ConvertOpSet1ToLegacy` transformations until they are not moved to a separate directory with allowed transformations.
|
||||
|
||||
### Transformation Flow Layers
|
||||
Transformation flow in the transformation library has several layers:
|
||||
|
||||
1. Pass managers - Execute any type of transformations and provide additional debug capabilities.
|
||||
2. Transformations - Perform a particular transformation algorithm on `ngraph::Function`.
|
||||
3. Low-level functions - Take a set of nodes and perform some transformation action.
|
||||
They are not mandatory and all transformation code can be located inside the transformation.
|
||||
But if some transformation parts can potentially be reused in other transformations, we suggest keeping them as a separate functions.
|
||||
|
||||
### Location for Your Transformation Code
|
||||
To decide where to store your transformation code, please follow these rules:
|
||||
|
||||
1. If it is a plugin-specific transformation and cannot be reused by other plugins, keep source code inside plugin.
|
||||
2. If this transformation relates to the OpSetXToOpSetY conversion or it is common optimization, keep sources inside the transformation library.
|
||||
|
||||
After you decide where to store your transformation code, you can start developing your own nGraph transformation.
|
||||
|
||||
## ngraph::Function and graph representation <a name="ngraph_function"></a>
|
||||
|
||||
An nGraph function is a simple thing: it stores shared pointers to `ngraph::op::Result` and `ngraph::op::Parameter` operations that are inputs and outputs of the graph.
|
||||
All other operations hold each other via shared pointers: child operation holds its parent (hard link). If the operation has no consumers and it is not a Result operation
|
||||
(shared pointer counter is zero), it is destructed and is not accessible anymore. Each operation in `ngraph::Function` has a `std::shared_ptr<ngraph::Node>` type.
|
||||
|
||||
For examples of how to build an nGraph function, see the [Build nGraph Function](./build_function.md) page.
|
||||
|
||||
## Transformations types <a name="transformations_types"></a>
|
||||
|
||||
nGraph has three main transformation types:
|
||||
|
||||
* `ngraph::pass::FunctionPass` - straightforward way to work with `ngraph::Function` directly
|
||||
* `ngraph::pass::MatcherPass` - pattern-based transformation approach
|
||||
* `ngraph::pass::GraphRewrite` - container for matcher passes
|
||||
|
||||
![transformations_structure]
|
||||
|
||||
### ngraph::pass::FunctionPass <a name="function_pass"></a>
|
||||
|
||||
`ngraph::pass::FunctionPass` is used for transformations that take entire `ngraph::Function` as an input and process it.
|
||||
|
||||
Template for FunctionPass transformation class
|
||||
|
||||
@snippet src/template_function_transformation.hpp function_pass:template_transformation_hpp
|
||||
|
||||
@snippet src/template_function_transformation.cpp function_pass:template_transformation_cpp
|
||||
|
||||
Using `ngraph::FunctionPass`, you need to override the `run_on_function` method where you will write the transformation code.
|
||||
Return value is `true` if the original function has changed during transformation (new operation was added, or operations replacement was made, or node attributes were changed); otherwise, it is `false`.
|
||||
For transformation API, please follow the [working with ngraph::Function](#working_with_ngraph_function) section.
|
||||
Also `ngraph::FunctionPass` based transformations can be executed via `pass::Manager`. See the examples in the [Using pass manager](#using_pass_manager) section.
|
||||
|
||||
### ngraph::pass::MatcherPass <a name="matcher_pass"></a>
|
||||
|
||||
`ngraph::pass::MatcherPass` is used for pattern-based transformations.
|
||||
|
||||
Template for MatcherPass transformation class
|
||||
@snippet src/template_pattern_transformation.hpp graph_rewrite:template_transformation_hpp
|
||||
|
||||
@snippet src/template_pattern_transformation.cpp graph_rewrite:template_transformation_cpp
|
||||
|
||||
To use `ngraph::pass::MatcherPass`, you need to complete these steps:
|
||||
1. Create a pattern
|
||||
2. Implement a callback
|
||||
3. Register the pattern and Matcher
|
||||
4. Execute MatcherPass
|
||||
|
||||
So let's go through each of these steps.
|
||||
|
||||
### Create a pattern
|
||||
Pattern is a single root `ngraph::Function`. But the only difference is that you do not need to create a function object, you just need to create and connect nGraph or special pattern operations. Then you need to take the last created operation and put it as a root of the pattern. This root node will be used as a root node in pattern matching.
|
||||
> **NOTE**: Any nodes in a pattern that have no consumers and are not registered as root will not be used in pattern matching.
|
||||
|
||||
@snippet example_ngraph_utils.cpp pattern:simple_example
|
||||
|
||||
The `Parameter` operation in the example above has type and shape specified. These attributes are needed only to create Parameter operation class and will not be used in pattern matching.
|
||||
|
||||
For instructions on how to match a pattern where `ShapeOf` takes any operation as an input, follow the [pattern matching](#pattern_matching) section.
|
||||
|
||||
### Implement callback
|
||||
Callback is an action applied to every pattern entrance. In general, callback is the lambda function that takes Matcher object with detected subgraph.
|
||||
|
||||
@snippet example_ngraph_utils.cpp pattern:callback_example
|
||||
|
||||
The example above shows the callback structure and how Matcher can be used for accessing nodes detected by pattern.
|
||||
Callback return value is `true` if root node was replaced and another pattern cannot be applied to the same root node; otherwise, it is `false`.
|
||||
> **NOTE**: It is not recommended to manipulate with nodes that are under root node. This may affect GraphRewrite execution as it is expected that all nodes that come after root node in topological order are valid and can be used in pattern matching.
|
||||
|
||||
MatcherPass also provides functionality that allows reporting of the newly created nodes that can be used in additional pattern matching.
|
||||
If MatcherPass was registered in `pass::Manager` or `pass::GraphRewrite`, these registered nodes will be added for additional pattern matching.
|
||||
That means that matcher passes registered in `pass::GraphRewrite` will be applied to these nodes.
|
||||
|
||||
The example below shows how single MatcherPass can fuse sequence of operations using the `register_new_node` method.
|
||||
|
||||
@snippet src/template_pattern_transformation.cpp matcher_pass:relu_fusion
|
||||
|
||||
> **NOTE**: If you register multiple nodes, please add them in topological order. We do not topologically sort these nodes as it is a time-consuming operation.
|
||||
|
||||
### Register pattern and Matcher
|
||||
The last step is to register Matcher and callback inside the MatcherPass pass. To do this, call the `register_matcher` method.
|
||||
> **NOTE**: Only one matcher can be registered for a single MatcherPass class.
|
||||
|
||||
```cpp
|
||||
// Register matcher and callback
|
||||
register_matcher(m, callback);
|
||||
```
|
||||
### Execute MatcherPass
|
||||
MatcherPass has multiple ways to be executed:
|
||||
* Run on a single node - it can be useful if you want to run MatcherPass inside another transformation.
|
||||
@snippet src/template_pattern_transformation.cpp matcher_pass:run_on_node
|
||||
* Run on `ngraph::Function` using GraphRewrite - this approach gives ability to run MatcherPass on whole `ngraph::Function`. Moreover, multiple MatcherPass transformation can be registered in a single GraphRewite to be executed in a single graph traversal.
|
||||
@snippet src/template_pattern_transformation.cpp matcher_pass:graph_rewrite
|
||||
* Run on `ngraph::Function` using `pass::Manager` - this approach helps you to register MatcherPass for execution on `ngraph::Function` as another transformation types.
|
||||
@snippet src/template_pattern_transformation.cpp matcher_pass:manager
|
||||
|
||||
|
||||
### ngraph::pass::GraphRewrite <a name="graph_rewrite_pass"></a>
|
||||
|
||||
GraphRewrite pass serves for running multiple matcher passes on `ngraph::Function` in a single graph traversal.
|
||||
Example:
|
||||
|
||||
@snippet src/template_pattern_transformation.cpp matcher_pass:graph_rewrite
|
||||
|
||||
In addition, GraphRewrite handles nodes that were registered by MatcherPasses during their execution. This nodes will be added to the beginning of the sequence with nodes for pattern matching.
|
||||
|
||||
> **NOTE**: when using `pass::Manager` temporary GraphRewrite is used to execute single MatcherPass.
|
||||
|
||||
GraphRewrite has two algorithms for MatcherPasses execution. First algorithm is straightforward. It applies each MatcherPass in registration order to current node.
|
||||
|
||||
![graph_rewrite_execution]
|
||||
|
||||
But it is not really efficient when you have a lot of registered passes. So first of all GraphRewrite checks that all MatcherPass patterns has type-based root node (it means that type of this node is not hidden into predicate).
|
||||
And then creates map from registered MatcherPasses. That helps to avoid additional cost of applying each MatcherPass for each node.
|
||||
|
||||
![graph_rewrite_efficient_search]
|
||||
|
||||
## Pattern Matching <a name="pattern_matching"></a>
|
||||
|
||||
Sometimes patterns cannot be expressed via regular nGraph operations or it is too complicated.
|
||||
For example, if you want to detect Convolution->Add sub-graph without specifying particular input type for Convolution operation or you want to create a pattern where some of operations can have different types.
|
||||
And for these cases nGraph provides additional helpers to construct patterns for GraphRewrite transformations.
|
||||
|
||||
There are two main helpers:
|
||||
1. `ngraph::pattern::any_input` - helps to express inputs if their types are undefined.
|
||||
2. `ngraph::pattern::wrap_type<T>` - helps to express nodes of pattern without specifying node attributes.
|
||||
|
||||
Let's go through the example to have better understanding of how it works:
|
||||
|
||||
> **NOTE**: Node attributes do not participate in pattern matching and are needed only for operations creation. Only operation types participate in pattern matching.
|
||||
|
||||
The example below shows basic usage of `pattern::any_input`.
|
||||
Here we construct Multiply pattern with arbitrary first input and Constant as a second input.
|
||||
Also as Multiply is commutative operation, it does not matter in which order we set inputs (any_input/Constant or Constant/any_input) because both cases will be matched.
|
||||
|
||||
@snippet example_ngraph_utils.cpp pattern:label_example
|
||||
|
||||
This example shows how we can construct a pattern when operation has arbitrary number of inputs.
|
||||
|
||||
@snippet example_ngraph_utils.cpp pattern:concat_example
|
||||
|
||||
This example shows how to use predicate to construct a pattern. Also it shows how to match pattern manually on given node.
|
||||
|
||||
@snippet example_ngraph_utils.cpp pattern:predicate_example
|
||||
|
||||
> **NOTE**: Be careful with manual matching because Matcher object holds matched nodes. To clear a match, use the m->clear_state() method.
|
||||
|
||||
## Working with ngraph::Function <a name="working_with_ngraph_function"></a>
|
||||
|
||||
In this chapter we will review nGraph API that allows us to manipulate with `ngraph::Function`.
|
||||
|
||||
### ngraph::Node input and output ports
|
||||
|
||||
First of all let's talk about `ngraph::Node` input/output ports. Each nGraph operation has input and output ports except cases when operation has `Result`, `Parameter`, or `Constant` type.
|
||||
|
||||
Every port belongs to its node, so using a port we can access parent node, get shape and type for particular input/output, get all consumers in case of output port, and get producer node in case of input port.
|
||||
With output port we can set inputs for newly created operations.
|
||||
|
||||
Lets look at the code example.
|
||||
|
||||
@snippet example_ngraph_utils.cpp ngraph:ports_example
|
||||
|
||||
You may notice that we usually construct operations in this way:
|
||||
```cpp
|
||||
std::shared_ptr<Node> neg_const = opset1::Constant::create(sub->get_input_element_type(1), Shape{1}, {-1}));
|
||||
Output<Node> data = node->input_value(0);
|
||||
auto neg = std::make_shared<ngraph::opset1::Multiply>(data, neg_const);
|
||||
```
|
||||
In this example, the `opset3::Multiply` operation takes `Output<Node>` and `std::shared_ptr<Node>` as inputs. But the constructor takes both as `Output<Node>`.
|
||||
In this case, `std::shared_ptr<Node>` will be automatically converted to `Output<Node>` if node has exactly one output port; otherwise, conversion raises an exception.
|
||||
|
||||
### ngraph::Node replacement
|
||||
|
||||
nGraph provides two ways for node replacement: via nGraph helper function and directly via port methods. We are going to review both of them.
|
||||
|
||||
Let's start with nGraph helper functions. The most popular function is `ngraph::replace_node(old_node, new_node)`.
|
||||
|
||||
We will review real replacement case where Negative operation is replaced with Multiply.
|
||||
|
||||
![ngraph_replace_node]
|
||||
|
||||
@snippet example_ngraph_utils.cpp ngraph:replace_node
|
||||
|
||||
`ngraph::replace_node` has a constraint that number of output ports for both of ops must be the same; otherwise, it raises an exception.
|
||||
|
||||
|
||||
The alternative way to do the same replacement is the following:
|
||||
```cpp
|
||||
// All neg->output(0) consumers will be moved to mul->output(0) port
|
||||
neg->output(0).replace(mul->output(0));
|
||||
```
|
||||
|
||||
Another transformation example is insertion.
|
||||
|
||||
![ngraph_insert_node]
|
||||
|
||||
@snippet example_ngraph_utils.cpp ngraph:insert_node
|
||||
|
||||
The alternative way to the insert operation is to make a node copy and use `replace_node`:
|
||||
|
||||
@snippet example_ngraph_utils.cpp ngraph:insert_node_with_copy
|
||||
|
||||
### ngraph::Node elimination
|
||||
|
||||
Another type of node replacement is its elimination.
|
||||
|
||||
To eliminate operation, nGraph has special method that considers all limitations related to InferenceEngine.
|
||||
|
||||
@snippet example_ngraph_utils.cpp ngraph:eliminate_node
|
||||
|
||||
`replace_output_update_name` in case of successful replacement it automatically preserves friendly name and runtime info.
|
||||
|
||||
|
||||
## Transformation writing essentials <a name="transformation_writing_essentials"></a>
|
||||
|
||||
When developing a transformation, you need to follow these transformation rules:
|
||||
|
||||
### Operation Set (OpSet)
|
||||
|
||||
Use the latest version of OpSet in your transformation. An exception is ConvertOpSetXToOpSetY transformations, where you must use operations from OpSetX and OpSetY.
|
||||
|
||||
@snippet example_ngraph_utils.cpp ngraph:include
|
||||
|
||||
### Dynamic Shape and Rank
|
||||
|
||||
nGraph has two types for shape representation:
|
||||
`ngraph::Shape` - represents static shape.
|
||||
`ngraph::PartialShape` - represents dynamic shape. It means that rank or some of dimensions are dynamic (undefined).
|
||||
`ngraph::PartialShape` can be converted to `ngraph::Shape` using the `get_shape()` method if all dimensions are static; otherwise, conversion raises an exception.
|
||||
|
||||
@snippet example_ngraph_utils.cpp ngraph:shape
|
||||
|
||||
But in most cases before getting static shape using `get_shape()` method, you need to check that shape is static.
|
||||
|
||||
Also if your transformation requires only input shape rank or particular dimension value, please do not use the `get_shape()` method. See the example below demonstrating how to avoid using `get_shape()`
|
||||
|
||||
@snippet example_ngraph_utils.cpp ngraph:shape_check
|
||||
|
||||
Not using `get_shape()` method makes your transformation more flexible and applicable for more cases.
|
||||
|
||||
###3. Friendly Names
|
||||
|
||||
Each `ngraph::Node` has a unique name (used for nGraph internals) and a friendly name. In transformations we care only about friendly name because it represents the name from intermediate representation (IR).
|
||||
Also friendly name is used as output tensor name (until we do not have other way to represent output tensor name) and user code that requests intermediate outputs based on these names.
|
||||
To avoid loosing friendly name when replacing node with other node or subgraph, set the original friendly name to the latest node in replacing subgraph. See the example below.
|
||||
|
||||
```cpp
|
||||
// Replace Div operation with Power and Multiply sub-graph and set original friendly name to Multiply operation
|
||||
auto pow = std::make_shared<ngraph::opset1::Power>(div->input(1).get_source_output(),
|
||||
op::Constant::create(div->get_input_element_type(1), Shape{1}, {-1}));
|
||||
auto mul = std::make_shared<ngraph::opset1::Multiply>(div->input(0).get_source_output(), pow);
|
||||
mul->set_friendly_name(div->get_friendly_name());
|
||||
ngraph::replace_node(div, mul);
|
||||
```
|
||||
|
||||
In more advanced cases, when replaced operation has several outputs and we add additional consumers to its outputs, we make a decision how to set friendly name by arrangement.
|
||||
|
||||
###4. Runtime Info
|
||||
|
||||
Runtime info is a map `std::map<std::string, std::shared_ptr<Variant>>` located inside `ngraph::Node` class. It represents additional attributes in `ngraph::Node`.
|
||||
These attributes can be set by users or by plugins and when executing transformation that changes `ngraph::Function` we need to preserve these attributes as they will not be automatically propagated.
|
||||
In most cases, transformations have the following types: 1:1 (replace node with another node), 1:N (replace node with a sub-graph), N:1 (fuse sub-graph into a single node), N:M (any other transformation).
|
||||
Currently, there is no mechanism that automatically detects transformation types, so we need to propagate this runtime information manually. See the examples below.
|
||||
|
||||
```cpp
|
||||
// Replace Transpose with Reshape operation (1:1)
|
||||
ngraph::copy_runtime_info(transpose, reshape);
|
||||
```
|
||||
|
||||
```cpp
|
||||
// Replace Div operation with Power and Multiply sub-graph (1:N)
|
||||
ngraph::copy_runtime_info(div, {pow, mul});
|
||||
```
|
||||
|
||||
```cpp
|
||||
// Fuse Convolution with Add operation (N:1)
|
||||
ngraph::copy_runtime_info({conv, bias}, {conv_ie});
|
||||
```
|
||||
|
||||
```cpp
|
||||
// Any other transformation that replaces one sub-graph with another sub-graph (N:M)
|
||||
ngraph::copy_runtime_info({a, b, c}, {e, f});
|
||||
```
|
||||
|
||||
When transformation has multiple fusions or decompositions, `ngraph::copy_runtime_info` must be called multiple times for each case.
|
||||
|
||||
> **Note**: copy_runtime_info removes rt_info from destination nodes. If you want to keep it, you need to specify them in source nodes like this: copy_runtime_info({a, b, c}, {a, b})
|
||||
|
||||
###5. Constant Folding
|
||||
|
||||
If your transformation inserts constant sub-graphs that need to be folded, do not forget to use `ngraph::pass::ConstantFolding()` after your transformation or call constant folding directly for operation.
|
||||
The example below shows how constant subgraph can be constructed.
|
||||
|
||||
```cpp
|
||||
// After ConstantFolding pass Power will be replaced with Constant
|
||||
auto pow = std::make_shared<ngraph::opset3::Power>(
|
||||
opset3::Constant::create(element::f32, Shape{1}, {2})
|
||||
opset3::Constant::create(element::f32, Shape{1}, {3}));
|
||||
auto mul = std::make_shared<ngraph::opset3::Multiply>(input /* not constant input */, pow);
|
||||
```
|
||||
|
||||
Manual constant folding is more preferable than `ngraph::pass::ConstantFolding()` because it is much faster.
|
||||
|
||||
Below you can find an example of manual constant folding:
|
||||
|
||||
@snippet src/template_pattern_transformation.cpp manual_constant_folding
|
||||
|
||||
## Common mistakes in transformations <a name="common_mistakes"></a>
|
||||
|
||||
In transformation development process:
|
||||
|
||||
* Do not use deprecated nGraph API. Deprecated methods has the `NGRAPH_DEPRECATED` macros in its definition.
|
||||
* Do not pass `shared_ptr<Node>` as an input for other node if type of node is unknown or it has multiple outputs. Use explicit output port.
|
||||
* If you replace node with another node that produces different shape, remember that new shape will not be propagated until the first `validate_nodes_and_infer_types` call for `ngraph::Function`. If you are using `pass::Manager`, it will automatically call this method after each transformation execution.
|
||||
* Do not forget to call the `ngraph::ConstantFolding` pass if your transformation creates constant subgraphs.
|
||||
* Use latest OpSet if you are not developing downgrade transformation pass.
|
||||
* When developing a callback for `ngraph::pass::MatcherPass`, do not change nodes that come after the root node in topological order.
|
||||
|
||||
## Using pass manager <a name="using_pass_manager"></a>
|
||||
|
||||
`ngraph::pass::Manager` is a container class that can store the list of transformations and execute them. The main idea of this class is to have high-level representation for grouped list of transformations.
|
||||
It can register and apply any [transformation types](#transformations_types) on function.
|
||||
In addition, `ngraph::pass::Manager` has extended debug capabilities (find more information in the [how to debug transformations](#how_to_debug_transformations) section).
|
||||
|
||||
The example below shows basic usage of `ngraph::pass::Manager`
|
||||
|
||||
@snippet src/template_pattern_transformation.cpp matcher_pass:manager3
|
||||
|
||||
Another example shows how multiple matcher passes can be united into single GraphRewrite.
|
||||
|
||||
@snippet src/template_pattern_transformation.cpp matcher_pass:manager2
|
||||
|
||||
## How to debug transformations <a name="how_to_debug_transformations"></a>
|
||||
|
||||
The most popular tool for transformations debugging is the `ngraph::pass::VisualizeTree` transformation, which visualizes ngraph::Function.
|
||||
|
||||
Usage example:
|
||||
|
||||
@snippet example_ngraph_utils.cpp ngraph:visualize
|
||||
|
||||
`ngraph::pass::VisualizeTree` can be parametrized via environment variables:
|
||||
|
||||
```
|
||||
NGRAPH_VISUALIZE_TREE_OUTPUT_SHAPES=1 - visualize shapes
|
||||
NGRAPH_VISUALIZE_TREE_OUTPUT_TYPES=1 - visualize types
|
||||
```
|
||||
|
||||
> **Note**: current VisualTree does not have user-friendly interface and it will be changed in the nearest future. The intention is to move visualization abilities inside transformations.
|
||||
|
||||
If you are using `ngraph::pass::Manager` to run sequence of transformations, you can get additional debug capabilities by using the following environment variables:
|
||||
|
||||
```
|
||||
NGRAPH_PROFILE_PASS_ENABLE=1 - enables performance measurement for each transformation and prints execution status
|
||||
NGRAPH_ENABLE_VISUALIZE_TRACING=1 - enables visualization after each transformation. By default, it saves dot and svg files.
|
||||
```
|
||||
|
||||
> **Note**: Make sure that you have dot installed on your machine; otherwise, it will silently save only dot file without svg file.
|
||||
|
||||
## Disabling/Enabling specific transformations for plugin X <a name="disabling_transformation"></a>
|
||||
|
||||
This topic is mostly related to conversion to legacy opset and plugins that are based on CNNNetwork. But this mechanism still can be applied for other cases.
|
||||
Let's suppose that plugin X enabled the `opset3::StridedSlice` operation support and you want to disable the `ngraph::pass::ConvertStridedSliceToCrop` transformation for plugin X.
|
||||
To do this, you need to create a callback on plugin side and pass it to transformation. And also you need to update particular transformation to use this callback.
|
||||
|
||||
```cpp
|
||||
// Update callback to be able to use m_transformation_callback if this transformation based on GraphRewrite.
|
||||
ngraph::graph_rewrite_callback callback = [this](pattern::Matcher &m) {
|
||||
...
|
||||
}
|
||||
|
||||
// Use transformation_callback not to execute transformation if callback returns true for given node
|
||||
if (m_transformation_callback(node)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Implement transformation callback and pass it directly to transformation or pass::Manager
|
||||
const auto transformations_callback = [](const std::shared_ptr<const ::ngraph::Node> &node) -> bool {
|
||||
return std::dynamic_pointer_cast<const ::ngraph::opset3::StridedSlice>(node) != nullptr;
|
||||
};
|
||||
|
||||
// Register transformation and pass callback to pass::Manager
|
||||
ngraph::pass::Manager manager;
|
||||
manager.register_pass<ngraph::pass::ConvertStridedSliceToCrop>();
|
||||
// pass::Manager will set callback to all reistered transformations automatically
|
||||
manager.set_callback(transformations_callback);
|
||||
manager.run_passes(f);
|
||||
```
|
||||
|
||||
## Transformations testing <a name="transformations_testing"></a>
|
||||
|
||||
If you are developing new transformation inside plugin, you need to add test into the `template_plugin/tests/functional/transformations` folder.
|
||||
We have two types of tests: nGraph reader tests located in `inference-engine/tests/functional/inference_engine/ngraph_reader` and transformation tests located in `inference-engine/tests/functional/inference_engine/transformations`
|
||||
Reader tests are IR based and test end-to-end conversion from IR to CNNNetwork. Transformation tests test single ngraph transformations or low-level functions that are used inside transformations.
|
||||
|
||||
The basic transformation test looks like this:
|
||||
|
||||
@snippet tests/functional/transformations/template_transformations_test.cpp transformation:test
|
||||
|
||||
|
||||
[ngraph_replace_node]: ../images/ngraph_replace_node.png
|
||||
[ngraph_insert_node]: ../images/ngraph_insert_node.png
|
||||
[transformations_structure]: ../images/transformations_structure.png
|
||||
[register_new_node]: ../images/register_new_node.png
|
||||
[graph_rewrite_execution]: ../images/graph_rewrite_execution.png
|
||||
[graph_rewrite_efficient_search]: ../images/graph_rewrite_efficient_search.png
|
||||
221
docs/nGraph_DG/nGraph_Python_API.md
Normal file
221
docs/nGraph_DG/nGraph_Python_API.md
Normal file
@@ -0,0 +1,221 @@
|
||||
# Using nGraph's Python API {#openvino_docs_nGraph_DG_PythonAPI}
|
||||
|
||||
nGraph is the OpenVINO™ graph manipulation library, used to represent neural network models in the form of a computational graph. With nGraph Python APIs, you can create, inspect, and modify computational graphs.
|
||||
|
||||
## nGraph namespace module
|
||||
|
||||
nGraph is able to represent a large set of mathematical operations, chosen to cover most operations used in popular neural network models. The `ngraph` module is the basic namespace used to expose commonly used API methods. You can inspect the `ngraph` module or call `help` on any method for usage information.
|
||||
|
||||
```python
|
||||
import ngraph as ng
|
||||
dir(ng)
|
||||
help(ng.space_to_batch)
|
||||
```
|
||||
|
||||
## Create a simple graph
|
||||
|
||||
You can use nGraph's Python API to create computational models. For example, to create a model that represents the formula `y=ReLU(x + b)`, you can use the following code to create parameters `x` and `b` and create the computational graph:
|
||||
|
||||
|
||||
```python
|
||||
import numpy as np
|
||||
import ngraph as ng
|
||||
|
||||
parameter_x = ng.parameter(shape=[2, 2], dtype=np.float32, name="x")
|
||||
parameter_b = ng.parameter(shape=[2, 2], dtype=np.float32, name="b")
|
||||
|
||||
graph = ng.relu(parameter_x + parameter_b, name="y")
|
||||
```
|
||||
|
||||
nGraph operations are organized into sets, which are released with new versions of OpenVINO. As operation signatures can change between operation sets, it is a good practice to use operations from a specific operation set in your scripts. This ensures that your code is compatible with future versions of OpenVINO.
|
||||
|
||||
The example, the code above can be rewritten like this to use only operations from opset 4:
|
||||
|
||||
```python
|
||||
import ngraph.opset4 as ops
|
||||
|
||||
parameter_x = ops.parameter(shape=[2, 2], dtype=np.float32, name="x")
|
||||
parameter_b = ops.parameter(shape=[2, 2], dtype=np.float32, name="b")
|
||||
|
||||
graph = ops.relu(parameter_x + parameter_b, name="y")
|
||||
```
|
||||
|
||||
|
||||
## Create an nGraph function from a graph
|
||||
|
||||
You can combine a graph together with its input parameters into an nGraph function object. An nGraph function can be passed to other parts of OpenVINO to perform analysis and inference.
|
||||
|
||||
```python
|
||||
>>> function = ng.impl.Function(graph, [parameter_x, parameter_b], "TestFunction")
|
||||
>>> function
|
||||
<Function: 'TestFunction' ({2,2})>
|
||||
```
|
||||
|
||||
## Run inference
|
||||
|
||||
In order to run inference on an nGraph function, convert it to an Inference Engine network and call its `infer` method.
|
||||
|
||||
```python
|
||||
>>> from openvino.inference_engine import IECore, IENetwork
|
||||
>>>
|
||||
>>> ie_network = IENetwork(ng.impl.Function.to_capsule(function))
|
||||
>>>
|
||||
>>> ie = IECore()
|
||||
>>> executable_network = ie.load_network(ie_network, 'CPU')
|
||||
>>>
|
||||
>>> output = executable_network.infer({
|
||||
>>> 'x': np.array([[-1, 0], [1, 2]]),
|
||||
>>> 'b': np.array([[-1, 0], [0, 1]]),
|
||||
>>> })
|
||||
>>> output['y']
|
||||
array([[-0., 0.],
|
||||
[ 1., 3.]], dtype=float32)
|
||||
```
|
||||
|
||||
## Load an nGraph function from a file
|
||||
|
||||
You can load a model from a file using the Inference Engine `read_network` method:
|
||||
|
||||
network = ie_core.read_network(model=model_path, weights=weights_path)
|
||||
|
||||
An nGraph function can be extracted from an Inference Engine network using the `ngraph.function_from_cnn` method.
|
||||
The following example shows how an ONNX model can be loaded to an nGraph Function:
|
||||
|
||||
```python
|
||||
from openvino.inference_engine import IECore
|
||||
ie = IECore()
|
||||
|
||||
model_path='/path/to/model.onnx'
|
||||
network = ie.read_network(model=model_path)
|
||||
|
||||
import ngraph as ng
|
||||
function = ng.function_from_cnn(network)
|
||||
```
|
||||
|
||||
|
||||
## Inspect an nGraph function
|
||||
|
||||
You can use the nGraph function's `get_ordered_ops` method to get a topologically sorted list of its graph `Node`s.
|
||||
|
||||
```python
|
||||
>>> function.get_ordered_ops()
|
||||
[<Parameter: 'b' ({2,2}, float)>,
|
||||
<Parameter: 'x' ({2,2}, float)>,
|
||||
<Add: 'Add_2' ({2,2})>,
|
||||
<Relu: 'y' ({2,2})>,
|
||||
<Result: 'Result_4' ({2,2})>]
|
||||
```
|
||||
|
||||
Each `Node` has a unique `name` property, assigned at creation time. User-provided names can be retrieved using the `get_friendly_name` method. `get_type_name` returns the operation type of the node and the `shape` property returns the shape of the node's output tensor.
|
||||
|
||||
```python
|
||||
>>> for node in function.get_ordered_ops():
|
||||
>>> print('Node name: {:15} Friendly name: {:10} Op: {:10}'.format(
|
||||
>>> node.name, node.get_friendly_name(), node.get_type_name()))
|
||||
Node name: Parameter_1 Friendly name: b Op: Parameter
|
||||
Node name: Parameter_0 Friendly name: x Op: Parameter
|
||||
Node name: Add_2 Friendly name: Add_2 Op: Add
|
||||
Node name: Relu_3 Friendly name: y Op: Relu
|
||||
Node name: Result_4 Friendly name: Result_4 Op: Result
|
||||
```
|
||||
|
||||
### Node relationships
|
||||
|
||||
`Node`'s parents can be retrieved using the `inputs()` method, which returns `Input` objects. Each `Input` is a connection to an upstream `Output`, which is connected to a `Node`. The upstream node can be retrieved using `input.get_source_output().get_node()` methods.
|
||||
|
||||
```python
|
||||
>>> for node_input in node.inputs():
|
||||
>>> parent = node_input.get_source_output().get_node()
|
||||
>>> print('{} node has parent {}'.format(node.get_friendly_name(), parent.get_friendly_name()))
|
||||
Add_2 node has parent x
|
||||
Add_2 node has parent b
|
||||
```
|
||||
|
||||
By analogy, `Node`'s children can be retrieved using the `outputs()` method, which returns a list of `Output` objects. By contrast to inputs, each output can be connected to multiple downstream nodes.
|
||||
|
||||
```python
|
||||
>>> for node_output in node.outputs():
|
||||
>>> children = [target.get_node() for target in node_output.get_target_inputs()]
|
||||
>>> print('{} node has children {}'.format(node.get_friendly_name(), ','.join([c.get_friendly_name() for c in children])))
|
||||
>>>
|
||||
Add_2 node has children y
|
||||
```
|
||||
|
||||
### Shapes
|
||||
|
||||
Each `Input` and `Output` has an associated tensor shape, which describes what data it can accept or produce. Shapes can be dynamic, which means that they are only partially known. You can get information about this shape by calling the `get_partial_shape` method. If the returned `PartialShape` object's `is_dynamic` property returns `True`, then the shape is known partially. Otherwise, you can convert the shape to a fully known static shape (list of integers).
|
||||
|
||||
```python
|
||||
partial_shape = node_input.get_partial_shape()
|
||||
if partial_shape.is_dynamic:
|
||||
print('{} node has a dynamic shape {}'.format(node.get_friendly_name(), partial_shape))
|
||||
else:
|
||||
shape = list(partial_shape.to_shape())
|
||||
print('{} node has a static shape {}'.format(node.get_friendly_name(), shape))
|
||||
```
|
||||
|
||||
### Node attributes
|
||||
|
||||
Nodes may also have additional attributes. For example, a `Softmax` node has an `axis` attribute. Each attribute may be retrieved using a dedicated method, for example, `node.get_axis()`.
|
||||
|
||||
```python
|
||||
>>> node = ng.softmax(data=[[1, 2], [3, 4]], axis=1)
|
||||
>>> node.get_axis()
|
||||
1
|
||||
```
|
||||
|
||||
You can also set attribute values using corresponding setter methods, for example:
|
||||
|
||||
```python
|
||||
node.set_axis(0)
|
||||
```
|
||||
|
||||
Currently, you can get all attributes of a node using the `_get_attributes` method. Please note that this is an internal API method and may change in future versions of OpenVINO.
|
||||
|
||||
The following code displays all attributes for all nodes in a function:
|
||||
|
||||
```python
|
||||
for node in function.get_ordered_ops():
|
||||
attributes = node._get_attributes()
|
||||
if(attributes):
|
||||
print('Operation {} of type {} has attributes:'.format(node.get_friendly_name(), node.get_type_name()))
|
||||
for attr, value in attributes.items():
|
||||
print(" * {}: {}".format(attr, value))
|
||||
else:
|
||||
print('Operation {} of type {} has no attributes.'.format(node.get_friendly_name(), node.get_type_name()))
|
||||
```
|
||||
|
||||
### Node runtime information
|
||||
|
||||
Attributes are properties of nodes in the computational graph, which will be stored when the model is serialized to a file. However, there can be additional properties of nodes, which are only important during the execution of a graph. An example of such a property is `affinity`, which determines which operation will be executed on which hardware in a heterogeneous environment. You can get and set runtime information by using the `get_rt_info` method of a node.
|
||||
|
||||
```python
|
||||
rt_info = node.get_rt_info()
|
||||
rt_info["affinity"] = "test_affinity"
|
||||
```
|
||||
|
||||
Please note that the `rt_info` API may change in future versions of OpenVINO.
|
||||
|
||||
### Data of Constant nodes
|
||||
|
||||
You can retrieve the data tensor associated with a `Constant` node by calling its `get_data` method:
|
||||
|
||||
```python
|
||||
if node.get_type_name() == 'Constant':
|
||||
data = node.get_data()
|
||||
```
|
||||
|
||||
## Transform graphs
|
||||
|
||||
nGraph supports a growing number of transformation passes, which can be applied to a graph. For example, to perform constant folding of applicable subgraphs, you can use the `ConstantFolding` pass. To do this, create an optimization pass `Manager`, register the passes you want to execute, and feed an nGraph function to the configured pass manager.
|
||||
|
||||
The following code example illustrates the process:
|
||||
|
||||
```python
|
||||
from ngraph.impl.passes import Manager
|
||||
pass_manager = Manager()
|
||||
pass_manager.register_pass('ConstantFolding')
|
||||
pass_manager.run_passes(function)
|
||||
```
|
||||
|
||||
Please note that the list of available transformations may change in future versions of OpenVINO.
|
||||
39
docs/nGraph_DG/nGraph_basic_concepts.md
Normal file
39
docs/nGraph_DG/nGraph_basic_concepts.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# nGraph Basic Concepts {#openvino_docs_nGraph_DG_basic_concepts}
|
||||
|
||||
The nGraph represents neural networks in uniform format. User can create different operations and combined their to one `ngraph::Function`.
|
||||
|
||||
## nGraph Function and Graph Representation <a name="ngraph_function"></a>
|
||||
|
||||
nGraph function is a very simple thing: it stores shared pointers to `ngraph::op::Result` and `ngraph::op::Parameter` operations that are inputs and outputs of the graph.
|
||||
All other operations hold each other via shared pointers: child operation holds its parent (hard link). If operation has no consumers and it's not Result operation
|
||||
(shared pointer counter is zero) then it will be destructed and won't be accessible anymore. Each operation in `ngraph::Function` has a `std::shared_ptr<ngraph::Node>` type.
|
||||
|
||||
For details on how to build an nGraph Function, see the [Build nGraph Function](./build_function.md) page.
|
||||
|
||||
## Operations
|
||||
|
||||
`ngraph::Op` represents any abstract operations in the nGraph representation. You need to use this class to create [custom operations](../IE_DG/Extensibility_DG/AddingNGraphOps.md).
|
||||
|
||||
## Operation Sets
|
||||
|
||||
Operation set represents the set of some nGraph operations. `nGraph::Opset` is a class which provide a functionality to work with operation sets.
|
||||
Custom operation set should be created to support custom operation. Please read [Extensibility DevGuide](../IE_DG/Extensibility_DG/Intro.md) for more details.
|
||||
|
||||
## Static and Partial Shapes
|
||||
|
||||
nGraph has two types for shape representation:
|
||||
|
||||
* `ngraph::Shape` - Represents static (fully defined) shapes.
|
||||
|
||||
* `ngraph::PartialShape` - Represents dynamic shapes. That means that the rank or some of dimensions are dynamic (undefined). `ngraph::PartialShape` can be converted to `ngraph::Shape` using the `get_shape()` method if all dimensions are static; otherwise the conversion raises an exception.
|
||||
|
||||
For examples, see the Dynamic Shape and Rank section in the [Overview of Transformations API](./nGraphTransformation.md).
|
||||
|
||||
|
||||
## Transformation API
|
||||
|
||||
nGraph transformation API allows you to manipulate the graph represented by `nGraph::Function`. For more details, see the [Overview of Transformations API](./nGraphTransformation.md) section.
|
||||
|
||||
## Pattern Matcher
|
||||
|
||||
For more details, see the Pattern Matching section in the [Overview of Transformations API](./nGraphTransformation.md).
|
||||
16
docs/nGraph_DG/nGraph_debug_capabilities.md
Normal file
16
docs/nGraph_DG/nGraph_debug_capabilities.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# nGraph Debug Capabilities {#openvino_docs_nGraph_DG_Debug_capabilities}
|
||||
|
||||
nGraph representation provides an API to get detailed information about the graph structure.
|
||||
|
||||
To receive additional messages about applied graph modifications, rebuild the nGraph library with
|
||||
the `-DNGRAPH_DEBUG_ENABLE=ON` option.
|
||||
|
||||
To visualize the nGraph function to the xDot format or to an image file, use the
|
||||
`ngraph::pass::VisualizeTree` graph transformation pass:
|
||||
```cpp
|
||||
#include <ngraph/pass/visualize_tree.hpp>
|
||||
|
||||
std::shared_ptr<ngraph::Function> nGraph;
|
||||
...
|
||||
ngraph::pass::VisualizeTree("after.png").run_on_function(nGraph); // Visualize the nGraph function to an image
|
||||
```
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user