https://github.com/aaminah2611/rps_gesture_recognition_application
A real-time Rock-Paper-Scissors game leveraging machine learning and computer vision. Featuring single and multiplayer modes, the application uses a CNN model with 92% gesture recognition accuracy, powered by OpenCV, Keras, and Flask. Demonstrates advanced gesture detection through precise hand movement tracking and interactive gameplay.
https://github.com/aaminah2611/rps_gesture_recognition_application
flask gesture-recognition keras python
Last synced: 2 months ago
JSON representation
A real-time Rock-Paper-Scissors game leveraging machine learning and computer vision. Featuring single and multiplayer modes, the application uses a CNN model with 92% gesture recognition accuracy, powered by OpenCV, Keras, and Flask. Demonstrates advanced gesture detection through precise hand movement tracking and interactive gameplay.
- Host: GitHub
- URL: https://github.com/aaminah2611/rps_gesture_recognition_application
- Owner: Aaminah2611
- Created: 2024-02-26T14:49:16.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-05T12:27:09.000Z (over 1 year ago)
- Last Synced: 2025-12-27T01:59:12.980Z (6 months ago)
- Topics: flask, gesture-recognition, keras, python
- Language: Python
- Homepage:
- Size: 40.7 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gesture Recognition Rock-Paper-Scissors Game
## Project Overview
This project develops an interactive Rock-Paper-Scissors game utilizing advanced gesture recognition technologies. The application uses machine learning and computer vision to enable players to play the classic game through hand gesture detection via camera input.
## Key Features
- Real-time gesture recognition using Convolutional Neural Networks (CNNs)
- Single-player and multiplayer game modes
- Web-based application with responsive interface
- Database integration for game statistics
## Technologies Used
### Backend
- **Language**: Python
- **Web Framework**: Flask (chosen for lightweight nature and flexibility)
- **Machine Learning**:
- TensorFlow
- Keras (with SqueezeNet architecture)
- **Computer Vision**: OpenCV
### Database
- **Database Management System**: MySQL
- **ORM**: SQLAlchemy
- **Database Features**:
- Game state tracking
- Player statistics storage
- Potential for future leaderboard implementation
### Frontend
- HTML
- Bootstrap
- JavaScript
## Web Application
The project includes a fully-developed web application framework using Flask, designed to provide a seamless and interactive user experience. The web interface offers:
- Dynamic route handling
- Real-time game state rendering
- Responsive design using HTML and Bootstrap
- Integrated OpenCV video processing

## Machine Learning Model Details
- **Model Architecture**: Convolutional Neural Network (CNN)
- **Framework**: Keras with SqueezeNet
- **Training Dataset**:
- Four labels: rock, paper, scissors, none
- Diverse images covering variations in:
- Lighting conditions
- Sizes
- Skin tones
- **Data Augmentation**:
- Used ImageDataGenerator
- Augmentation techniques: rotation, zoom
## Game Modes
1. **Single-player**:
- Player competes against computer

2. **Multiplayer**:
- Two players compete using camera inputs
- Real-time gesture recognition
- Winner calculated dynamically

## Future Enhancements
- Leaderboard integration
- Settings menu
- In-game chat feature
- Improved UI/UX
___________________________________________
## Requirements
- Python 3
- Keras
- TensorFlow
- OpenCV
- MySQL
## Installation Guide
1. Clone the repository:
```sh
$ git clone https://github.com/Aaminah2611/FYP_Motion_Detection.git
```
2. Navigate to the project directory:
```sh
$ cd rock-paper-scissors
```
3. Install dependencies:
```sh
$ pip install -r requirements.txt
```
4. Prepare Machine Learning Model:
- Ensure the machine learning model is present
- Model should be titled: `Rock-Paper-Scissors.keras`
- Place the model in the `Keras` directory
5. Running the Application:
- Single-player mode:
```sh
$ py singleplayer.py
```
- Multiplayer mode:
```sh
$ py multiplayer.py
```