GithubHelp home page GithubHelp logo

tianxingwu / realtime-glasses-detection Goto Github PK

View Code? Open in Web Editor NEW
108.0 3.0 36.0 12.8 MB

Eyeglasses detection for real-time videos based on face alignment with Dlib and OpenCV-Python

License: MIT License

Python 100.00%
opencv-python dlib face-alignment

realtime-glasses-detection's Introduction

Real-time Glasses Detection

Recent Updates:

  • 15 Aug 2019: Add ROI_2 to the measurement regions to improve robustness

Introduction

This is a light-weight glasses detector written in Python for real-time videos. The algorithm is based on the method presented by the paper in Reference with some modifications. Note that the goal is to determine the presence but not the precise location of glasses.

Requirements

  • python 3.6
  • numpy 1.14
  • opencv-python 3.4.0
  • dlib 19.7.0

Method

To determine the presence of glasses, the edgeness value (y-direction) of two important regions on the aligned face are computed. Then a indicator is constructed based on these values to do the classification.

The two measurement regions are shown on the schematic below.

What's Next

A threshold is manually chosen in this specific version, which is based on experiment results. The next goal is to develop an algorithm that can choose the threshold automatically in order to enchance robustness.

Welcome to star, fork and try it on your own! ๐Ÿ˜Š

Reference

Jiang, X., Binkert, M., Achermann, B. et al. Pattern Analysis & Applications (2000) 3: 9. https://doi.org/10.1007/s100440050002

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.