我试图使用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