How to use dnn_gender_classifier_v1.dat in Python?
mowshon opened this issue · 4 comments
mowshon commented
Hello, @davisking !
How to load the dnn_gender_classifier_v1.dat
in Python ?
I can't find alternative for C++ deserialize
in Python.
mowshon commented
@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.
arrufat commented
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