Skip to content

Alessio1599/LeNet-5-MNIST-Classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MNIST classification using LeNet5 model

Build Status Version License

This repository showcases a deep learning project implementing the LeNet-5 architecture [1]. The project utilizes the MNIST dataset to demonstrate LeNet-5's effectiveness in image classification.

Table of Contents

Running the Project

  1. Clone the repository:
    git clone https//github.com/Alessio1599/LeNet-5-MNIST-Classification.git
    cd LeNet-5-MNIST-Classification
  2. Install required packages:
    pip install -r requirements.txt
  3. Run the main script:
    cd code
    python main.py
    Example of the use of flags
    python main_wandb.py --epochs=10 --batch_size=250

Directory structure

LeNet-5-MNIST-Classification/
├── LICENSE
├── LeNet5-MNIST.ipynb
├── README.md
├── code
│   ├── main.py
│   ├── main_wandb.py
│   └── util.py
└── requirements.txt

Dataset

The project uses the MNIST dataset, which is automatically downloaded when running the scripts or notebooks.

LeNet-5 Model

The model is built using the LeNet-5 architecture, which consists of:

  • Convolutional layers
  • Average pooling layers
  • Fully connected layers

Utilities

The utility functions help in visualizing the training process and evaluating the model performance:

  • plot_history(history, metric): Plots the training and validation loss and metrics.
  • show_confusion_matrix(conf_matrix, class_names): Displays the confusion matrix with class labels.
  • Image_inspection(data): Displays 10 random images from the dataset.

References

[1] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. "Gradient-based learning applied to document recognition." Proceedings of the IEEE, 86(11):2278-2324, November 1998

About

MNIST image classification using LeNet-5

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published