SlideShare a Scribd company logo
1 of 8
DIGIT RECOGNITION USING MNIST DATABASE
&
CONVOLUTIONAL NEURAL NETWORK
ABSTRACT
For humans, identifying numbers or items in a picture is extremely simple, but how
do you train the machine to recognize these different things in images? Convolutional
Neural Networks (CNN) can solve this problem. In this report, a convolutional neural
network has been trained by identifying pictures in MNIST handwritten digital database
to predict exactly what the numbers in the picture are. Obviously, human beings can
perceive that there is a hierarchy or conceptual structure in the image, but the machine
does not, for example the trained neural network is inconvenient to deal with special
changes in a position of numbers in digital pictures. Exactly put, no matter what the
environment of the image (image background) is, it is unchallenging for human beings to
judge whether there is such a figure in the image and it is unnecessary to repeat the
learning training.
1. INTRODUCTION
In MNIST dataset, the data is already well prepared: the images were centered in a 28x28
image by computing the center of mass of the pixels, and translating the image so as to
position this point at the center of the 28x28 field. The training set is composed of 30,000
patterns from SD-3 and 30,000 patterns from SD-1. And test set was composed of 5,000
patterns from SD-3 and 5,000 patterns from SD-1. Because the dataset is too huge, a
better idea is beginning with an available subset, which could be found on Kaggle
webpage. Although the dataset has been labeled, it’s still my task to design proper
method to preprocessing the data including read binary files with proper programming
language and choose acceptable data structure to avoid overflow. Moreover, a series of
machine learning algorithms were applied to the training set and validated with the test
set, and the models were tuned until the performance and accuracy is relatively
acceptable. Based on my experience on Tensorflow and Keras , I developed this
recognizer with python language. And in order to enhance my engineering skills and
experience on tuning real-world systems instead of toy models, I focused on some details
of the models and implement part of them on my own, but I didn’t reinvent everything.
1.1 THE MNIST DATABASE
The MNIST database of handwritten digits contains 60,000 training examples and 10,000
testing examples, which are 28 * 28 images. All of digits have already been size
normalized and preprocessed and formatted (LeCun et al., 1998). The four files provided
on the website are used in the training and testing for neural networks. In the process of
loading the data set can be directly called from the MNIST database, but due to the
requirements of the assignment, I downloaded these image files from the website that
provides the data set. Because downloading browsers may unzip these image collection
files without your attention, this operation may cause the downloaded files to be larger
than previously mentioned. Thus, if you need to see some problems with the original
image set or data set, you can view the original site of the data set via the link provided
in the reference section of the paper. Due to the use of Python's own data set, simplifying
the section on data preprocessing in the code. The images are all centered in 28 * 28
field.
2. APPROACH
Convolutional neural networks are more complex than standard multi-layer perceptrons,
so we will start by using a simple structure to begin with that uses all of the elements for
state of the art results. Below summarizes the network architecture.
2.1 ConvolutionalNeuralNetworks
Due to the selection of the data set, we decompose the picture into 28*28 blocks of the
same size. According to the original trained neural network, we input a complete picture
into the neural network. But for CNN, the pixel block is directly input this time. The same
neural network weight will be used for every small tile. If any small tile has any
abnormality, we think the tile is interested. In this neural network, there is no order in
which small tiles are disturbed, and the results are still saved in the order of input. Then
we will get a sequence. The part where the picture is stored is interesting. Since the array
is generally large, we will first down sample it to reduce the size of the array. Find the max
value in each grid square in our array. Finally, the column will be inputted into the Fully
Connected Network and the neural network will determine if the picture matches.
2.2 ARCHITECTURE OF CONVOLUTIONAL NEURAL NETWORK
Two layers will be convolution layers the first with 64 channels, a 3 x 3 kernel and Rectifier
Linear Unit (ReLu) function which will feed 64 images into the second layer, while the
second layer will have 32 channels, a 3 x 3 kernel and Rectifier Linear Unit (ReLu)
function and feed 32 images into the third layer. The third layer is the flatten layer to
transform the dimentionality of the image to a 1-Dimension array to connect with the last
layer which contains 10 neurons and the activation function softmax.
3. RESULT
3.1 PERFORMANCE
3.2 TRAIN MODEL
Train the model on the training data set ( X_train and y_train). I will iterate 3 times over
the entire data set to train on, with a number of 32 samples per gradient update for
training. Then store this trained model into the variable hist. I did not specify the number
of samples (batch), by default if the batch isn’t specified, then it is 32.
Batch: Total number of training samples present per gradient update.
Epoch:The number of iterations when an ENTIRE dataset is passed forward and
backward through the neural network only ONCE.
Fit: Another word for train
3.3 TEST MODEL
The model returns only probabilities. So let’s show the probabilities of the first 4 images
in the test set. The probabilities are pretty hard to read. To understand them you must
count find the highest number in the set and then count the index that the number is to
figure out what the label is which is the index number. For example in the image above for
the 3rd image, the highest probability is 9.98755455e-01which means 99.8755% and that
number is located at index 1, so the label is 1. So let’s print the predictions as labels for
the first 4 imagesinstead of probabilitieslike above, and let’s print the actual values / labels
of each image to see how they match up.
4. CONCLUSION& FUTURE SCOPE
The digits patterns used in this training are all black and white images, so this model
may be difficult to deal with common color patterns. The training set of color images
may lead to an increase in the degree of ambiguity in the image, which in turn affects
the accuracy of the prediction. Moreover, in this paper, I only studied the pictures in the
MNIST data set. In actual problems, the specification and definition of the pictures are
undoubtedly important factors affecting the accuracy of the model. Therefore, how to
preprocess is very important, but in order to simplify the research process, I omitted this
step. And in real life, most of the pictures we touch are very complicated and colorful.
Pictures are often background. The digits that you want to train and learn may only
occupy a small part of the complete picture. How to deal with the size of these pictures
and find out which part of the model you want to identify is also a problem. In addition,
the standard item pattern is difficult to be standardized. In the paper we only discuss
simple numbers, but if we need to identify images of some animals, we need to consider
a three-dimensional object from different angles. The difference between the flat images
shown. In the future research, the neural network model also needs to be considered in
combination with actual conditions. We can further study to improve the accuracy of
CNN by improving the issues I mentioned above.

More Related Content

What's hot

MobileNet - PR044
MobileNet - PR044MobileNet - PR044
MobileNet - PR044Jinwon Lee
 
Image Classification using deep learning
Image Classification using deep learning Image Classification using deep learning
Image Classification using deep learning Asma-AH
 
Convolutional Neural Network Models - Deep Learning
Convolutional Neural Network Models - Deep LearningConvolutional Neural Network Models - Deep Learning
Convolutional Neural Network Models - Deep LearningMohamed Loey
 
Artificial Neural Network(Artificial intelligence)
Artificial Neural Network(Artificial intelligence)Artificial Neural Network(Artificial intelligence)
Artificial Neural Network(Artificial intelligence)spartacus131211
 
Handwritten Digit Recognition(Convolutional Neural Network) PPT
Handwritten Digit Recognition(Convolutional Neural Network) PPTHandwritten Digit Recognition(Convolutional Neural Network) PPT
Handwritten Digit Recognition(Convolutional Neural Network) PPTRishabhTyagi48
 
Convolution Neural Network (CNN)
Convolution Neural Network (CNN)Convolution Neural Network (CNN)
Convolution Neural Network (CNN)Basit Rafiq
 
HANDWRITTEN DIGIT RECOGNITION USING k-NN CLASSIFIER
HANDWRITTEN DIGIT RECOGNITION USING k-NN CLASSIFIERHANDWRITTEN DIGIT RECOGNITION USING k-NN CLASSIFIER
HANDWRITTEN DIGIT RECOGNITION USING k-NN CLASSIFIERvineet raj
 
An introduction to Deep Learning
An introduction to Deep LearningAn introduction to Deep Learning
An introduction to Deep LearningJulien SIMON
 
Introduction to Convolutional Neural Networks
Introduction to Convolutional Neural NetworksIntroduction to Convolutional Neural Networks
Introduction to Convolutional Neural NetworksHannes Hapke
 
Handwritten Digit Recognition and performance of various modelsation[autosaved]
Handwritten Digit Recognition and performance of various modelsation[autosaved]Handwritten Digit Recognition and performance of various modelsation[autosaved]
Handwritten Digit Recognition and performance of various modelsation[autosaved]SubhradeepMaji
 
Convolutional neural network
Convolutional neural networkConvolutional neural network
Convolutional neural networkMojammilHusain
 
Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)Gaurav Mittal
 
Batch normalization presentation
Batch normalization presentationBatch normalization presentation
Batch normalization presentationOwin Will
 
Introduction to CNN
Introduction to CNNIntroduction to CNN
Introduction to CNNShuai Zhang
 
Image classification using CNN
Image classification using CNNImage classification using CNN
Image classification using CNNNoura Hussein
 
Deep Learning - CNN and RNN
Deep Learning - CNN and RNNDeep Learning - CNN and RNN
Deep Learning - CNN and RNNAshray Bhandare
 
Convolutional Neural Network and Its Applications
Convolutional Neural Network and Its ApplicationsConvolutional Neural Network and Its Applications
Convolutional Neural Network and Its ApplicationsKasun Chinthaka Piyarathna
 
Transformer in Vision
Transformer in VisionTransformer in Vision
Transformer in VisionSangmin Woo
 

What's hot (20)

MobileNet - PR044
MobileNet - PR044MobileNet - PR044
MobileNet - PR044
 
Image Classification using deep learning
Image Classification using deep learning Image Classification using deep learning
Image Classification using deep learning
 
Convolutional Neural Network Models - Deep Learning
Convolutional Neural Network Models - Deep LearningConvolutional Neural Network Models - Deep Learning
Convolutional Neural Network Models - Deep Learning
 
Artificial Neural Network(Artificial intelligence)
Artificial Neural Network(Artificial intelligence)Artificial Neural Network(Artificial intelligence)
Artificial Neural Network(Artificial intelligence)
 
Handwritten Digit Recognition(Convolutional Neural Network) PPT
Handwritten Digit Recognition(Convolutional Neural Network) PPTHandwritten Digit Recognition(Convolutional Neural Network) PPT
Handwritten Digit Recognition(Convolutional Neural Network) PPT
 
EfficientNet
EfficientNetEfficientNet
EfficientNet
 
Convolution Neural Network (CNN)
Convolution Neural Network (CNN)Convolution Neural Network (CNN)
Convolution Neural Network (CNN)
 
HANDWRITTEN DIGIT RECOGNITION USING k-NN CLASSIFIER
HANDWRITTEN DIGIT RECOGNITION USING k-NN CLASSIFIERHANDWRITTEN DIGIT RECOGNITION USING k-NN CLASSIFIER
HANDWRITTEN DIGIT RECOGNITION USING k-NN CLASSIFIER
 
An introduction to Deep Learning
An introduction to Deep LearningAn introduction to Deep Learning
An introduction to Deep Learning
 
Introduction to Convolutional Neural Networks
Introduction to Convolutional Neural NetworksIntroduction to Convolutional Neural Networks
Introduction to Convolutional Neural Networks
 
Deep learning ppt
Deep learning pptDeep learning ppt
Deep learning ppt
 
Handwritten Digit Recognition and performance of various modelsation[autosaved]
Handwritten Digit Recognition and performance of various modelsation[autosaved]Handwritten Digit Recognition and performance of various modelsation[autosaved]
Handwritten Digit Recognition and performance of various modelsation[autosaved]
 
Convolutional neural network
Convolutional neural networkConvolutional neural network
Convolutional neural network
 
Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)Convolutional Neural Networks (CNN)
Convolutional Neural Networks (CNN)
 
Batch normalization presentation
Batch normalization presentationBatch normalization presentation
Batch normalization presentation
 
Introduction to CNN
Introduction to CNNIntroduction to CNN
Introduction to CNN
 
Image classification using CNN
Image classification using CNNImage classification using CNN
Image classification using CNN
 
Deep Learning - CNN and RNN
Deep Learning - CNN and RNNDeep Learning - CNN and RNN
Deep Learning - CNN and RNN
 
Convolutional Neural Network and Its Applications
Convolutional Neural Network and Its ApplicationsConvolutional Neural Network and Its Applications
Convolutional Neural Network and Its Applications
 
Transformer in Vision
Transformer in VisionTransformer in Vision
Transformer in Vision
 

Similar to Digit recognition using mnist database

Hand Written Digit Classification
Hand Written Digit ClassificationHand Written Digit Classification
Hand Written Digit Classificationijtsrd
 
Targeted Visual Content Recognition Using Multi-Layer Perceptron Neural Network
Targeted Visual Content Recognition Using Multi-Layer Perceptron Neural NetworkTargeted Visual Content Recognition Using Multi-Layer Perceptron Neural Network
Targeted Visual Content Recognition Using Multi-Layer Perceptron Neural Networkijceronline
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)IJERD Editor
 
Designing a neural network architecture for image recognition
Designing a neural network architecture for image recognitionDesigning a neural network architecture for image recognition
Designing a neural network architecture for image recognitionShandukaniVhulondo
 
[Revised] Intro to CNN
[Revised] Intro to CNN[Revised] Intro to CNN
[Revised] Intro to CNNVincent Tatan
 
Ultrasound Nerve Segmentation
Ultrasound Nerve Segmentation Ultrasound Nerve Segmentation
Ultrasound Nerve Segmentation Sneha Ravikumar
 
Automatic Attendace using convolutional neural network Face Recognition
Automatic Attendace using convolutional neural network Face RecognitionAutomatic Attendace using convolutional neural network Face Recognition
Automatic Attendace using convolutional neural network Face Recognitionvatsal199567
 
Facial expression recognition
Facial expression recognitionFacial expression recognition
Facial expression recognitionElyesMiri
 
A UTILIZATION OF CONVOLUTIONAL MATRIX METHODS ON SLICED HIPPOCAMPAL NEURON RE...
A UTILIZATION OF CONVOLUTIONAL MATRIX METHODS ON SLICED HIPPOCAMPAL NEURON RE...A UTILIZATION OF CONVOLUTIONAL MATRIX METHODS ON SLICED HIPPOCAMPAL NEURON RE...
A UTILIZATION OF CONVOLUTIONAL MATRIX METHODS ON SLICED HIPPOCAMPAL NEURON RE...ijscai
 
A UTILIZATION OF CONVOLUTIONAL MATRIX METHODS ON SLICED HIPPOCAMPAL NEURON RE...
A UTILIZATION OF CONVOLUTIONAL MATRIX METHODS ON SLICED HIPPOCAMPAL NEURON RE...A UTILIZATION OF CONVOLUTIONAL MATRIX METHODS ON SLICED HIPPOCAMPAL NEURON RE...
A UTILIZATION OF CONVOLUTIONAL MATRIX METHODS ON SLICED HIPPOCAMPAL NEURON RE...ijscai
 
A UTILIZATION OF CONVOLUTIONAL MATRIX METHODS ON SLICED HIPPOCAMPAL NEURON RE...
A UTILIZATION OF CONVOLUTIONAL MATRIX METHODS ON SLICED HIPPOCAMPAL NEURON RE...A UTILIZATION OF CONVOLUTIONAL MATRIX METHODS ON SLICED HIPPOCAMPAL NEURON RE...
A UTILIZATION OF CONVOLUTIONAL MATRIX METHODS ON SLICED HIPPOCAMPAL NEURON RE...ijscai
 
Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...
Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...
Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...Ahmed Gad
 
Evolving Comprehensible Neural Network Trees
Evolving Comprehensible Neural Network TreesEvolving Comprehensible Neural Network Trees
Evolving Comprehensible Neural Network TreesAmr Kamel Deklel
 

Similar to Digit recognition using mnist database (20)

Hand Written Digit Classification
Hand Written Digit ClassificationHand Written Digit Classification
Hand Written Digit Classification
 
Targeted Visual Content Recognition Using Multi-Layer Perceptron Neural Network
Targeted Visual Content Recognition Using Multi-Layer Perceptron Neural NetworkTargeted Visual Content Recognition Using Multi-Layer Perceptron Neural Network
Targeted Visual Content Recognition Using Multi-Layer Perceptron Neural Network
 
Dssg talk CNN intro
Dssg talk CNN introDssg talk CNN intro
Dssg talk CNN intro
 
Pca analysis
Pca analysisPca analysis
Pca analysis
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
 
One shot learning
One shot learningOne shot learning
One shot learning
 
Designing a neural network architecture for image recognition
Designing a neural network architecture for image recognitionDesigning a neural network architecture for image recognition
Designing a neural network architecture for image recognition
 
[Revised] Intro to CNN
[Revised] Intro to CNN[Revised] Intro to CNN
[Revised] Intro to CNN
 
Real-Time Face Tracking with GPU Acceleration
Real-Time Face Tracking with GPU AccelerationReal-Time Face Tracking with GPU Acceleration
Real-Time Face Tracking with GPU Acceleration
 
CUDA Accelerated Face Recognition
CUDA Accelerated Face RecognitionCUDA Accelerated Face Recognition
CUDA Accelerated Face Recognition
 
Ultrasound Nerve Segmentation
Ultrasound Nerve Segmentation Ultrasound Nerve Segmentation
Ultrasound Nerve Segmentation
 
Automatic Attendace using convolutional neural network Face Recognition
Automatic Attendace using convolutional neural network Face RecognitionAutomatic Attendace using convolutional neural network Face Recognition
Automatic Attendace using convolutional neural network Face Recognition
 
Image captioning
Image captioningImage captioning
Image captioning
 
Facial expression recognition
Facial expression recognitionFacial expression recognition
Facial expression recognition
 
A UTILIZATION OF CONVOLUTIONAL MATRIX METHODS ON SLICED HIPPOCAMPAL NEURON RE...
A UTILIZATION OF CONVOLUTIONAL MATRIX METHODS ON SLICED HIPPOCAMPAL NEURON RE...A UTILIZATION OF CONVOLUTIONAL MATRIX METHODS ON SLICED HIPPOCAMPAL NEURON RE...
A UTILIZATION OF CONVOLUTIONAL MATRIX METHODS ON SLICED HIPPOCAMPAL NEURON RE...
 
A UTILIZATION OF CONVOLUTIONAL MATRIX METHODS ON SLICED HIPPOCAMPAL NEURON RE...
A UTILIZATION OF CONVOLUTIONAL MATRIX METHODS ON SLICED HIPPOCAMPAL NEURON RE...A UTILIZATION OF CONVOLUTIONAL MATRIX METHODS ON SLICED HIPPOCAMPAL NEURON RE...
A UTILIZATION OF CONVOLUTIONAL MATRIX METHODS ON SLICED HIPPOCAMPAL NEURON RE...
 
A UTILIZATION OF CONVOLUTIONAL MATRIX METHODS ON SLICED HIPPOCAMPAL NEURON RE...
A UTILIZATION OF CONVOLUTIONAL MATRIX METHODS ON SLICED HIPPOCAMPAL NEURON RE...A UTILIZATION OF CONVOLUTIONAL MATRIX METHODS ON SLICED HIPPOCAMPAL NEURON RE...
A UTILIZATION OF CONVOLUTIONAL MATRIX METHODS ON SLICED HIPPOCAMPAL NEURON RE...
 
Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...
Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...
Derivation of Convolutional Neural Network (ConvNet) from Fully Connected Net...
 
Evolving Comprehensible Neural Network Trees
Evolving Comprehensible Neural Network TreesEvolving Comprehensible Neural Network Trees
Evolving Comprehensible Neural Network Trees
 
Deep learning-practical
Deep learning-practicalDeep learning-practical
Deep learning-practical
 

Recently uploaded

INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture designssuser87fa0c1
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Effects of rheological properties on mixing
Effects of rheological properties on mixingEffects of rheological properties on mixing
Effects of rheological properties on mixingviprabot1
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage examplePragyanshuParadkar1
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 

Recently uploaded (20)

INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture design
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Effects of rheological properties on mixing
Effects of rheological properties on mixingEffects of rheological properties on mixing
Effects of rheological properties on mixing
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage example
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 

Digit recognition using mnist database

  • 1. DIGIT RECOGNITION USING MNIST DATABASE & CONVOLUTIONAL NEURAL NETWORK
  • 2. ABSTRACT For humans, identifying numbers or items in a picture is extremely simple, but how do you train the machine to recognize these different things in images? Convolutional Neural Networks (CNN) can solve this problem. In this report, a convolutional neural network has been trained by identifying pictures in MNIST handwritten digital database to predict exactly what the numbers in the picture are. Obviously, human beings can perceive that there is a hierarchy or conceptual structure in the image, but the machine does not, for example the trained neural network is inconvenient to deal with special changes in a position of numbers in digital pictures. Exactly put, no matter what the environment of the image (image background) is, it is unchallenging for human beings to judge whether there is such a figure in the image and it is unnecessary to repeat the learning training.
  • 3. 1. INTRODUCTION In MNIST dataset, the data is already well prepared: the images were centered in a 28x28 image by computing the center of mass of the pixels, and translating the image so as to position this point at the center of the 28x28 field. The training set is composed of 30,000 patterns from SD-3 and 30,000 patterns from SD-1. And test set was composed of 5,000 patterns from SD-3 and 5,000 patterns from SD-1. Because the dataset is too huge, a better idea is beginning with an available subset, which could be found on Kaggle webpage. Although the dataset has been labeled, it’s still my task to design proper method to preprocessing the data including read binary files with proper programming language and choose acceptable data structure to avoid overflow. Moreover, a series of machine learning algorithms were applied to the training set and validated with the test set, and the models were tuned until the performance and accuracy is relatively acceptable. Based on my experience on Tensorflow and Keras , I developed this recognizer with python language. And in order to enhance my engineering skills and experience on tuning real-world systems instead of toy models, I focused on some details of the models and implement part of them on my own, but I didn’t reinvent everything. 1.1 THE MNIST DATABASE The MNIST database of handwritten digits contains 60,000 training examples and 10,000 testing examples, which are 28 * 28 images. All of digits have already been size normalized and preprocessed and formatted (LeCun et al., 1998). The four files provided on the website are used in the training and testing for neural networks. In the process of loading the data set can be directly called from the MNIST database, but due to the requirements of the assignment, I downloaded these image files from the website that provides the data set. Because downloading browsers may unzip these image collection files without your attention, this operation may cause the downloaded files to be larger than previously mentioned. Thus, if you need to see some problems with the original image set or data set, you can view the original site of the data set via the link provided in the reference section of the paper. Due to the use of Python's own data set, simplifying the section on data preprocessing in the code. The images are all centered in 28 * 28 field.
  • 4. 2. APPROACH Convolutional neural networks are more complex than standard multi-layer perceptrons, so we will start by using a simple structure to begin with that uses all of the elements for state of the art results. Below summarizes the network architecture. 2.1 ConvolutionalNeuralNetworks Due to the selection of the data set, we decompose the picture into 28*28 blocks of the same size. According to the original trained neural network, we input a complete picture into the neural network. But for CNN, the pixel block is directly input this time. The same neural network weight will be used for every small tile. If any small tile has any abnormality, we think the tile is interested. In this neural network, there is no order in which small tiles are disturbed, and the results are still saved in the order of input. Then we will get a sequence. The part where the picture is stored is interesting. Since the array is generally large, we will first down sample it to reduce the size of the array. Find the max value in each grid square in our array. Finally, the column will be inputted into the Fully Connected Network and the neural network will determine if the picture matches.
  • 5. 2.2 ARCHITECTURE OF CONVOLUTIONAL NEURAL NETWORK Two layers will be convolution layers the first with 64 channels, a 3 x 3 kernel and Rectifier Linear Unit (ReLu) function which will feed 64 images into the second layer, while the second layer will have 32 channels, a 3 x 3 kernel and Rectifier Linear Unit (ReLu) function and feed 32 images into the third layer. The third layer is the flatten layer to transform the dimentionality of the image to a 1-Dimension array to connect with the last layer which contains 10 neurons and the activation function softmax.
  • 6. 3. RESULT 3.1 PERFORMANCE 3.2 TRAIN MODEL Train the model on the training data set ( X_train and y_train). I will iterate 3 times over the entire data set to train on, with a number of 32 samples per gradient update for training. Then store this trained model into the variable hist. I did not specify the number of samples (batch), by default if the batch isn’t specified, then it is 32. Batch: Total number of training samples present per gradient update. Epoch:The number of iterations when an ENTIRE dataset is passed forward and backward through the neural network only ONCE. Fit: Another word for train
  • 7. 3.3 TEST MODEL The model returns only probabilities. So let’s show the probabilities of the first 4 images in the test set. The probabilities are pretty hard to read. To understand them you must count find the highest number in the set and then count the index that the number is to figure out what the label is which is the index number. For example in the image above for the 3rd image, the highest probability is 9.98755455e-01which means 99.8755% and that number is located at index 1, so the label is 1. So let’s print the predictions as labels for the first 4 imagesinstead of probabilitieslike above, and let’s print the actual values / labels of each image to see how they match up.
  • 8. 4. CONCLUSION& FUTURE SCOPE The digits patterns used in this training are all black and white images, so this model may be difficult to deal with common color patterns. The training set of color images may lead to an increase in the degree of ambiguity in the image, which in turn affects the accuracy of the prediction. Moreover, in this paper, I only studied the pictures in the MNIST data set. In actual problems, the specification and definition of the pictures are undoubtedly important factors affecting the accuracy of the model. Therefore, how to preprocess is very important, but in order to simplify the research process, I omitted this step. And in real life, most of the pictures we touch are very complicated and colorful. Pictures are often background. The digits that you want to train and learn may only occupy a small part of the complete picture. How to deal with the size of these pictures and find out which part of the model you want to identify is also a problem. In addition, the standard item pattern is difficult to be standardized. In the paper we only discuss simple numbers, but if we need to identify images of some animals, we need to consider a three-dimensional object from different angles. The difference between the flat images shown. In the future research, the neural network model also needs to be considered in combination with actual conditions. We can further study to improve the accuracy of CNN by improving the issues I mentioned above.