Dlib,python,face_detection 与神经网络

Dlib,python,face_detection with neural network

每当我尝试加载经过训练的模型时 cnn based face_detector在 dlib.i 中遇到此错误。


detector = dlib.simple_object_detector('mmod_human_face_detector.dat')
Traceback (most recent call last):
File "/home/hasans/Desktop/1/face_recognition1/face_detector.py", line 51, in <module>

detector = dlib.simple_object_detector('mmod_human_face_detector.dat')
RuntimeError: Unsupported version found when deserializing a scan_fhog_pyramid object</br>


如何摆脱这个错误?

.

我不知道你的代码是从哪里得到的,但是基于 cnn 的人脸检测器的使用方式不同,如 this official demo.

中所示

初始化看起来像:

cnn_face_detection_model = dlib.cnn_face_detection_model_v1('mmod_human_face_detector.dat')

(我用成功了)

警告: 此所需的 python-wrapper 最近才添加 (18.8.17),截至目前(3 天后)仅在git,没有任何官方发布!

基于 DNN 的人脸检测器现已正式在 python 的最新版本 19 中使用。6.Everyone 可以从

下载

https://dlib.net

干杯!!!