Setup Intel OpenVINO and AWS Greengrass on Ubuntu

Setup Intel OpenVINO and AWS Greengrass on Ubuntu 
  1. First set the conversion tool ModelOptimizer: https://software.intel.com/en-us/articles/OpenVINO-ModelOptimizer
  2. Command : `source /bin/setupvars.sh`
  3. Command : `cd /deployment_tools/model_optimizer/install_prerequisites`
  4. Command : `sudo -E ./install_prerequisites.sh`
  5. Model Optimizer uses Python 3.5, whereas Greengrass samples use Python 2.7. In order for Model Optimizer not to influence the global Python configuration, activate a virtual environment as below:
  6. Command : `sudo ./install_prerequisites.sh venv`
  7. Command : `cd /deployment_tools/model_optimizer`
  8. Command : `source venv/bin/activate`
  9. For CPU, models should be converted with data type FP32 and for GPU/FPGA, it should be with data type FP16 for the best performance.
  10. For classification using BVLC Alexnet model:
    Command : `python mo.py --framework caffe --input_model /bvlc_alexnet.caffemodel --input_proto /deploy.prototxt --data_type --output_dir --input_shape [1,3,227,227]`
  11. For object detection using SqueezeNetSSD-5Class model:
    Command : `python mo.py --framework caffe --input_model /SqueezeNetSSD-5Class.caffemodel --input_proto /SqueezeNetSSD-5Class.prototxt --data_type --output_dir `
  12. where is the location where the user downloaded the models, is FP32 or FP16 depending on target device, and is the directory where the user wants to store the IR. IR contains .xml format corresponding to the network structure and .bin format corresponding to weights. This .xml should be passed to mentioned in the Configuring the Lambda Function section. In the BVLC Alexnet model, the prototxt defines the input shape with batch size 10 by default. In order to use any other batch size, the entire input shape needs to be provided as an argument to the model optimizer. For example, if you want to use batch size 1, you can provide --input_shape [1,3,227,227].
Greengrass sample is in : 
/opt/intel/computer_vision_sdk/inference_engine/samples/python_samples/greengrass_samples/

However, there are some changes in the openvino_toolkit_p_2018.3.343 version of the path that need to be modified (python2):

LD_LIBRARY_PATH : 
/opt/intel/computer_vision_sdk/opencv/share/OpenCV/3rdparty/lib:/opt/intel/computer_vision_sdk/opencv/lib:/opt/intel/opencl:/opt/intel/computer_vision_sdk/deployment_tools/inference_engine/external/cldnn/lib:/opt/intel/computer_vision_sdk/deployment_tools/inference_engine/external/mkltiny_lnx/lib:/opt/intel/computer_vision_sdk/deployment_tools/inference_engine/lib/ubuntu_16.04/intel64:/opt/intel/computer_vision_sdk/deployment_tools/model_optimizer/model_optimizer_caffe/bin:/opt/intel/computer_vision_sdk/openvx/lib

PYTHONPATH : 

/opt/intel/computer_vision_sdk/python/python2.7/ubuntu16/

PARAM_CPU_EXTENSION_PATH : 

/opt/intel/computer_vision_sdk/deployment_tools/inference_engine/lib/ubuntu_16.04/intel64/libcpu_extension_avx2.so

留言

Google Search

推薦內容橫式

本月熱門文章

鋼鐵韓粉站出來 讓韓國瑜每天唱歌喝酒好不好

黑金? 不得不提前總統馬英九大姊馬以南 吳敦義 林益世

「港版國安法」,法律將會放在《基本法》附件三在港實施,而非就《基本法》23條立法

捐款支持義大利靈醫會 一起來幫助他們 就像當初教士來台灣協助我們一樣 !!

從台灣省長宋楚瑜到台北市長柯文哲,可以說 宋楚瑜 2.0 就是柯文哲

香港事件回顧 2020/08/10 前眾志成員周庭及壹傳媒創辦人黎智英被捕 今日累計10人被捕

除了兒福聯盟 還有其他團體是努力守護孩子們 芥菜種會愛心育幼院 及忠義育幼院 都需要大家幫忙

兒福聯盟到底多有錢?收捐款為什麼不做事情而是定存?王育敏不解釋嗎?

北京故宮首訪,一窺清宮秘史 大玉兒 & 甄嬛

這個網誌中的熱門文章

Android應用開發豆知識:利用 adb 安裝 apk 到裝置上

Android 中文輸入法 官方版 ! Gboard - Google 鍵盤 開始支援注音輸入啦

Google Play 推薦Android app 誠徵App排行榜

北京故宮首訪,一窺清宮秘史 大玉兒 & 甄嬛

[家教][社會觀察] 建中教我的事 沒上建中被父母親折磨? 在建中到底是如何 ...

[FAANG面試] Amazon/AWS 領導力準則 14 Amazon Leadership Principles

Acer ICONIA Smart S300 更新後越來越好 Acer也有出手機?!

[品質控制] 什麼是Sanity test ? 軟體測試常見名詞整理 包含不同部門的測試人員負責範圍

新鮮人找工作:職場名詞解釋 AE FAE Pre-sales Post-sales