---
title: "Rock-Paper-Scissors Classifier"
url: "https://ridwaanhall.com/projects/rock-paper-scissors-classifier"
markdown: "https://ridwaanhall.com/projects/rock-paper-scissors-classifier.md"
summary: "A deep learning image classifier for rock, paper and scissors hand gestures, with over 99% validation accuracy."
---

# Rock-Paper-Scissors Classifier

> A deep learning image classifier for rock, paper and scissors hand gestures, with over 99% validation accuracy.

- Category: computer-vision
- Status: Completed
- Started: May 24, 2024
- Built with: TensorFlow, Python, Keras
- Source: https://github.com/ridwaanhall/Dicoding_Proyek-Akhir_Klasifikasi-Gambar_Belajar-Machine-Learning-untuk-Pemula

## About

### The problem

Classifying hand gestures from photos is a compact computer vision problem that still exposes the real challenges: varied lighting, angles and backgrounds.

### The approach

I trained a convolutional network with TensorFlow and Keras on a public dataset, using custom data generators and augmentation to make the model robust.

- Conv2D and MaxPooling layers with dropout and dense layers.
- Augmentation and a validation split to prevent overfitting.
- A prediction module for uploaded images, and plotted training history over 75 epochs.

### The result

The model reaches 99.22% validation accuracy with low loss, and classifies new photos of rock, paper or scissors reliably.

## Features

- **Dataset Processor**: Downloads and prepares the Rock-Paper-Scissors dataset with validation split and augmentation.
- **Model Builder**: Defines and trains a CNN model with dropout and softmax output for gesture classification.
- **Training History Plot**: Visualizes accuracy and loss trends across 75 epochs.
- **Image Predictor**: Predicts uploaded image class using the trained model and displays results with matplotlib.
- **Performance Metrics**: Achieves 99.22% validation accuracy with low loss, ensuring robust classification.

## Tags

CNN, Dicoding, TensorFlow, Keras, Image Classification, rock-paper-scissors, colab, Deep Learning, Python, gesture-recognition

## Elsewhere

- This page for people: https://ridwaanhall.com/projects/rock-paper-scissors-classifier
- Index of every page as Markdown: [llms.txt](https://ridwaanhall.com/llms.txt)
