Python Β· Machine Learning Β· Deep Learning

Rock Paper Scissors Detection

2026 Summer Python Course Project Collection covering Python fundamentals, machine learning regression prediction, student behavior data analysis, and YOLO11n-based Rock Paper Scissors gesture recognition.

At a glance

This page documents a course path from Python fundamentals to computer vision, in four stages: 14 syntax exercises, a random-forest regression on California housing prices, analysis of student digital-behaviour data, and a three-class gesture detector trained with YOLO11n. The gesture model reaches mAP50 0.940 on the validation set, and the page lists the dataset, training configuration and evaluation results for comparison.

About this project

What it addresses

Coursework often stops at a single algorithm example. This project strings Python fundamentals, classical machine learning and deep-learning detection into one path, with complete data, code and results at every stage.

Contents of the four stages

Stage one covers 14 Python syntax exercises; stage two applies a random forest to regression on the California housing dataset; stage three analyses student digital-behaviour data and produces six chart types; stage four trains YOLO11n to detect rock, paper and scissors gestures.

What it uses

Python is the primary language, with scikit-learn’s random forest for analysis and modelling. The vision stage uses YOLO11n at 2.58M parameters, trained on an RTX 5060.

Results and how to read them

The gesture model reaches mAP50 0.940 on the validation set; the page lists dataset size, augmentation and training configuration. Reproducing it requires the course code, the dependency environment and the model weights.

Rock Paper Scissors Detection Demo
Project 1

Python Fundamentals Exercises

14 beginner exercises: comprehensive coverage of data types, control flow, functions, lists, dictionaries, and more.

Project 2-1

California Housing Prediction

Random Forest regression for California housing median price prediction, RΒ² = 0.805. Verified that income and geographic location are key influencing factors.

Project 2-2

Student Behavior Analysis

Kaggle real-world dataset analyzing the impact of study time, screen time, etc. on CGPA, with multi-model comparison.

Project 3

YOLO11n Gesture Recognition

πŸͺ¨πŸ“„βœ‚οΈ Real-time detection of Rock/Paper/Scissors, validation set mAP50 = 0.940, millisecond-level inference.

Project 1

Python Programming Fundamentals

Beginner-level Python programming exercises, zero third-party dependencies

Data Types

  1. 1.1.py β€” Square of positive integer
  2. 1.2.py β€” Formatted admission info output
  3. 1.3.py β€” Right triangle hypotenuse length

Operators & Expressions

  1. 2.1.py β€” Euclidean distance between two points
  2. 2.2.py β€” Sum of cubes of digits in a three-digit number
  3. 2.3.py β€” Letter occurrence count (case-insensitive)

Control Flow & Functions

  1. 3.1-3.2 β€” Grade level / Character type
  2. 4.1-4.2 β€” Digit judgment / Factorial sum
  3. 5.1-5.2 β€” Function encapsulation & math calculations
  4. 6.1-6.2 β€” List comprehensions / Dictionary mapping
Project 2-1

California Housing Price Prediction β€” Random Forest Regression

scikit-learn Β· California Housing Dataset

Dataset

California Housing β€” scikit-learn built-in dataset

  • Samples: 20,640 block group records
  • Features: 8 (median income, house age, rooms, population, geographic location, etc.)
  • Target: MedHouseVal (median house value, $100K)

Model Evaluation

MSE 0.2552
RMSE 0.5052
RΒ² 0.8053

Top 4 Feature Importance

MedInc (Median Income) > AveOccup (Average Occupancy) > Latitude / Longitude (Geographic Location) > HouseAge

Income level is the strongest predictor for housing prices; the importance of geographic location reflects regional housing price disparities across California.

Python scikit-learn Random Forest Pandas Matplotlib
Project 2-2

Student Digital Behavior and Academic Performance Analysis

Kaggle real-world dataset Β· Linear Regression vs Random Forest

Dataset

Student Lifestyle and Academic Performance (Kaggle)

  • 12 fields: Age, Branch, Study_Hours, Sleep_Hours, Screen_Time, Gym, Diet, Attendance, Stress, Residence, Internal_Marks, CGPA
  • Target variable: CGPA (Grade Point Average, 0~10)
  • Excluded Internal_Marks to prevent data leakage

Data Cleaning Pipeline

  • Field selection β†’ Deduplication
  • Numeric fields: Median imputation for missing values
  • Categorical fields: Mode imputation
  • Outlier filtering (reasonable ranges for age, study hours, etc.)
  • Categorical variables: One-hot encoding (drop_first)

Visual Analysis (6 Charts)

Screen Time Distribution

Right-skewed distribution; most students spend 3–8 hours on screens daily

Study Hours vs CGPA

Clear positive correlation; students studying 6–8h/day tend to have higher CGPA

Top 3 Feature Importance

Study Hours > Attendance > Screen Time

Python Linear Regression Random Forest Pandas Seaborn EDA
Project 3

Rock Paper Scissors Gesture Recognition β€” YOLO11n

πŸͺ¨πŸ“„βœ‚οΈ Ultralytics Β· PyTorch Β· Object Detection

Dataset

rock-paper-scissors-sxsw (Roboflow v11)

  • Total 15,874 images
  • Training set 14,966 / Validation set 588 / Test set 320
  • 3 classes: Paper, Rock, Scissors
  • Input size: 640Γ—640

Data Augmentation

7 augmented versions generated per original image:

  • Horizontal flip (50%), random rotation Β±12Β°
  • Shear Β±2Β°, brightness/exposure Β±25%
  • Gaussian blur 0~1.5px, salt-and-pepper noise 1%

Training Configuration

ModelYOLO11n (2.58M params)
Epochs50
Batch16
OptimizerAdamW
Training Time~3.07h
GPURTX 5060 (8GB)

Evaluation Results

Validation Set

mAP50 (All) 0.940
mAP50-95 0.697
Precision (P) 0.942
Recall (R) 0.891
Inference Speed < 2.1ms

Test Set

mAP50 (All) 0.934
mAP50-95 0.693
Precision (P) 0.898
Recall (R) 0.920

Per-Class Performance

πŸ“„ Paper

Val mAP500.936
Test mAP500.904

πŸͺ¨ Rock

Val mAP500.943
Test mAP500.951

βœ‚οΈ Scissors

Val mAP500.940
Test mAP500.947

Application Modes

Single Image Inference

Recognize gestures from any photo; results are annotated with bounding boxes + labels and saved to the output directory.

predict.py

Real-time Camera Detection

Captures from system camera (1280Γ—720) in real-time with millisecond-level per-frame inference; displays FPS in window, press Q to exit.

detect.py

Evaluation Scripts

Validation set evaluation, test set evaluation, dataset download utility β€” full coverage from training to deployment pipeline.

evaluate.py / test.py
Python PyTorch YOLO11n Ultralytics OpenCV Roboflow CUDA
Back to projects