OpenCV Cascades: Eye Detection

Open / Closed Eyes

LBP | HAAR | HOG


Eye detection is not a trivial task, especially if you want to perform it on ARM devices. Before using the following cascades read carefully this page to get the best performance and to know the terms of usage.


The eye detection is a common strategy in computer vision to start the face alignment by Homography or by a more sophisticated method such as Active Shape Models (ASM), Active Appearance Models (AAM), Features Regression, etc. Regardless from the preferred method, a good and a stable initialization of the process is mandatory to get a perfect alignment in a small number of iterations. A perfect alignment usually bring to superior performance in face recognition, identification or classification task. With similar cascades it’s also possible to start detecting the blinking phenomenon for the driving security. Below the HD model for the detection of eyes via boosted cascades.

visionary-eyes-lbp-dataset

Human eyes, trained with:

  • approx. 9,000 positive samples (randomly sampled)
  • approx 0.7 B of negative sub-regions containing faces and non faces samples (90%-10%)

*NEWS*: since June 2016 vision-ary project joined ARGO Vision, an innovative firm that excels in visual recognition. For info about the cascades, please send a message via contact form here.

For any other info about Computer Vision and Artificial Intelligence please contact ARGO Vision.

LBP:  (contact us)

  • Full/partial opened eyes
  • Features set: 85.550 features
  • Training time: ~1 days
  • TP: ~ 95.8% of positive training set
  • FN: ~ 04.2% of positive training set
  • FP: ~ 7.51937e-006% of negative training set
  • Training size w=30 h=60 (aspect ratio 1:2)

LBP: (contact us)

  • Full/partial opened and semi/full closed eyes
  • Training time:  ~2 days
  • TP: ~ 97.87% of positive training set
  • FN: ~ 02.13% of positive training set
  • FP: ~ 9.91927e-006% of negative training set
  • Training size w=14 h=28 (aspect ratio 1:2)

OpenCV references: documentation and official guide.

37 comments

  1. Hi, I´m tech researcher, and I´m interenting in compere the performance between LBP and HOG both face as eyes, can you share yours HOG xml? Thanks, and it’s fantastic we found this support, congrats!!

    • Hello Hector,
      thanks for contacting us. Unfortunately at the moment we are not planning to share our HOG cascades. Many companies are using our HAAR/LBP/HOG cascades because they are dramatically better than OpenCV ones, keep in touch if some news about our sharing policy will change.

      Best regards,
      Vision-ary team.

    • Hello Hector,
      our policy has changed. If you still need our cascades please write an email to us.

      Regards,
      vision-ary team

      • Hi Team,
        Could you please send me the LBP/HOG classifier to detect eye regions with spectacles.This is for my master thesis.Could you please help

        Regards,
        Sharan S S

    • hello Edward,
      send us an email by the contact form with info about the usage (commercial / academic). We will reply in a while.

      Regards,
      vision-ary team

  2. Hello,

    Great work you have here, congratulations. I’m an engineering student from Brazil and I wonder if is it possible to use your face and eye lbp cascades on my final paper. I sent a message (at contact page) for you with all the details and I appreciate if you take a look.

    Thank you and continue this great job.
    Best regards.

  3. Hello,thanks for your work,I am using HOG for eye detection for academic usage,can you please send the dataset of eyes to me because I could not find a good one .Thanks in advance

  4. Hi, My name is Mustafa. I’m at Yildiz Technical University departmant of electronic and communication engineering. I’m at fourth class now. Nowadays, I am working on my bachelor thesis. I need to lbp eye detection xml. Could you please share? Thank you 🙂 My e-mail address: myigitsert@gmail.com

    • Dear Büşra,
      sorry for the delay in replying to you, we had some issue with spam filtering. Now the blog is again fully working!

      Do you still need support for the eye cascade? If so, please feel free to contact us via contact form. We will reply within 24 hours 🙂

      Regards,
      Vision-ary Team.

  5. Dear Vision-ary team, I would like to use your LBP xml file for eyes. I need this for some detection algorithms in embedded/mobile systems for my bachelor thesis. Could you please send me this file at gabe.n123 (at) web.de? That would be great and help me a lot. Best regards

  6. Dear Vision-ary team.
    I’m a master student on Federal University of Lavras (UFLA – Brazil) who is creating an app that will estimate driver’s sleepiness. Can you send me your LBP xml file, please? That would be extremily great for me. Very greateful!

    • Dear Gabriel,
      sorry for the delay in replying to you, we had some issue with spam filtering. Now the blog is again fully working!

      Do you still need support for the face cascade? If so, please feel free to contact us via contact form. We will reply within 24 hours 🙂

      Regards,
      Vision-ary Team.

  7. Dear Vision-ary team,
    I’m a professor in The University of Texas at Austin. I’m doing research on pet detection. Would you please send me your LBP xml file? Thank you very much!

    • Dear professor Zhang,
      sorry for the delay in replying to you, we had some issue with spam filtering. Now the blog is again fully working!

      Do you still need support for the pet cascade? If so, please feel free to contact us via contact form. We will reply within 24 hours 🙂

      Regards,
      Vision-ary Team.

  8. Dear Vision-ary team,
    I’m working on my bachelor thesis and I was wondering if you could please send me your lbp and haar eyes xml files?
    Thank you a lot!

    • Hello Halimeh,
      sorry for the delay in replying to you, we had some issue with spam filtering. Now the blog is again fully working!

      Do you still need help for the haar/lbp eye cascades? If so, please feel free to contact us via e-mail 🙂

      Regards,
      Vision-ary Team.

  9. Hello,
    I am a student and I wonder if is it possible to use your face and eye lbp cascades on my final year project. I sent a message (at contact page) for you with all the details and I appreciate if you take a look.
    Thank you.
    Best regards.

    • Hello Ahmed,
      sorry for the delay in replying to you, we had some issue with spam filtering. Now the blog is again fully working!

      Do you still need help for the eye cascade? If so, please feel free to contact us via e-mail 🙂

      Regards,
      Vision-ary Team.

  10. Hello, thanks for your work,I am researching eye disease using deep learning ,would you please send the dataset of eyes to me because I could not find a good one .Thanks

    • Dear Seungwoo,
      sorry for the delay in replying to you, we had some issue with spam filtering. Now the blog is again fully working!

      Sorry,we will not disclose our datasets. Do you need support for the eye cascade? If so, please feel free to contact us via contact form. We will reply within 24 hours 🙂

      Regards,
      Vision-ary Team.

  11. Hello,
    I am a Photographer and programmer.I have so many pictures, and I have to remove eye blinked pictures.
    If It’s possible, I want to use your eye cascades .
    Can you send me the eyes xml file? Thank you(^_^)

    Thank you.

    • Hello Takayuki,
      thanks for contacting us!

      Eye cascade can detect the presence of the eyes but if you want to analyze the “amount” of opening of the eye is a little bit more tricky than this.

      Anyway we can share the cascade with you to make some test. Send to us an e-mail (with subject: CASCADE OPENCV) to info|AT|vision-ary.net and we will send you the instructions to download the cascade.

      Regards,
      Vision-ary team!

  12. Hi!
    I’m currently learning about deep learning with opencv.
    Can you please share me your eye cascade XML?, I sent you an email via your contact page.
    Thank you.

  13. Hello, I’m Sid, student from UniKL Malaysia. I’m currently doing my FYP project (educational purpose) on real time eye detection in android based hardware. I have been implementing haar cascade eye for some time, I would gladly to test your LBP version for eye. Is it permissible?

    Everything is under educational purpose 😀
    I would gladly point out your research during presentation in future.

    Thank you.

Lascia un commento

Il tuo indirizzo email non sarà pubblicato.