Skip to content

An ML / MLOps classification project on MNIST - Database of Handwritten Digits implemented using CNN with the help of PyTorch and DVC libraries.

Notifications You must be signed in to change notification settings

swarajpande5/Digit-Classification

Repository files navigation

Digit Classification

An ML / MLOps classification project on MNIST - Database of Handwritten Digits implemented using convolutional neural network (ConvNet / CNN) with the help of PyTorch and DVC libraries.

DAGsHub Link (for experimentation and pipelining): Click Here!


To build from source

  1. Install Git and DVC.

  2. Clone the repository.

    git clone https://github.com/swarajpande4/Digit-Classification.git
    
    cd Digit-Classification/
    
  3. Set up virtual environment for python.

    pip install virtualenv
    
    virtualenv venv/
    
    source venv/bin/activate
    
    pip install -r requirements.txt
    
  4. Run the following command to execute the pipeline after making changes to the code/ scripts.

    dvc repro
    
  5. Deactivate the virtual environment.

    deactivate
    

Files and Directory Structure

.
├── .github/workflows
    └── cml.yaml                    // CML workflow for GitHub Actions
├── code
    ├── eval.py                     // Evaluation metrics script
    ├── featurization.py            // Featurization script
    ├── get_data.py                 // Fetches the datasets for CML container (GitHub Actions Job)
    ├── model_class.py              // Model Class script
    └── train_model.py              // Trains the model instance
├── data
    ├── model.pkl                   (DVC)
    ├── norms_params.json           (DVC)
    ├── processed_test_data.npy     (DVC)
    ├── processed_train_data.npy    (DVC)
    ├── test_data.csv               (DVC)
    ├── train_data.csv              (DVC)
    ├── train_data.csv.dvc
    └── test_data.csv.dvc        
├── metrics 
    ├── confmat.png                 // Confusion matrix displayed by GitHub Actions
    ├── eval.json                   // Evaluation metrics for pipeline 
    ├── metrics.txt                 // Evaluation metrics displayed by Github Actions                       
    └── train_metric.json           
├── notebook
    └── notebook.ipynb              // Jupyter Notebook 
├── dvc.lock
├── dvc.yaml
├── requirements.txt
└── README.md

About

An ML / MLOps classification project on MNIST - Database of Handwritten Digits implemented using CNN with the help of PyTorch and DVC libraries.

Topics

Resources

Stars

Watchers

Forks