All Projects → gary30404 → convolutional-neural-network-from-scratch-python

gary30404 / convolutional-neural-network-from-scratch-python

Licence: other
Handwritten Digit Recognition Using Convolutional Neural Network by Python

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to convolutional-neural-network-from-scratch-python

crohme-data-extractor
A modified extractor for the CROHME handwritten math symbols dataset.
Stars: ✭ 18 (-41.94%)
Mutual labels:  handwritten-digit-recognition
create-material-ui-app
create-react-app + storybook + storybook-addon-material-ui
Stars: ✭ 55 (+77.42%)
Mutual labels:  from-scratch
LeNet-from-Scratch
Implementation of LeNet5 without any auto-differentiate tools or deep learning frameworks. Accuracy of 98.6% is achieved on MNIST dataset.
Stars: ✭ 22 (-29.03%)
Mutual labels:  lenet
evo-NEAT
A java implementation of NEAT(NeuroEvolution of Augmenting Topologies ) from scratch for the generation of evolving artificial neural networks. Only for educational purposes.
Stars: ✭ 34 (+9.68%)
Mutual labels:  from-scratch
Mathematical-Handwriting-recognition
Convert hand written mathematical expressions and formula to Latext using Machine Learning
Stars: ✭ 50 (+61.29%)
Mutual labels:  handwritten-digit-recognition
cheapml
Machine Learning algorithms coded from scratch
Stars: ✭ 17 (-45.16%)
Mutual labels:  from-scratch
cnn open
A hardware implementation of CNN, written by Verilog and synthesized on FPGA
Stars: ✭ 157 (+406.45%)
Mutual labels:  lenet
stutter
Implement a Lisp, in C, from scratch, no libs
Stars: ✭ 65 (+109.68%)
Mutual labels:  from-scratch
Mini-Keras
An advanced and lightweight ML and Deep learning library for python.
Stars: ✭ 19 (-38.71%)
Mutual labels:  from-scratch
Medium-Python-Neural-Network
This code is part of my post on Medium.
Stars: ✭ 58 (+87.1%)
Mutual labels:  from-scratch
handwritten-MNIST-digit-recognition
Real time MNIST digit recognition with OpenCV and Support Vector Machine (SVM) algorithm.
Stars: ✭ 34 (+9.68%)
Mutual labels:  handwritten-digit-recognition
Handwritten-Digits-Classification-Using-KNN-Multiclass Perceptron-SVM
🏆 A Comparative Study on Handwritten Digits Recognition using Classifiers like K-Nearest Neighbours (K-NN), Multiclass Perceptron/Artificial Neural Network (ANN) and Support Vector Machine (SVM) discussing the pros and cons of each algorithm and providing the comparison results in terms of accuracy and efficiecy of each algorithm.
Stars: ✭ 42 (+35.48%)
Mutual labels:  handwritten-digit-recognition

Handwritten Digit Recognition Using Convolutional Neural Network

This repo builds a convolutional neural network based on LENET from scratch to recognize the MNIST Database of handwritten digits.

Getting Started

This example is only based on the python library numpy to implement convolutional layers, maxpooling layers and fully-connected layers, also including backpropagation and gradients descent to train the network and cross entropy to evaluate the loss.

Running the Codes

python main.py

In the main.py, you can modify the learning rate, epoch and batch size to train the CNN from scratch and evaluate the result. Besides, there is a provided pretrained weight file pretrained_weights.pkl.

Loadind data......
Preparing data......
Training Lenet......
=== Epoch: 0/1 === Iter:32 === Loss: 2.33 === BAcc: 0.09 === TAcc: 0.09 === Remain: 2 Hrs 32 Mins 35 Secs ===
=== Epoch: 0/1 === Iter:64 === Loss: 2.32 === BAcc: 0.06 === TAcc: 0.08 === Remain: 2 Hrs 32 Mins 37 Secs ===
=== Epoch: 0/1 === Iter:96 === Loss: 2.29 === BAcc: 0.06 === TAcc: 0.07 === Remain: 2 Hrs 31 Mins 49 Secs ===
=== Epoch: 0/1 === Iter:128 === Loss: 2.28 === BAcc: 0.12 === TAcc: 0.09 === Remain: 2 Hrs 35 Mins 49 Secs ===
=== Epoch: 0/1 === Iter:160 === Loss: 2.34 === BAcc: 0.03 === TAcc: 0.07 === Remain: 2 Hrs 31 Mins 48 Secs ===
=== Epoch: 0/1 === Iter:192 === Loss: 2.33 === BAcc: 0.09 === TAcc: 0.08 === Remain: 2 Hrs 31 Mins 14 Secs ===
=== Epoch: 0/1 === Iter:224 === Loss: 2.29 === BAcc: 0.16 === TAcc: 0.09 === Remain: 2 Hrs 32 Mins 3 Secs ===
=== Epoch: 0/1 === Iter:256 === Loss: 2.30 === BAcc: 0.16 === TAcc: 0.10 === Remain: 2 Hrs 31 Mins 47 Secs ===
=== Epoch: 0/1 === Iter:288 === Loss: 2.32 === BAcc: 0.09 === TAcc: 0.10 === Remain: 2 Hrs 31 Mins 58 Secs ===
...

python app.py

This is the demo to predict handwritten digits based on the python api flask to build a localhost website.

Alt Text

Results

  • learning rate: 0.01
  • batch size: 100
  • training accuracy: 0.94
  • loss

Blog Post

https://medium.com/deep-learning-g/build-lenet-from-scratch-7bd0c67a151e

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].