AI controller for Atari emulator using body positions (via depth camera) and muscle contraction (via EMG sensors).
Use "pip install ." to setup the package and its dependencies.
- Setup configs file
src\configs\__init__.py
-
Prepare pose classifier
- Collect poses for the five conditions
python src\pose\record_pose.py --condition rest --duration 30 --skel 0 python src\pose\record_pose.py --condition left --duration 30 --skel 0 python src\pose\record_pose.py --condition right --duration 30 --skel 0 python src\pose\record_pose.py --condition up --duration 30 --skel 0 python src\pose\record_pose.py --condition down --duration 30 --skel 0
- Extract features and merge conditions
python src\pose\prepare_train_poses.py
- Train pose classifier
"python src\ai\train_model.py --type pose --model svm --train_and_evaluate True
-
Prepare emg classifier
- Collect emg for the two conditions
python src\emg\record_emg.py --condition rest --duration 30 python src\emg\record_emg.py --condition fire --duration 30
- Extract features and merge conditions
python src\emg\prepare_train_emg.py --window 250
- Train emg classifier
python src\ai\train_model.py --type emg --model svm --train_and_evaluate True
-
Run pose and emg controlled in parallel Two modes are possible here: local (emulator is running in my pc) or remote (emulator is running in another pc)
Local version:
python src\pose\run_pose_controller.py --model svm --skel 0 --ip 127.0.0.1
python src\emg\run_emg_controller.py --model svm --window 250 --ip 127.0.0.1
Remote version:
python src\pose\run_pose_controller.py --model svm --skel 0
python src\emg\run_emg_controller.py --model svm --window 250
python src\emulator\game_engine.py --atari_ip 127.0.0.1
python src\keyboard\keyboard_remote_control.py --ip 127.0.0.1
Always run pip install .
after each code change!