Skip to content

RozhanMk/Real-time-rock-paper-scissor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🪨📄✂️ Real-Time Rock Paper Scissors Game with YOLOv8

This project implements a real-time Rock-Paper-Scissors game using YOLOv8 for hand gesture detection. The game runs in Google Colab and utilizes a webcam for player input.

How to Play

  1. Both players must start by showing "Rock".
  2. Move your hands for 3 seconds. If a player does not move their hand within this time, they lose 1 point.
  3. Show your move (Rock, Paper, or Scissors).
  4. YOLOv8 detects the moves and determines the winner.
  5. Bounding boxes are drawn around detected moves for visualization.

Running the Game in Google Colab

  1. Open this Colab notebook.
  2. Replace the API_KEY with your own from Roboflow.
  3. Run all cells to start the game.
  4. Allow camera access in Google Colab.

Dataset

  • The dataset was created using Roboflow.
  • It contains labeled images of hands showing Rock, Paper, and Scissors.
  • The dataset was made with the help of many students from Shahid Beheshti University (I don't take that university seriously, but their computer engineering students are quite helpful!).
  • To use the dataset, you must generate your API key from Roboflow and replace it in the notebook.

Bonus point

  • For anyone interested, the notebook for detecting Rock Paper Scissors using mediapipe library is added to this repository.

Resources

Tech Stack

  • YOLOv8 (Ultralytics) for real-time hand gesture detection
  • Google Colab for running the game
  • OpenCV for image processing
  • Roboflow for dataset management

Fine tuning

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published