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
.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Numpy - Multidimensioanl Mathematical Computing
- Matplotlib - Used to plot Graph
- Pickle - Used to save trained models/object
- MNIST Dataset - Dataset for Digit Recognition
- CIFAR-10 Dataset - Dataset for Object Recognition
Clone the repository
git clone https://github.com/zishansami102/Convolutional-Neural-Network-from-Scratch
Move into the required directory and then run the following command to start training model
python run.py
Output:
To load pre-trained models, change the pickle filename from output.pickle to trained.pickle in run.py: line No. - 27-28
and comment out the training part form the code in run.py: line No. - 77-104
Contributions are welcome of course ;)
- CS231n.stanford.edu - Most of the theorotical concepts are taken from here
- dorajam - Used to gain more concepts
- Advanced Concepts - Still need to be implemented, but helpful to gain insight