日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > python >内容正文

python

Seetaface 03 Seetaface python版 win10 vs2015编译

發布時間:2024/1/1 python 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Seetaface 03 Seetaface python版 win10 vs2015编译 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

01 環境

win10x64
vs2015 update3
cmake3.7.2
git
源碼:https://github.com/5455945/SeetaFaceEngine.git
如果要測試python demo,需要系統安裝對應的python版本opencv。
pip3 install opencv-python
本實驗使用的是opencv-python==3.2.0.7。
需要安裝numpy庫。本實驗使用的:numpy==1.13.0+mkl。

02 源碼下載

cd D:\git\DeepLearning git clone https://github.com/5455945/SeetaFaceEngine.git cd SeetaFaceEngine

03 配置cmake-gui

點擊[Configure]。設置:
源碼路徑:D:/git/DeepLearning/SeetaFaceEngine
目標路徑:D:/git/DeepLearning/SeetaFaceEngine/build/x64
勾選BUILD_SEETAFACEENGINE
不選BUILD_EXAMPLES、BUILD_SFMFCTEST
設置CMAKE_INSTALL_PREFIX
USE_OPENMP、USE_SSE默認勾選

BUILD_EXAMPLES=0 BUILD_SEETAFACEENGINE=1 BUILD_SFMFCTEST=0 CMAKE_INSTALL_PREFIX=D:/git/DeepLearning/SeetaFaceEngine/build/x64/install USE_OPENMP=1 USE_SSE=1

注:如果要設置BUILD_EXAMPLES=1或BUILD_SFMFCTEST=1,需要配置OpenCV_DIR,因為這兩個C++的用例使用了opencv。參考:Seetaface 01 Seetaface win10 vs2015編譯(cmake自動配置,可選mfc界面)

此案及[Configure]、點擊[Generate],完成后,點擊[Open Project]打開vs2015
D:\git\DeepLearning\SeetaFaceEngine\build\x64\SeetaFaceEngine.sln

04 編譯

vs2015打開D:\git\DeepLearning\SeetaFaceEngine\build\x64\SeetaFaceEngine.sln后,直接build Release版本后,再build INSTALL工程,完成python版本的安裝。

INSTALL后,python版本算有3份拷貝。
1 Python安裝目錄下的Lib\site-packages\SeetaFaceEngine-0.1-py3.6.egg
本實驗在C:\Python36\Lib\site-packages\SeetaFaceEngine-0.1-py3.6.egg

2 SeetaFaceEngine\python源碼目錄下,把需要的bin(dll)文件和model文件拷貝過來了。

3 CMAKE_INSTALL_PREFIX指定的安裝目錄下的python文件夾。內容和2 SeetaFaceEngine\python相同。
D:\git\DeepLearning\SeetaFaceEngine\build\x64\install\python

注:這里1不是必須的。只要系統環境安裝了opencv-python,和vs2015
運行時庫。把SeetaFaceEngine\python完整拷貝到任意處,都可以正常運行。

05 測試

用PyCharm打開test_opencv.py、test_pillow.py運行。“`
C:\Python36\python.exe D:/git/DeepLearning/SeetaFaceEngine/python/test_opencv.py
C:\Python36\python.exe D:/git/DeepLearning/SeetaFaceEngine/python/test_pillow.py

test_opencv.py運行結果:

test detector:
(602,126,828,352) score=21.732229948043823
(457,77,596,216) score=30.60622215270996
(247,187,368,308) score=11.426725625991821
(298,13,343,58) score=14.56250661611557
(244,6,279,41) score=4.99791157245636
test aligner:
test identifier:
sim: [0.502326250076294, 0.2604138255119324]
“`

可自行修改test_opencv.py、test_pillow.pyif __name__ == '__main__':部分。比如:使用命令行等。

06 參考

本python代碼修改自https://github.com/TuXiaokang/pyseeta.git。

總結

以上是生活随笔為你收集整理的Seetaface 03 Seetaface python版 win10 vs2015编译的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。