| 
 參考應用範例  
到此目錄下 - C:\Program Files (x86)\Intel\openvino_2021.4.689\deployment_tools\open_model_zoo\demos
 
  複製代碼一鍵編譯build所有的C++ 範例使用VS Build 執行:  
 
 
WIN10,OpenVINO,範例編譯,下載 
 
 
 
 
順利Build完後的執行檔位置 加入環境變數 - C:\Users\User name\Documents\Intel\OpenVINO\omz_demos_build\intel64\Release
 
  複製代碼- C:\Users\Administrator\Documents\Intel\OpenVINO\omz_demos_build\intel64\Release
 
  複製代碼 
WIN10,OpenVINO,範例編譯,下載 
 
 
 
接著就可以來下載模型來玩玩看了 首先到此目錄下尋找想要的模型並下載 也可加入環境變數 - C:\Program Files (x86)\Intel\openvino_2021.4.689\deployment_tools\open_model_zoo\tools\downloader
 
  複製代碼 
執行  - python downloader.py  --all
 
  複製代碼就能看到目前intel提供已轉好的AI模型檔(每次改版都會不定期增加)  
 如果要下載特定XML,BIN - python downloader.py  --name text-detection-0004 --precisions FP16
 
  複製代碼他就會下載到下列路徑目錄下 - C:\Program Files (x86)\Intel\openvino_2021.4.689\deployment_tools\open_model_zoo\tools\downloader\intel
 
  複製代碼 
WIN10,OpenVINO,範例編譯,下載 
 
 
 
 
 
以人臉偵測範例為例 所有XML與BIN位置 
 
所需要的AI model 包含 face-detection-adas-0001 
age-gender-recognition-retail-0013 
head-pose-estimation-adas-0001 
emotions-recognition-retail-0003 
facial-landmarks-35-adas-0002  
下載後的AI模型,模型會包含FP32 和 FP16,部分會有INT8模型 也就是針對硬體效能與精準度做取捨,可以選擇載入全精度、半精度、量化模型 路徑: - C:\Program Files (x86)\Intel\openvino_2021.4.689\deployment_tools\open_model_zoo\tools\downloader\intel\face-detection-adas-0001
 
  複製代碼 
 
WIN10,OpenVINO,範例編譯,下載 
 
 
WIN10,OpenVINO,範例編譯,下載 
 
 
 
 
跑起來~藉著我們就可以掛載AI模型來驗證囉 在執行下面指令前需要建置環境 請先執行 Conda 虛擬機 OpenVino + win10 完整安裝(測試成功) 的環境 - "C:\Program Files (x86)\Intel\openvino_2021\bin\setupvars.bat"
 
  複製代碼- interactive_face_detection_demo.exe -i cam(鏡頭編號 0) -m C:\Program Files (x86)\Intel\openvino_2021.4.689\deployment_tools\open_model_zoo\tools\downloader\intel\face-detection-adas-0001\FP32\face-detection-adas-0001.xml
 
 
  複製代碼 
WIN10,OpenVINO,範例編譯,下載 
 
WIN10,OpenVINO,範例編譯,下載 
 
 
- interactive_face_detection_demo.exe -i cam -m face-detection-adas-0001\FP32\face-detection-adas-0001.xml -m_ag age-gender-recognition-retail-0013\FP32\age-gender-recognition-retail-0013.xml -m_em emotions-recognition-retail-0003\FP32\emotions-recognition-retail-0003.xml -m_lm facial-landmarks-35-adas-0002\FP32\facial-landmarks-35-adas-0002.xml
 
  複製代碼 
 
WIN10,OpenVINO,範例編譯,下載 
 
 
 
- interactive_face_detection_demo.exe -i cam -m face-detection-adas-0001\FP32\face-detection-adas-0001.xml -m_ag age-gender-recognition-retail-0013\FP32\age-gender-recognition-retail-0013.xml -m_em emotions-recognition-retail-0003\FP32\emotions-recognition-retail-0003.xml -m_hp head-pose-estimation-adas-0001\FP32\head-pose-estimation-adas-0001.xml -m_lm facial-landmarks-35-adas-0002\FP32\facial-landmarks-35-adas-0002.xml
 
  複製代碼 
WIN10,OpenVINO,範例編譯,下載 
 
 
在 python 下 直接下指令 
- import os
 
 - os.system("start interactive_face_detection_demo.exe -i 0 -m face-detection-adas-0001/FP32/face-detection-adas-0001.xml")
 
  
- os.system("start interactive_face_detection_demo.exe -i 0 -m face-detection-adas-0001/FP32/face-detection-adas-0001.xml -m_ag age-gender-recognition-retail-0013/FP32/age-gender-recognition-retail-0013.xml -m_em emotions-recognition-retail-0003/FP32/emotions-recognition-retail-0003.xml -m_hp head-pose-estimation-adas-0001/FP32/head-pose-estimation-adas-0001.xml -m_lm facial-landmarks-35-adas-0002/FP32/facial-landmarks-35-adas-0002.xml")
 
 
  複製代碼 
 
參考文章 
 
 
 
 |