Giter Club home page Giter Club logo

cnn-from-scratch's Introduction

Convolutional Neural Network from scratch Awesome

Objective of this work was to write the Convolutional Neural Network without using any Deep Learning Library to gain insights of what is actually happening and thus the algorithm is not optimised enough and hence is slow on large dataset like CIFAR-10. This piece of code could be used for learning purpose and could be implemented with trained parameter available in the respective folders for any testing applications like Object Detection and Digit recognition.
It's Accuracy on MNIST test set is above 97%.

alt text

Architecture

INPUT - CONV1 - RELU - CONV2 - RELU- MAXPOOL - FC1 - OUT

alt text

alt text

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

Followings are also required if working/testing on the app.py

  • Flask - A microframework for Python
  • Gunicorn - A Python WSGI HTTP Server for UNIX
  • OpenCV - An open-source library that includes several hundreds of computer vision algorithms

Directories

  • CIFAR-10 : Object detection with CIFAR-10
  • MNIST : Handwritten Digits Recognition with MNIST

Installing

  • Clone the repository
git clone https://github.com/zishansami102/CNN-from-Scratch
  • Downlad the dataset and copy that to it's corresponding folder(CIFAR-10/MNIST).
  • Move into the required directory (/CNN-from-Scratch/MNIST or /CNN-from-Scratch/CIFAR-10) and then run the following command to start training model
python train.py

Output:

alt text

  • To load pre-trained models, change the pickle filename from 'output.pickle' to 'trained.pickle' in run.py: line No. - 30-31 and comment out the training part form the code in run.py: line No. - 42-111

Application Testing/Running

  • In the the directory /CNN-from-Scratch run the following command.
python app.py

App will start running on the local server http://127.0.0.1:5000/ as shown below :

alt text

Contributing

Mail me at [email protected] if you want to contribute in this project
My homepage - zishansami102.github.io

Acknowledgments

cnn-from-scratch's People

Contributors

zishansami102 avatar aashish-ak avatar adityasoni19031997 avatar sanskar107 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.