【发布时间】:2018-02-08 10:45:54
【问题描述】:
我正在尝试使用 dlib (v19.6) Python API 使用以下代码创建 CNN 人脸检测器:
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 face-detection dlib