boltgolt / howdy

🛡️ Windows Hello™ style facial authentication for Linux
MIT License
5.74k stars 299 forks source link

Migrate Model from dlib models to Deepface #577

Open ashvinnihalani opened 3 years ago

ashvinnihalani commented 3 years ago

Could we migrate the model from the dlib models to Deep face? It is more up-to-date and could potentially improve the accuracy of the detection? There could be an option to switch from one to another if there are resources or other contraints.

I could help with the migration and testing if you need it.

boltgolt commented 3 years ago

Sounds interesting, especially because v3 will introduce breaking changes anyway. In your personal opinion, what improvements would switching models cause?

ashvinnihalani commented 3 years ago

Out of the box it allows for just a wide variety of models including their own implementation of a Dlib model. In addition it seems like accuracy is much higher. Davisking/dllib models seem to have an accuracy of 99.3 and the highest model in Deepface, FaceNet /w 512d got a 99.65. The delta in the performance is small enough that we should probably test this with a similar data-set since I am unsure which dataset these metrics are deriving from. In addition, there is a detect, align, represent and verify pipeline that they have implemented under the hood that might be useful and might reduce the number of false negatives we get from differing positions of heads.

boltgolt commented 3 years ago

My worry is that we will be rewriting the absolute core of Howdy without much benefit. Our dlib implementation does already detect (face_detector), align (pose_predictor), represent (compute_face_descriptor?) and verify (numpy) so i'm not sure if that's an improvement. I guess Deepface has a better success rate there?

I think i would like to see a demonstration of how much better it is first, just to be sure we're not doing unnecessary work and introducing bugs into heavily field-tested code.

boltgolt commented 3 years ago

(also, the ties to Facebook are less than ideal for a project dealing with face recognition unfortunately)