Sunteți pe pagina 1din 25

HANDWRITTEN CHARACTER RECOGNITION USING

NEURAL NETWORKS: A PERFOMANCE-BASED ANALYSIS


MAJOR PROJECT
8TH SEMESTER

UE145009 AMBUJ CHATURVEDI

UE145010 AMEY PURSHAN

UE145012 ANIRUDH CHHABRA

UE145020 ANUBHA GUPTA


Purpose of this project

 First is to recognize handwritten numeric characters, to process


them as images, and then train the neural network algorithm to
recognize such characters and convert them into digital format.
 We also do an analysis on the best activation function in the
neuron applicable for such an application.
 Also we find out what is the best number of neurons required in
the hidden layer by basically trying out one by one and plotting
respective Regression Plots to judge their performance.
So what are neural networks?

The goal of the ANN approach is


to solve problems in the same
way that a human brain would.
A neural network usually involves a large
number of processors operating in parallel
and arranged in tiers. The first tier receives
the raw input information -- analogous to
optic nerves in human visual processing.
Each successive tier receives the output
from the tier preceding it, rather than from
the raw input -- in the same way neurons
further from the optic nerve receive signals
from those closer to it. The last tier produces
the output of the system.
WHAT KIND OF NEURAL
NETWORK DO WE WANT?

Let’s look at the process flow to list our requirements.


Process Flow

POST
PRE CLASSIFICATION PROCESSING
IMAGE FEATURE
SEGMENTATION AND
ACQUISITION PROCESSING EXTRACTION AND
RECOGNITION
ANALYSIS
Pre processing

Convert
Gray scale to Sobel Filter
Image to
binary For dilation of edges
Gray-Scale
Segmentation

In image processing, normalization


is a process that changes the
range of pixel intensity values.

We form the image


matrix, dividing the
image into sub-images.
The Image and Zone Matrices

We divide the image into


n X n pixels. This defines
the number of neurons in
the hidden layer.

We do an analysis to find
the number of neurons
for which we obtain
highest performance and
speed.
Segmentation

Skeletonization Universe of Discourse


Features

EulerNumber
Regional Area -or- Extent
Eccentricity
Euler Number

Command:

eunumber=bweuler(my_img);

This expression stores the euler


number of the image my_img in
the variable eunumber.
Regional Features

Command:

stats = regionprops(L,properties)

This measures a set of properties


for each labeled region in the
label matrix L. Positive integer
elements of L correspond to
different regions.
Regional Properties

 Eccentricity
The eccentricity is the ratio of the
distance between the foci of the
ellipse and its major axis length.
 Extent
The proportion of the pixels in
the bounding box that are also in
the region.
 Orientation
The angle (in degrees) between the Extent is computed as the area
x-axis and the major axis of the divided by area of the bounding
ellipse that has the same second- box.
moments as the region.
Classification

ARTIFICIAL NEURAL NETWORKS

So we basically use Feed-forward


Neural Networks using Back
Propogation Algorithm to update
its weights.

The learning rule applied is the


Perceptron Learning
Rule(Multilayer Perceptrons).
Back Propogation Learning Algorithm
Convolutional Neural Networks
Activation Function
Recognition

Training the artificial neural network


Validation & Testing of the neural network
Saving the digitized output in a text file
Performance Analysis
Training of the ANN

The neural network is


trained using the data
set available from
MNIST.

The Neural Network


Toolbox is used to
create the neural
network.
MNIST Database

The MNIST database of handwritten digits


has a training set of 60,000 examples, and
a test set of 10,000 examples. It is a subset
of a larger set available from NIST. The
digits have been size-normalized and
centered in a fixed-size image.
Validation and Testing

We plot the regression curves


for testing the performance of
the network.

The regression plot shows the


relationship between the outputs of
the network and the targets. If the
training were perfect, the network
outputs and the targets would be
exactly equal, but the relationship
is rarely perfect in practice.
Saving the output

save <file path> net;

The above command is used to save the digitized recognized output to the
text file specified by the path <file path>.
This path also contains the file name.

For eg.:
save d:\project\net net;
Tools in Use

 Image Processing Toolbox


Image Processing Toolbox™ provides a comprehensive set of
reference-standard algorithms and workflow apps for image
processing, analysis, visualization, and algorithm development.
You can perform image segmentation, image enhancement,
noise reduction, geometric transformations, image registration,
and 3D image processing.
 Neural Network Toolbox
Neural Network Toolbox™ provides algorithms, pre-trained
models, and apps to create, train, visualize, and simulate both
shallow and deep neural networks. You can perform classification,
regression, clustering, dimensionality reduction, time-series
forecasting, and dynamic system modeling and control.
Performance

perf = mse(net,t,y,ew) net Neural network


t Matrix or cell array of targets
mse is a network performance function. It
y Matrix or cell array of outputs
measures the network’s performance
according to the mean of squared errors. ew Error weights (optional)

perf = mse(net,t,y,ew) takes these


arguments:

and returns the mean squared error.


THANK YOU

S-ar putea să vă placă și