Skip to content

dosaaly/cnn-base

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

This is a final submission for final project

This project trains a simple CNN model on the Kuzushiji-MNIST dataset(all links below)

  1. It takes as input KMNIST image(28x28p grayscale) and classifies it in 10 classes. It does so by breaking down each image into features(edges-strokes-shapes) then makes images smaller and converts it into a vector for linear layers to decide which class it belongs to.
  2. Loads a dataset, then normalizes and batches data. Builds cnn from module.py, and for each epoch loads data into a model. Computes predictions, loss; backpropagate gradients, updates weights, prints progress, saves the trained model.
  3. Evaluation script loads the trained model and a dataset. Runs the model to get prediction And computes: accuracy, macro F1, confusion matrix, classification report. Saves results to: output/results.json output/confusion_matrix.png Prints the results

Ideally, this all should run perfectly within this platform(Google Colab), it would install all needed things on its own, and it shouldn't take much time.

Changes: created new file called func.py that contains the duplicate functions updated the parameters, made it smaller, prevented overfitting created constant for data set called DATA_ROOT

References https://www.kaggle.com/code/gpreda/classifying-cursive-hiragana-kmnist-using-cnn https://www.kaggle.com/datasets/anokas/kuzushiji https://github.com/rois-codh/kmnist

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors