Detect Eye Landmark using dlib

1.8k Views Asked by At

Using dlib, is it possible to detect eye landmarks without face detection? If yes, how? and if no, any suggestion or advice? Thank you!

Sample

2

There are 2 best solutions below

2
On

Q: Is it possible to detect eye landmarks without face detection?

A: No, because the dlib facial landmark requires faces as inputs.

Q: and if no, any suggestion or advice?

A: The simplest way for face detection in your case is to use face detection from dlib dlib.get_frontal_face_detector(). However, you can use any face detection as long as you can find the bounding box to detect landmarks.

0
On

It's possible by training your own object detector using dlib. Simple HOG detector can do that. Steps are:

  1. Prepare train data

  2. Draw bounding boxes on training data set

  3. Train it and save as model

  4. Load model to use.

You can go from simple object detector using HOG in dlib, or higher level using deep learning dlib MMOD.

Here is the link to MMOD (deep learning based, higher accuracy): http://dlib.net/dnn_mmod_train_find_cars_ex.cpp.html