This project integrates EEG-based movement classification, real-time prosthetic control, continuous learning through feedback, and vision-based grasp validation using ROS2.
- Overview
- Project Structure
- Getting Started
- Model Highlights
- Integrated Movements
- Vision Modules Explained
- ROS2 Integration
- Contributing
- License
robot_classifier/
│
├── data/
│ └── motor_imagery/
│ └── raw/
│ └── preprocessed/
│
├── neuroscience/
│ ├── eeg_model/
│ │ ├── model.py
│ │ ├── train_classifier.py
│ │ ├── online_learning.py
│ │
│ ├── live_prediction/
│ │ └── predictor.py
│ │
│ ├── feedback/
│ │ └── correction_logger.py
│ │
│ ├── utils/
│ │ └── signal_processing.py
│ │
│ └── setup.sh
│
├── computer_vision/
│ ├── main.py
│ ├── grasp_validation.py
│ ├── grasp_identifier.py
│ ├── object_detection.py
│ ├── hand_landmarks.py
│ └── CONST.py
│
├── robotics/
│ ├── ROS2_node.py
│ └── arduino_servo_control.ino
cd neuroscience
bash setup.shPlace your EEG training data in data/motor_imagery/preprocessed/ as X.npy and y.npy, then run:
python eeg_model/train_classifier.pypython live_prediction/predictor.pyWhen a prediction is wrong, the system will ask for a correction, which is saved for later.
python -c "
import numpy as np
from feedback.correction_logger import CORRECTION_FILE
from eeg_model.online_learning import update_model_with_feedback
data = np.load(CORRECTION_FILE)
update_model_with_feedback(data['X'], data['y'])
"- EEGNetAdvanced
- Depthwise separable convolutions
- Spatial attention mechanism
- Dropout, batch normalization
- Online Learning
- Learns from feedback over time
- Adapts to new user-specific EEG signals
restopen_handclose_handpinch_gripthumbs_upwave
These correspond to movements executed by ROS2 and the prosthetic arm.
The computer_vision/ folder includes:
- Real-time object and hand detection with MediaPipe and YOLO
- Grasp classification based on geometry + ML
- Stability and landmark-based grasp checking
The robotics/ROS2_node.py reads EEG predictions, translates them into motion commands and sends them to:
- Arduino via serial (servo control)
- Other ROS2 components
Feel free to fork and make improvements – especially if you’re improving classifier accuracy or adding new gesture support.
MIT License. See LICENSE file for details.