{"id":22165834,"url":"https://github.com/cyberfantics/rock-paper-vision","last_synced_at":"2026-05-18T00:04:09.426Z","repository":{"id":265086592,"uuid":"895000959","full_name":"cyberfantics/Rock-Paper-Vision","owner":"cyberfantics","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-02T08:11:59.000Z","size":13086,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T16:14:41.829Z","etag":null,"topics":["ai","computer-vision","opencv","python","rock-paper-scissors"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cyberfantics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-27T11:36:30.000Z","updated_at":"2024-12-02T08:12:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"02bf11d1-f93c-4784-addd-848ab59804fe","html_url":"https://github.com/cyberfantics/Rock-Paper-Vision","commit_stats":null,"previous_names":["cyberfantics/rock-paper-vision"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cyberfantics/Rock-Paper-Vision","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyberfantics%2FRock-Paper-Vision","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyberfantics%2FRock-Paper-Vision/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyberfantics%2FRock-Paper-Vision/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyberfantics%2FRock-Paper-Vision/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cyberfantics","download_url":"https://codeload.github.com/cyberfantics/Rock-Paper-Vision/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyberfantics%2FRock-Paper-Vision/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265554787,"owners_count":23787279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","computer-vision","opencv","python","rock-paper-scissors"],"created_at":"2024-12-02T05:16:49.294Z","updated_at":"2026-05-18T00:03:59.414Z","avatar_url":"https://github.com/cyberfantics.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rock-Paper-Vision\n\nWelcome to **Rock-Paper-Vision**, a computer vision-based implementation of the classic Rock-Paper-Scissors game. This project uses OpenCV and CvZone's Hand Tracking Module to recognize hand gestures, enabling players to compete against an AI in real time.\n\n---\n\n## ScreenShots\n\u003cdiv style=\"display: flex; justify-content: space-between;\"\u003e\n  \u003cimg src=\"screenshots/1.png\" width=\"30%\" /\u003e\n  \u003cimg src=\"screenshots/2.png\" width=\"30%\" /\u003e\n  \u003cimg src=\"screenshots/3.png\" width=\"30%\" /\u003e\n\u003c/div\u003e\n\n\u003cdiv style=\"display: flex; justify-content: space-between;\"\u003e\n  \u003cimg src=\"screenshots/4.png\" width=\"30%\" /\u003e\n  \u003cimg src=\"screenshots/5.png\" width=\"30%\" /\u003e\n  \u003cimg src=\"screenshots/6.png\" width=\"30%\" /\u003e\n\u003c/div\u003e\n\n---\n\n## Features\n- **Real-time hand tracking**: Detects gestures using your webcam.\n- **AI opponent**: AI makes random moves for competitive gameplay.\n- **Interactive UI**: Displays live scores and visual feedback with a custom background.\n- **Hand gestures supported**:\n  - **Rock**: All fingers folded.\n  - **Paper**: All fingers open.\n  - **Scissors**: Only index and middle fingers open.\n\n---\n\n## How It Works\n1. **Hand Tracking**:\n   - Uses `cvzone.HandTrackingModule` for detecting and interpreting hand gestures.\n2. **Gameplay**:\n   - Recognizes the player's gesture.\n   - Generates a random AI move.\n   - Compares gestures to determine the winner based on traditional rules:\n     - Rock beats Scissors.\n     - Scissors beats Paper.\n     - Paper beats Rock.\n3. **Scoring**:\n   - Updates and displays the score for both player and AI in real time.\n   - Visual feedback enhances the game experience.\n\n---\n\n## Installation and Setup\n### Requirements\n- **Python 3.8 or higher**\n- **Libraries** (install via `pip`):\n  ```bash\n  pip install opencv-python cvzone\n  ```\n\n### Steps\n#### Clone This Repository\n```\n  git clone https://github.com/cyberfantics/Rock-Paper-Vision.git\n  cd Rock-Paper-Vision\n```\n#### Run File Using\n```python main.py```\n\n---\n\n# Controls\n- **Play:** Press `P` to start the game.\n- **Quit:** Press `Q` to exit the game.\n- **Restart:** Press `R` to restart the game.\n- **Record Game:** Press `S` to record the Game.\n- **Open Camera:** Press `C` to Open Camera.\n- **Record Game:** Press `I` to See Instructions Of Game.\n---\n\n## Video Demo\nCheck out the gameplay video on YouTube:\n\n[![Watch the gameplay video](https://img.youtube.com/vi/imOyABws1ro/hqdefault.jpg)](https://www.youtube.com/watch?v=imOyABws1ro)\n\n---\n\n# Author\n**Syed Mansoor ul Hassan Bukhari**  \n[GitHub](https://github.com/cyberfantics) | [LinkedIn](https://www.linkedin.com/in/mansoor-bukhari/)\n\n---\n\nEnjoy the game! 🎮\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyberfantics%2Frock-paper-vision","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyberfantics%2Frock-paper-vision","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyberfantics%2Frock-paper-vision/lists"}