我試圖使用DLIB(v19.6)的Python API使用代碼來創建一個CNN的臉檢測:DLIB cnn_face_detection_model_v1 Python的錯誤
cnn_face_detector = dlib.cnn_face_detection_model_v1('mmod_human_face_detector.dat')
不過,我得到了ArgumentError
如下:
---------------------------------------------------------------------------
ArgumentError Traceback (most recent call last)
<ipython-input-16-c2ca0a6e8dff> in <module>()
----> 1 cnn_face_detector = dlib.cnn_face_detection_model_v1('mmod_human_face_detector.dat')
ArgumentError: Python argument types in
cnn_face_detection_model_v1.__init__(cnn_face_detection_model_v1, str)
did not match C++ signature:
__init__(_object*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
我會做什麼錯?我不能將模型文件的文件名簡單地作爲字符串傳遞嗎?
我用'python setup.py install --yes USE_AVX_INSTRUCTIONS'來安裝。我檢查了python解釋器使用的是相同的dlib版本。我將通過做一個乾淨的安裝再次嘗試。 – chronosynclastic