Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/shub-garg/vision-transformer-vit-for-mnist
- Owner: shub-garg
- License: mit
- Created: 2024-05-29T02:20:17.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-05-29T02:24:36.000Z (8 months ago)
- Last Synced: 2024-05-29T15:58:07.973Z (8 months ago)
- Topics: artificial-intelligence, deeplearning, mnist-classification, project, transformers, vision-transformer
- Language: Jupyter Notebook
- Homepage:
- Size: 188 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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:
![]()
### Confusion Matrix:
![]()