Git Product home page Git Product logo

emgproc's Introduction

FERI-EMGProc

Electromyography Processing application at Neuro, Nano and Quantum Computing (slo. Nevro, Nano in Kvantno Računalništvo).

Includes PCA analysis script and helper applications for processing conversions and model fitment.

Usage

Following are most useful usage patterns and do not describe all patterns of the application. Run with -h to show all available arguments.

Core

  • $ emgproc.py to read raw data at 200 Hz from Myo device.
  • $ emgproc.py -r rec.csv to playback a CSV recording at 200 Hz.
  • All arguments support recorded and raw data.
  • $ emgproc.py --rms to smooth the data in real-time.
  • $ emgproc.py --s to put Myo into deep sleep (shut down).

Visualizer Controls

  • R to record to a CSV file (using selected processing).
  • P to pause data reading.
  • Q to quit the application.

Processing

PCA, ICA and SVM fitting and processing is available in real-time (with visualizer) as well as separate command line mode for conversions and fitting. Example training data is located in training/ folder.

All training was performed with the Myo armband positioned on the most dominant arm, just below the elbow, with the Myo logo on the inner side of the arm.

Process data in real-time:

  • $ emgproc.py --pca *_raw.csv fit at start using given training data.
  • $ emgproc.py --ica model.ica given training model.

Fit and save model to a file:

  • $ emgfit.py --pca *_raw.csv creates <timestamp>_model.pca
  • $ emgfit.py --ica model.ica creates <timestamp>_model.ica

Convert recording to processed recording:

  • $ emgconvert.py example_raw.csv --pca *_raw.csv creates example_pca.csv

Game

Small proof of concept game based on wultes/snapy. It features Myo gesture recognition (extension and flexion) to control snake movement.

  • Place Myo armband on your most dominant arm, just below the elbow, with the Myo logo on the inner side of the arm.
  • Run with $ python emggame.py (using 2 PCA components 2comp training models).

Best gesture recognition is achieved by performing extension and flexion quickly and slowly returning to the idle position to prevent triggering the opposite gesture on the way back.

emggame

Setup

Targetted at Python 3.8.

  • $ python -m venv venv (virtual environment)
  • $ source venv/bin/activate
  • $ pip install -r requirements.txt ($ pip freeze > requirements.txt to update dependencies)
    • Installs all required packages.

Dependencies:

emgproc's People

Contributors

jonpas avatar

Watchers

 avatar  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.