Code Monkey home page Code Monkey logo

digit-recognizer's Introduction

Digit-recognizer

Developed a Digit Recognizer using a Convolutional Neural Network (CNN) model. This project aims to accurately classify digits from the dataset, a standard benchmark dataset in the field of machine learning.

Model Flow:

Data Collection and Preprocessing:

  • Acquired the dataset from Kaggle, which consists of 28x28 grayscale images of handwritten digits (0-9).
  • Preprocessed the data by normalizing pixel values to a range between 0 and 1, label encoding and changing and reshaping images to the appropriate input shape for the CNN model.

Model Architecture Design:

  • Designed a CNN architecture suitable for image classification tasks like digit recognition.
  • Typically, the architecture includes convolutional layers, pooling layers, and fully connected layers.

Model Training:

  • Split the dataset into training, validation, and test sets.
  • Trained the CNN model on the training data using an appropriate optimization algorithm like Adam.
  • Used categorical_crossentropy as loss function.
  • Monitor the model's performance on the validation set to prevent overfitting.
  • Added Augumentation and dropout to prevent overfitting.

Model Evaluation:

  • Evaluated the trained model on the test set to assess its generalization performance.
  • Used metrics accuracy to quantify performance.
  • Visualized training accuracy and validation accuracy, similarly training loss with validation loss

Model Testing:

  • For testing purpose, added sample handwritten digits created by me to test.
  • Model was able to detect 2 out of 5 images properly.

Things learnt!

  • Basic working of deep learning and CNN basic model
  • Normalization ensures that pixel values are within a consistent range, typically between 0 and 1 or -1 and 1.
  • Images are typically represented as 2D arrays (height x width x channels). CNNs expect a specific input shape. --> Purpose of reshaping
  • CNNs require numerical labels for training.Loss functions (e.g., cross-entropy) compare predicted class probabilities with true labels. --> Purpose of label encoding

References

https://www.kaggle.com/code/kanncaa1/convolutional-neural-network-cnn-tutorial/notebook

digit-recognizer's People

Contributors

kavya2099 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.