Closed EzequielAdrianM closed 7 years ago
Hi @EzequielAdrianM , Nice suggestion. Do you have any sample code and DAT file about that?
I have found this keys to achieve our goal: serialize a shape_predictor.dat in packed format: pastebin.com/UqNq5qDV deserialize it in the same format: pastebin.com/UT3w8CmS
I have experience with Android/Java but I do not understand very fine the cpp part. Please tell me if that code can be used to quantize the floats down..
Hi @EzequielAdrianM , I have tried the c++ code.It works for me.The final dat format file size is no more than 18M and the accuracy of the shape predicator is almostly the same as before.What makes me disappointed is that I can't use deserialize function to decode the minified dat file.
Hi @tzutalin, I noticed that size of dot so format files are very small in your dlib-android-app project folder,but when I build the code from your another project dlib-android by myself, I got a bigger size.Your total size of the four different dot so file is 26.7M whereas mine 62M.It's a huge difference.Can you give me some tips?Many thanks to you.
It seems reasonable in some way cause that new file is now like a compressed file. It would be nice if you upload that lightweight file for us so I can test it out. Thanks
Hi @EzequielAdrianM , The only choice of loading the lightweight file is use the code from the link you send before.And the compress code almostly the same as decompress code. You should try the code by yourself according to the guideline provided by the author,it's very easy. If you have any problem,feel free to ask.
@chrisluu Oh come on, I am not familiar at all with cpp and compilers. Just think I don't even know which program use to compile that code on windows. Please, be nice and send me dat file to mail ezequieladrianm@gmail.com
Ok,I will send it to you.Do you know how to minimize size of dot so file?
Sent from my iPhone
On 3 Mar 2017, at 12:52, Ezequiel Adrián notifications@github.com wrote:
@chrisluu Oh come on, I am not familiar at all with cpp and compilers. Just think I don't even know which program use to compile that code on windows. Please, be nice and send me thta file to mail ezequieladrianm@gmail.com
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
I've tested it on the android app with the new 18MB DAT file, but when the camera opens it only shows where the face is, no landmarks at all. Also, the second time I want to open the camera, it does not initialize, shows a black screen waiting for camera to be opened. And the following appears in the log:
CameraConnectionFragment: open Camera
CameraConnectionFragment: Opening camera preview: 640x480
dlib: jniNativeClassInit success
native: I/jni_face_det.cpp:145 jniInit
native: I/detector.h:81 Model Path: /sdcard/person.svm
native: I/detector.h:85 Not exist /sdcard/person.svm
native: I/detector.h:149 Init mFaceDetector
And there it stops. Black screen. Completely unresponsive... Any idea?
Here is the DAT file I have used made by @chrisluu shape_predictor_68_face_landmarks.dat
Okay, I don't know which is the most lightweight way, but this file (63MB) seems to work almost as precise as the original landmarks.dat (98MB) while keeping all landmarks. Here is the link to download and test: sp.dat
Hi, Initializing the Face Detector takes more than 10 seconds to load. I have seen this StackOverflow question: http://stackoverflow.com/questions/38435653/detecting-face-landmarks-points-in-android On the first answer says that the 98MB DAT file can be reduced to 18MB approximately, losing very little accuracy. What do you think about it?