This project is a presentation controller built using Python, OpenCV, MediaPipe, Scikit-learn, and SpeechRecognition. It allows users to control presentation slides using either hand gestures or voice commands, providing a touch-free presentation experience.
- Control presentation slides using hand gestures
- Control slides using voice commands such as “next” and “previous”
- Real-time hand tracking and gesture recognition
- Random Forest model trained on a custom hand gesture dataset
- Live webcam feedback with gesture prediction and confidence score
Model.ipynb– Jupyter notebook used to extract MediaPipe hand landmarks and train a gesture recognition model using Random Forest.gesture_model.pkl– Saved trained model (exported via Joblib).presentation_control.py– Main script to run either hand gesture or voice command mode for controlling slides.
- Detects hand landmarks using MediaPipe.
- Extracts (x, y) positions of 21 landmarks and classifies the gesture using a Random Forest model.
- If "next" gesture is detected with high confidence for a duration, it sends a
→(next slide). - If "previous" gesture is detected, it sends a
←(previous slide).
- Listens to your microphone using the SpeechRecognition library.
- Recognizes voice commands like "next" or "previous".
- Triggers respective key presses to control the slides.
python Final.pyThen, input either 0 (hand gesture mode) or 1 (voice command mode) when prompted.
- Python
- OpenCV
- MediaPipe
- Scikit-learn
- SpeechRecognition
- PyAutoGUI
- NumPy
- Joblib
pip install opencv-python mediapipe numpy scikit-learn joblib pyautogui SpeechRecognition
The dataset for training gestures was created manually using MediaPipe landmarks extracted from the webcam feed. The trained model is included as gesture_model.pkl.
- Support for more gestures (e.g., start/pause slideshow)
- Improved voice intent recognition (e.g., "go back one slide")
- GUI interface for better usability
You can use your own hand gesture dataset to personalize this system. Make sure to capture two clear hand gestures—one for "next" and one for "previous". Once your data is ready, run the Model.ipynb notebook with your dataset to train and export a new model.