Skip to content

Github repo for our group Project regarding Handwritten digit classification, for the Course CSL2050

Notifications You must be signed in to change notification settings

Nitesh0409/PRML-Apr2025

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 

Repository files navigation

Handwritten Digit Recognition


Web Application Repository (Frontend + ML Integration):
GitHub – Web App

Live Web Demo (Digit Drawing & Prediction):
Live Demo

Project Webpage Repository:
GitHub – Project Webpage

Project Webpage (Overview, Results & Report):
Project Webpage


Project Context

This project was done as part of CSL2050: Pattern Recognition and Machine Learning at
Indian Institute of Technology, Jodhpur,
Spring Semester, Academic Year 2024–25.


Table of Contents

  1. Project Description
  2. Methods and Performance
  3. Results
  4. Video Walkthrough
  5. How to Run the Project
  6. Contributors

Project Description

This project focuses on building a Handwritten Digit Recognition System using classical machine learning techniques. The objective is to design, implement, and compare different classification algorithms for recognizing handwritten digits with high accuracy.

Dataset Used

The dataset used is the MNIST (Modified National Institute of Standards and Technology) dataset, consisting of:

  • 60,000 training images
  • 10,000 test images
  • Image size: 28×28 pixels
  • Labels: digits 0–9

MNIST is a standard benchmark dataset widely used in computer vision and pattern recognition tasks.


Methods and Performance

We implemented and evaluated six machine learning algorithms using the same training and testing splits for a fair comparison.

1. K-Nearest Neighbors (KNN)

A non-parametric algorithm that classifies data points based on the majority class of their nearest neighbors using distance metrics such as Euclidean distance. While simple, KNN can be computationally expensive for large datasets.

2. Support Vector Machine (SVM)

SVM finds the optimal separating hyperplane between classes and can handle non-linear boundaries using kernel functions. It is particularly effective for high-dimensional data and achieved the best performance in this project.

3. Random Forest

An ensemble learning method that combines multiple decision trees trained on random subsets of data to improve generalization and reduce overfitting.

4. Logistic Regression

A linear classification model extended to multi-class classification using a one-vs-rest strategy. It estimates class probabilities and selects the most likely class.

5. Decision Tree

A tree-based model that recursively splits data based on feature values. While interpretable, decision trees are prone to overfitting if not carefully regularized.

6. Naive Bayes

A probabilistic classifier based on Bayes’ theorem with the assumption of feature independence. Despite its simplicity, it performs competitively for digit classification.


Results

Algorithm Accuracy (%)
K-Nearest Neighbors (KNN) 86.53
Support Vector Machine (SVM) 95.44
Random Forest 92.25
Logistic Regression 92.57
Decision Tree 86.52
Naive Bayes 88.15

SVM achieved the highest accuracy, followed by Logistic Regression and Random Forest.


Video Walkthrough

A detailed walkthrough explaining the project architecture, models, and web interface:
(Please set video quality to at least 480p)

Video Thumbnail


How to Run the Project

You can try the project directly using the web interface:

🌐 Live Demo:
👉 https://your-demo-project.vercel.app

  • Draw a digit using the on-screen marker
  • The trained models predict the digit in real time

Contributors

S. No. Team Member Contribution
1 Nitin Verma SVM Implementation
2 Nitesh Logistic Regression Model
3 Shruti Sunil Vibhute Random Forest
4 Saurabh Kumar Naive Bayes Model
5 Vanshita Jeenwal Decision Tree
6 Mallam Vishnu Priya KNN

Additional Resources

About

Github repo for our group Project regarding Handwritten digit classification, for the Course CSL2050

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 100.0%