davisking/dlib-models

How to use dnn_gender_classifier_v1.dat in Python?

mowshon opened this issue · 4 comments

Hello, @davisking !

How to load the dnn_gender_classifier_v1.dat in Python ?
I can't find alternative for C++ deserialize in Python.

@davisking can you take a look at https://github.com/mowshon/age-and-gender

I don't have good skill in C++, but did my best for running this code on python.

Nice, I've seen that you open images directly from the path. You can get some inspiration from this example to make it work with PIL images or numpy arrays directly.

https://github.com/arrufat/wallyfinder

EDIT:
In particular, these two functions
https://github.com/arrufat/wallyfinder/blob/2a3ddc1af2b676ad434574fecd9be0004c0fcc23/src/wallyfinder.cpp#L8-L42

@arrufat wow! I realy need this! Thank you!

@mowshon I'm really glad to see that the models I've released can find a usage... I am working on improving the model for enhancing gender detection for certain ethnic groups that are apparently under-represented in the original database.