Git Product home page Git Product logo

eye-blink-detector's Introduction

Dependencies

This project has moved to opencv version 3.0.0 or higher.

  • opencv-python
  • gnuplotlib. Use the command sudo pip install gnuplotlib
  • gnuplot

gnulotlib may not work on python3.

First frame of video/camera is presented to the user to select the box where your eyes it. Use mouse to left-click at a point, drag the cursor to another point, and release the left-button. You won't see a box unless you are done dragging. Once box is visible press q. The process will start.

blinky.py

Process a given video for blinks. Very fast.

  1. python blinky.py -f video_file.webm
  2. Select a region on frame where eye it.
  3. Let it run till video is over. A csv files will be produced with blink location. Two algorithms are used: one based on edge detection and other one is based on couting dark-pixals.

blinky_gui.py

Gui version of blinky.py. Only for testing and demo purposes. Very slow.

blinky_webcam.py

Process the live feed from given camera index ( default 0 ). Only for demo purpose.

eye-blink-detector's People

Contributors

anushreenarjala avatar dilawar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

eye-blink-detector's Issues

Error on using blinky_gui.py

Hello Dilawar, I am trying to run your blinky_gui.py code on Ubuntu16.04 using virtual environment with Python 3.5 and OpenCv 3.3. version. I am taking one .mp4 file as video input. On running I am getting this error.
screenshot from 2018-03-31 04-15-33
Can you please help me with this.

A lot of issues with avi format.

On the video 3.avi following traceback:

 Exception in Tkinter callback
>>> Traceback (most recent call last):
>>>   File "C:\python27\lib\lib-tk\Tkinter.py", line 1536, in __call__
>>>     return self.func(*args)
>>>   File "C:\python27\lib\lib-tk\Tkinter.py", line 587, in callit
>>>     func(*args)
>>>   File
>>> "C:\python27\lib\site-packages\matplotlib\backends\backend_tkagg.py", lin
>>> e 147, in _on_timer
>>>     TimerBase._on_timer(self)
>>>   File "C:\python27\lib\site-packages\matplotlib\backend_bases.py", line
>>> 1305, i
>>> n _on_timer
>>>     ret = func(*args, **kwargs)
>>>   File "C:\python27\lib\site-packages\matplotlib\animation.py", line 991,
>>> in _st
>>> ep
>>>     still_going = Animation._step(self, *args)
>>>   File "C:\python27\lib\site-packages\matplotlib\animation.py", line 797,
>>> in _st
>>> ep
>>>     self._draw_next_frame(framedata, self._blit)
>>>   File "C:\python27\lib\site-packages\matplotlib\animation.py", line 816,
>>> in _dr
>>> aw_next_frame
>>>     self._draw_frame(framedata)
>>>   File "C:\python27\lib\site-packages\matplotlib\animation.py", line
>>> 1179, in _d
>>> raw_frame
>>>     self._drawn_artists = self._func(framedata, *self._args)
>>>   File "blinky_gui.py", line 100, in animate
>>>     (x0, y0), (x1, y1) = box_
>>> ValueError: need more than 0 values to unpack
>>>

Send over email by Piyush.

Raspberry Pi

I am trying to use your code for raspberry pi but i am getting stuck in importing the files itself,
i cant import the extract and webcam file in the blink.py, i have tried whatever i could find

blinky_webcam.py

when i try to execute blinky_webcam.py in ubuntu, I am getting this error
[WARN] failed to get FPS. Setting to 15
[ERR] Failed to get blinks: fileno

Output

I'm not really sure I understand the output. Could you explain the two files that are output, what the columns mean, what the units are, etc.

I received two output files for a 30 second video but the "# time" column in one file goes up to 8 seconds and the "# time" column in the other only goes up to 12 and has 291 rows. Can you explain this?

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.