This project implements a gesture recognition system to control Spotify playback using hand gestures captured through a webcam.
- Real-time hand gesture recognition
- Spotify playback control (play/pause, next/previous track, toggle loop)
- Multi-processing for smooth performance
- Python 3.7+
- OpenCV
- NumPy
- Pandas
- Mediapipe
- Seaborn
- Joblib
- Scikit-learn
- Matplotlib
- Spotipy
git clone https://github.com/NotThareesh/GestureBeats.gitpip install -r requirements.txtCreate a Spotify Developer account and create a new app Set environment variables for CLIENT_ID and CLIENT_SECRET
Run the main script:
python main.pyEnsure your Spotify account is connected to an active device before running the program.
- Custom dataset with 4000+ records of hand landmark coordinates
- Gestures: OK, Single Finger Pointer, Left/Right Pointer, Rock & Roll, Open Hand
- Used StandardScaler for data normalization
- Implemented Kernel SVC with RBF kernel
- Utilized GridSearch for hyperparameter optimization
- K-Fold Cross Validation (5 folds) for model evaluation
- Multiprocessing implementation to prevent camera lag
- 3-second cooldown between API calls
- 96% accuracy threshold for gesture recognition
- Implement seek functionality using pointer gestures
- Expand gesture set for more controls
- Improve model generalization across different users
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License. See the License file for details.