zweigraf / face-landmarking-ios

👦 Basic face landmarking on iPhone with Dlib via Swift & ObjC++
481 stars 125 forks source link

Enhance dlib::deserialize time #26

Open momoohidayat opened 7 years ago

momoohidayat commented 7 years ago

Is there any workaround to enhance this method?:

dlib::deserialize(modelFileNameCString) >> sp;

because when i debug, this method takes about 5s to finish

2017-08-04 18:20:20.906752+0700 xxapp[3460:819204] start deserialize: 1501845620.906730
2017-08-04 18:20:26.145505+0700 xxapp[3460:819204] finish deserialize: 1501845626.144248
zweigraf commented 7 years ago

Is this in debug mode or with optimizations? Because dlib is very slow in debug mode anyway.

momoohidayat commented 7 years ago

When do work on sample buffer,its fast enough,the problem is when initiate parse the .dat file, maybe because its 90MB file?

Calling deserialize method takes about 5second, after that processing the landmark is good at 40fps