Git Product home page Git Product logo

jins-blink's Introduction

JINS-blink

Detect blinks using the J!NS MEME glasses

Recording Data

Data is recorded with the JINS-MEME Data Logger and OpenFace.

  1. Connect the JINS data logger to the glasses, but do not start recording. Set the mode to'Full'. It is recommended to set the transmission speed to 100Hz.
  2. Set OpenFace to record AUs. You may also set it to record other things, but AUs are all that is necessary.
  3. Begin recording the webcam with OpenFace, then begin measuring with JINS. Once both are running, blink repeatedly at the webcam.
  4. Begin to blink normally, making sure your eyes are visible to the webcam and the JINS glasses are getting a good signal.
  5. Before stopping the recording blink repeatedly again. Stop measuring with JINS and then stop OpenFace.
  6. Move the generated OpenFace and JINS files into a folder of your choosing, and modify the path variable in alignment.py and merge_data.py.
  7. Run alignment.py. Zoom in as necessary and right click a point on the JINS EOG plot, then right click the corresponding point in time on the OpenFace plot. Close the window. A new window will open showing the end of the data. Again, right click on an JINS EOG point and then on the corresponding OpenFace point. Close the window.
  8. Run merge_data.py.

Training a Model

After recording data, a model can be trained to look at the JINS EOG signal and determine if the user is blinking or not.

  1. Set the training_data_fname in train.py to the combined.csv file produced by merge_data.py.
  2. Run train.py

Realtime Blink Evaluation

Once a model has been trained, blinks can be detected in realtime.

  1. Open the JINS MEME Data Logger. Make sure 'external output socket' is turned on in settings. Connect to the glasses and begin. Set the mode to 'Full' and the transmission speed to the speed you chose when recording. Start measuring.
  2. Run live_classify.py. It will ask for the IP address and port of the JINS data logger. You can also run live classify with arguments like so:
$ python live_classify.py ip_address port

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.