Skip to content

Repository files navigation

Hand Gesture Prediction using EMG Signals

Overview

This project implements a real-time hand gesture recognition model using 3-channel EMG signals. The model predicts four distinct gestures and maps them to keyboard controls for interactive applications such as gaming.

Recognized Gestures & Mapped Controls

  • Bend Hand LeftLeft Arrow (←)
  • Bend Hand RightRight Arrow (→)
  • Flex FingersUp Arrow (↑)
  • PinchDown Arrow (↓)

Device & Communication

These scripts are designed to work with a custom NPG (NeuroPlayground) device that streams real-time EMG data via WebSocket.

Installation

1. Clone the Repository

git clone https://github.com/CIumsy/Hand_Gesture_Prediction.git

2. Install Dependencies

Make sure you have Python installed. Then, navigate to the project directory in the command prompt and install the required libraries:

pip install -r requirements.txt

Running the Model

1. Start Gesture Prediction

Run the predict.py script to process real-time EMG signals and predict gestures:

python predict.py

2. Enable Keyboard Controls

Once predictions are running, execute game_controller.py to send keypresses based on detected gestures:

python game_controller.py

Usage

  • Ensure that your NPG (NeuroPlayground) device is connected and streaming real-time data via WebSocket.
  • Run predict.py first to generate predictions.
  • Launch game_controller.py to map gestures to keyboard inputs.
  • Use your hand movements to control applications that accept keyboard input.

Future Enhancements

  • Expand Gesture Set: Add more complex gestures for enhanced control.
  • Improve Model Accuracy: Fine-tune the model with additional data.
  • Deploy on Embedded Devices: Optimize for low-power microcontrollers.

License

This project is open-source and available under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages