Convert facial recognition model to a TFLite or ml core model?
rafayk7 opened this issue · 3 comments
I want to convert the facial recognition .dat.bz2 file to a TFlite or a ML Core model (for Android/iOS). What's the structure of the model so I can convert it to those file types?
You can convert the network file to xml (http://dlib.net/dlib/dnn/utilities_abstract.h.html#net_to_xml) and then do whatever you like with the data.
You can convert the network file to xml (http://dlib.net/dlib/dnn/utilities_abstract.h.html#net_to_xml) and then do whatever you like with the data.
Just trying to understand the documentation and codebase - type net_type is the description of the network right? Does it support importing a .dat file and then converting that to xml? How would I go about that?
The dnn_* tutorials in the examples folder have some examples of this.
deserializing a model from disk:
serializing a model to xml:
There is also a python utility running_a_dlib_model_with_caffe_example.py to convert to caffe format.
You could potentially map to caffe then use some popular caffe-to-TF conversion tool, or modify the underlying network visitor class to do it directly.
Also, see davisking/dlib#803 for a related discussion.