Skip to content

DamsaraJayanath/AI-Based_Presentation_Control_System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ€πŸ–οΈ AI-Based Presentation Control System

This project is an intelligent presentation controller built using Python, MediaPipe, Scikit-learn, and SpeechRecognition. It allows users to control slide presentations using either hand gestures or voice commands β€” offering a touch-free and smooth experience during talks or lectures.

🧠 Key Features

  • Dual Control Modes: Use either hand gestures or voice commands to navigate slides.
  • Hand Gesture Control: Trained a Random Forest classifier on custom hand gesture dataset using MediaPipe landmarks.
  • Voice Command Control: Uses Google's Speech Recognition API to interpret "next" and "previous" slide commands.
  • Real-time Feedback: Displays live webcam feed with hand detection, gesture prediction, and confidence levels.

πŸ“‚ File Structure

  • 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.

πŸ–οΈ Hand Gesture Mode

  1. Detects hand landmarks using MediaPipe.
  2. Extracts (x, y) positions of 21 landmarks and classifies the gesture using a Random Forest model.
  3. If "next" gesture is detected with high confidence for a duration, it sends a β†’ (next slide).
  4. If "previous" gesture is detected, it sends a ← (previous slide).

πŸŽ™οΈ Voice Command Mode

  1. Listens to your microphone using the SpeechRecognition library.
  2. Recognizes voice commands like "next" or "previous".
  3. Triggers respective key presses to control the slides.

▢️ How to Run

python Final.py

Then, input either 0 (hand gesture mode) or 1 (voice command mode) when prompted.

πŸ›  Requirements

  • Python 3.x
  • Webcam and/or microphone
  • Python libraries:
    • opencv-python
    • mediapipe
    • numpy
    • scikit-learn
    • joblib
    • pyautogui
    • speechrecognition

πŸ“¦ Install Dependencies

pip install opencv-python mediapipe numpy scikit-learn joblib pyautogui SpeechRecognition 

πŸ“ Dataset

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.

πŸ“Œ Applications

  • Presentations in classrooms or meetings
  • Touch-free navigation during webinars or live demos
  • Assistive technology for hands-free interaction

πŸ’‘ Future Enhancements

  • Support for more gestures (e.g., start/pause slideshow)
  • Improved voice intent recognition (e.g., "go back one slide")
  • GUI interface for better usability

πŸ’‘ Tip

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published