Code Monkey home page Code Monkey logo

eye-closure-detection-ear's Introduction

Eye-closure-detection-EAR

Eye closure detection based on EAR

基于人眼纵横比计算的人眼闭合检测算法

原理

PDlib是基于现代C++的通用多平台框架,在机器学习和图像处理领域提供了一系列相关功能

它在人脸检测中,将人脸视为可分的68个数据点,部分人脸数据可根据这些数据点进行检测

人脸68数据点

Tereza Soukupová于2016年发表的一篇名为Eye blink detection using facial landmarks的文章中

基于实际数据集使用面部关键点检测器作为输入,提出了简单有效的眨眼检测眨眼算法

通过定位眼睛和眼睑的轮廓得出眼睛的长宽比(Eye Aspect Ratio,EAR),用于估计睁眼状态

将访问到的左眼数据[43,48]进行编号

右眼示意图

分别对应[p1,p6]得出公式:

人眼纵横比公式

在睁眼状态时EAR通常保持恒定,而闭眼时EAR趋近于零

右眼进行同理计算后,通过左右眼同步,将得到的左右眼两个EAR进行平均后得出最终结果

实验

阈值是判断睁闭眼的关键,因此合适的阈值可以提高检测的准确度

我们使阈值从0到1变化,步长为0.05,在使用数据集测试后,得到了下图

阈值变化图

测试结果显示设置0.2为阈值最合适,也可根据实际情况调整

源代码

本项目的源代码已完全公开

图片显示不出来可以去我的博客查看详情

欢迎关注我的博客

eye-closure-detection-ear's People

Contributors

jasoncaocjx avatar

Stargazers

小罗 avatar  avatar  avatar Jia Li avatar  avatar  avatar  avatar  avatar Shan Jia avatar Cici avatar KangChou~OvO⁹⁹ avatar Fan avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.