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.
- Bend Hand Left →
Left Arrow (←) - Bend Hand Right →
Right Arrow (→) - Flex Fingers →
Up Arrow (↑) - Pinch →
Down Arrow (↓)
These scripts are designed to work with a custom NPG (NeuroPlayground) device that streams real-time EMG data via WebSocket.
git clone https://github.com/CIumsy/Hand_Gesture_Prediction.gitMake sure you have Python installed. Then, navigate to the project directory in the command prompt and install the required libraries:
pip install -r requirements.txtRun the predict.py script to process real-time EMG signals and predict gestures:
python predict.pyOnce predictions are running, execute game_controller.py to send keypresses based on detected gestures:
python game_controller.py- Ensure that your NPG (NeuroPlayground) device is connected and streaming real-time data via WebSocket.
- Run
predict.pyfirst to generate predictions. - Launch
game_controller.pyto map gestures to keyboard inputs. - Use your hand movements to control applications that accept keyboard input.
- 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.
This project is open-source and available under the MIT License.