Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Openvino ncs2

290 views

Published on

Openvino ncs2

Published in: Education
  • Be the first to comment

  • Be the first to like this

Openvino ncs2

  1. 1. OPENVINO™ Open Visual Inference & Neural Network Optimization Toolkit
  2. 2. • 將Intel® Movidius™視覺處理單元(VPU)整合在USB裝置上 • 這樣就可對數百萬種低功耗的嵌入式裝置提供視覺智能 • 例如監控攝影機、可用手勢控制的無人機、工業級機器視覺設備等 • 針對低功耗應用所設計適合嵌入式系統 e.g. Raspberry Pi • 可直接自裝置上執行即時的深度神經網路,讓 AI 應用能夠離線部署 Intel® Movidius™ 6
  3. 3. Intel NCS的SDK : OpenVINO OpenVINO 主要應用為Inference/Predict,Model須在其它框 架如TensorFlow, Caffe,….訓練好才能使用 OpenVINO 簡介 OpenVINO 除了可提供硬體 加速外,更提供模型優化器 (Model Optimizer),可去除 模型中的冗餘參數,並可降 階到16 bit float 以犧牲數個 小數來換取推論速度提升數 十倍到百倍 7
  4. 4. 工具包整合了 OpenCV, OpenVX, OpenCL 等開源軟體工具 硬體加速晶片支援 CPU, GPU, FPGA, ASIC (IPU、VPU)等 OS支援 Windows, Liunx (Ubuntu, CentOS…) , Raspbian 等 支援 Caffe, TensorFlow, Mxnet, ONNX 等深度學習框架已 訓練好的模型及參數 • 需要轉出二個中間表示(Intermediate Representation、IR)檔案 (*.bin, *.xml),再交給推論引擎(Inference Engine)依指定的加速硬 體(CPU、GPU、FPGA、ASIC)來進行預測 OpenVINO 簡介 8
  5. 5. Enables CNN-based deep learning inference on the edge Supports heterogeneous execution across Intel® CPU, Intel® Integrated Graphics, Intel® Movidius™ Neural Compute Stick, 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*, OpenCL™, and OpenVX* OpenVINO™ toolkit 9
  6. 6. OpenVINO™ toolkit Workflow 10 The NCSDK only supports the original NCS. The OpenVINO™ toolkit supports the Intel® NCS 2 and the original NCS.
  7. 7. OpenVINO™ toolkit Workflow .bin .xml Model optimizer Inference Engine 11
  8. 8. 12
  9. 9. Run OpenVINO Sample Application on Raspberry Pi 安裝 OpenVINO toolkit 並設定環 境變數 準備好 pre-trained Model (xml, bin) 執行應用程式 .xml: Describes the network topology .bin: Contains the weights and biases binary data https://docs.openvinotoolkit.org/latest/_docs_install_guides_i nstalling_openvino_raspbian.html 編譯Sample Application 13
  10. 10. #下載並解壓縮OpenVINO工具包  wget https://download.01.org/opencv/2019/openvinotoolkit/l_openvino_toolkit_raspbi_p_2019.1.094 .tgz  tar -xvf l_openvino_toolkit_raspbi_p_2019.1.094.tgz #設定環境變數  sed -i "s|<INSTALLDIR>|$(pwd)/inference_engine_vpu_arm|" inference_engine_vpu_arm/bin/setupvars.sh  source inference_engine_vpu_arm/bin/setupvars.sh (完成後顯示:[setupvars.sh] OpenVINO environment initialized)  echo “source ~/inference_engine_vpu_arm /bin/setupvars.sh” >> ~/.bashrc (每次登入即自動 初始化環境) #設定USB規則 (完成後即可插入運算棒)  sh inference_engine_vpu_arm/install_dependencies/install_NCS_udev_rules.sh (完成後顯示:[install_NCS_udev_rules.sh] udev rules installed) 在 Raspbian 9 安裝 OpenVINO toolkit (Pi 3/Pi 3+) 14
  11. 11. # 切到sample code路徑  cd ~/inference_engine_vpu_arm/deployment_tools/inference_engine/samples  mkdir build && cd build #編譯OpenVINO Face Detection demo (須事前確認有安裝cmake)  cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="- march=armv7-a"  make -j2 object_detection_sample_ssd #下載pre-trained model (.xml, .bin)  wget –no-check-certificate https://download.01.org/openvinotoolkit/2018_R4/open_model_zoo/face- detection-adas-0001/FP16/face-detection-adas-0001.bin  wget –no-check-certificate https://download.01.org/openvinotoolkit/2018_R4/open_model_zoo/face- detection-adas-0001/FP16/face-detection-adas-0001.xml OpenVINO : Face recognition sample測試 15
  12. 12. #執行程式 ./armv7l/Release/object_detection_sample_ssd -m face- detection-adas-0001.xml -d MYRIAD -i <YOURIMG> 系統會出現 [ INFO ] Image out_0.bmp created! 訊息,即可察看結果檔 案:out_0.bmp (右下圖所示) 執行結果 16

×