Dlib: object detectors saved with C++ API can not be loaded by Python API

Created on 29 Sep 2015  路  1Comment  路  Source: davisking/dlib

If I train a detector using the C tool

$ /train_object_detector -tv ....

that generates a file object_detector.svm. However if I load that file with the python API it doesn't work.

dlib.simple_object_detector("object_detector.svm")

gives RuntimeError: Error deserializing object of type int

Interestingly however, the following does work

print dlib.test_simple_object_detector(training_xml_path, "object_detector.svm")

and works perfectly, giving the same precision and recall as the trained C api.

Most helpful comment

Try the dlib.fhog_object_detector.

>All comments

Try the dlib.fhog_object_detector.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AivanF picture AivanF  路  4Comments

lvella picture lvella  路  4Comments

abhisheksoni27 picture abhisheksoni27  路  4Comments

alison-carrera-pegasus picture alison-carrera-pegasus  路  3Comments

vijaysagi picture vijaysagi  路  5Comments