Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/shub-garg/vision-transformer-vit-for-mnist

This repository implements a Vision Transformer (ViT) to classify handwritten digits from the MNIST dataset. The project includes model definition, training scripts, and visualization of results, including correct/incorrect predictions and a confusion matrix.
https://github.com/shub-garg/vision-transformer-vit-for-mnist

artificial-intelligence deeplearning mnist-classification project transformers vision-transformer

Last synced: about 7 hours ago
JSON representation

This repository implements a Vision Transformer (ViT) to classify handwritten digits from the MNIST dataset. The project includes model definition, training scripts, and visualization of results, including correct/incorrect predictions and a confusion matrix.

Awesome Lists containing this project

README

        

# Vision Transformer for MNIST

This repository contains an implementation of a Vision Transformer (ViT) for the MNIST dataset. The project demonstrates the ability to classify handwritten digits using a Transformer-based architecture.

## Features
- **Dataset**: Utilizes the MNIST dataset with 70,000 grayscale images of handwritten digits (60,000 for training and 10,000 for testing).
- **Model Architecture**: Implements a Vision Transformer with customizable parameters such as image size, patch size, number of classes, and more.
- **Training**: Includes training scripts with detailed loss tracking and evaluation metrics.
- **Visualization**: Provides visualizations of correct and incorrect predictions, as well as a confusion matrix for performance analysis.

## Setup and Usage

### Clone the Repository
```bash
git clone https://github.com/yourusername/ViT_MNIST.git
cd ViT_MNIST
```

### Launch Jupyter Notebook

```bash
jupyter notebook Vision_Transformer_for_MNIST.ipynb
```

### Run All Cells
Execute all cells in the notebook to preprocess data, define models, and start the training process.

## Example Plots
### Correct and Incorrect Predictions:


Correct and Incorrect Predictions

### Confusion Matrix:


Confusion Matrix