Arcus72's picture
Upload README.md
cee987a verified
|
Raw History Blame Contribute Delete
2.26 kB

A newer version of the Gradio SDK is available: 6.30.0

Upgrade
metadata
title: Image-Digit-Classification
emoji: ๐Ÿ–‹๏ธ
colorFrom: blue
colorTo: gray
sdk: gradio
sdk_version: 6.6.0
app_file: app.py
pinned: false

Digit Classification System

This project is a machine learning application designed to recognize handwritten digits using Convolutional Neural Networks (CNN). It includes tools for data preprocessing, model training, and an interactive drawing interface for real-time predictions.

๐Ÿ‘‰ Live Demo

Files

  • app.py: The main application file that creates a Gradio interface for the digit recognition system.
  • main_analysis.ipynb: A Jupyter notebook that contains the data processing, model training, and evaluation code.
  • train_mnist.csv: The dataset used for training the model.

Data source

  • Source: MNIST in CSV (Kaggle)
  • Format: CSV containing grayscale pixel values (0โ€“255).
  • Target: The label column representing the digit (0โ€“9).
  • Dimensions: Aside from the label, each row consists of 784 features (a flattened 28ร—28 pixel image).

Key Features

  • Data processing for model training: Processes raw CSV data into $28 \times 28$ grayscale images by parsing pixel coordinates (from train_mnist.csv).
  • Dynamic Data Augmentation (new): Enhances model generalization using random rotations, translations, and zooms.
  • Automated Hyperparameter Tuning (new): Utilizes BayesianOptimization to search for the best architecture, including the number of layers, filters, dropout rates, and optimizers.
  • Comprehensive Evaluation: Features detailed visualization of label distribution, confusion matrices, and an analysis of misclassified samples.
  • Interactive Demo: A Gradio interface that allows users to draw digits and get instant predictions from the trained model.

Tech Stack

  • Core: Python, TensorFlow/Keras
  • Tuning: Keras Tuner
  • Data Science: Pandas, NumPy, Scikit-learn
  • Visualization: Matplotlib, Tkinter, Pillow (PIL)
  • UI: Gradio

Results

Based on the tuning process, the model typically achieves >98% accuracy on the test set.