zweigraf / face-landmarking-ios

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

detect face no live video #11

Open aleksbgs opened 8 years ago

aleksbgs commented 8 years ago

Hi this is great job !!! it's possible to detect face in video in view ? not live cam video something like this https://www.assetstore.unity3d.com/en/#!/content/66602

andreapiso commented 8 years ago

Please note that this app does not detect faces. It "just" does landmarking. The face detection is done by the standard Apple library. To answer your question, of course you can do it with a static image, just change the doWork function to something that suits you and call it from a controller that makes sense.

zweigraf commented 8 years ago

You can use Dlib to detect faces in a static frame as well.

This is albeit very slow.

Check line 38 and 86 here: https://github.com/zweigraf/face-landmarking-ios/blob/062bf6dabfb1445ddcc1eb7d0344155fee8f4e0b/DisplayLiveSamples/DlibWrapper.mm#L38

This is an old version of the app which uses Dlib face detection. It is far slower than using the apple provided one on a camera feed.