Skip to content

Mohataseem89/Computer-Vision-RPS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Computer Vision - Hand Gesture AI Game

An interactive Rock–Paper–Scissors game built using Computer Vision and Hand Gesture Recognition.
The player’s move is detected in real time using a webcam, while an AI opponent plays against you.

This project uses OpenCV, MediaPipe, and CVZone to create a fun, responsive, and visually clean gaming experience.


Features

  • Real-time hand gesture detection
  • AI opponent with random move selection
  • Countdown-based round system
  • Live score tracking (Player vs AI)
  • Clean & modern UI using OpenCV overlays
  • Restart and replay rounds easily
  • Works directly with your webcam

Hand Gesture Mapping

Gesture Move
✊ Fist Rock
βœ‹ Open Palm Paper
✌️ Index + Middle Finger Scissors

πŸ› οΈ Tech Stack

  • Python 3.10
  • OpenCV
  • MediaPipe
  • CVZone
  • NumPy

Project Structure

Rock_Paper_Scissor/ β”‚ β”œβ”€β”€ data/ β”‚ β”œβ”€β”€ bg.png # Background UI β”‚ β”œβ”€β”€ rock.png # AI rock image β”‚ β”œβ”€β”€ paper.png # AI paper image β”‚ └── scissor.png # AI scissor image β”‚ β”œβ”€β”€ main.py # Game logic β”œβ”€β”€ requirements.txt # Dependencies β”œβ”€β”€ .gitignore └── README.md


Installation & Setup

Note:

Please use Python 3.10.x for best compatibility with MediaPipe.

git clone https://github.com/Mohataseem89/Computer-Vision-RPS.git
cd Computer-Vision-RPS
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
python main.py

Courtesy

Project inspired by learning from Murtaza Hassan: Github

πŸ§‘β€πŸ’» Author

Mohataseem Khan πŸ“§ Connect with me: LinkedIn β€’ GitHub

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages