-2

When ever i tried to load the trained model of cnn based face_detectorin dlib.i got this error.


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>


how to get rid of this error?

.

Hasan Latif
  • 65
  • 1
  • 1
  • 12

2 Answers2

1

I don't know where you got your code from, but the cnn-based face-detector is used differently, as given in this official demo.

Init looks like:

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

(I used it successfully)

Warning: the python-wrapper needed for this was only recently added (18.8.17) and as of now (3 days later) is only available within git, not any official release!

sascha
  • 32,238
  • 6
  • 68
  • 110
0

DNN based face detector is now officially available for using in python in its latest release 19.6.Everyone can download it from

https://dlib.net

cheers !!!

Hasan Latif
  • 65
  • 1
  • 1
  • 12