You are on page 1of 15

CHAPTER CHAPTER NAME PG.

NO
ABSTRACT 06
LITERATURE REVIEW 07
INTRODUCTION 08

1. CO-LABORATORY
1.1 COLAB SOFTWARE DETAILS 09
1.2 PROJECTS 10

2. METHODOLOGY
2.1 TENSOR FLOW 11

2.2 MATPLOTLIB
2.3 RELU 12
2.4 ARGMAX
2.5 SOFTMAX 13

2.6 MNIST DATA SET


BLOCK DIAGRAM 14
SOFTWARE PROGRAM 15
OUTPUT ACCURACY 17
CONCLUSION 18
REFERENCES 19
ABSTRACT
Handwritten character recognition is one of the practically important issues in
pattern recognition applications. The applications of digit recognition includes
in postal mail sorting, bank check processing, form data entry, etc. The heart of
the problem lies within the ability to develop an efficient algorithm that can
recognize hand written digits and which is submitted by users by the way of a
scanner, tablet, and other digital devices. This paper presents an approach to
off-line handwritten digit recognition based on different machine learning
Technique .

The problem of handwritten digit recognition has long been an open


problem in the field of pattern classification. A ton of studies have shown that
Neural networks, machine learning have great and efficient performance. In
data classification Deep learning and Neural Network algorithms are a branch of
Machine learning that can automatically identify patterns in the data, and then
use the uncovered patterns to predict future data, or to perform other
alternative kinds of decision making under unreliability Deep Learning
algorithms are used to model high level abstractions in data. Digit Recognition
is a combination of Deep Learning and Neural Network algorithms, which uses
TensorFlow tool as an interface to develop a model.

This paper describes the recognition of handwritten scanned digits where


the input is given by the user and displays the output as digital numbers referring
as the input provided accordingly by using Machine Learning methods with
the help of TensorFlow, MNIST Database, python thus the image may be sensed
by the system as the user provides bare handed input to it and then the system
shows the respective recognition accordingly.
LITERATURE REVIEW

An early notable attempt in the area of character recognition research is by


Grimsdale in 1959. The origin of a great deal of research work in the early sixties
was based on an approach known as analysis-by-synthesis method suggested by
Eden in 1968. The great importance of Eden's work was that he formally proved
that all handwritten characters are formed by a finite number of schematic
features, a point that was implicitly included in previous works. This notion was
later used in all methods in syntactic (structural) approaches of character
recognition.

An early notable attempt in the area of character recognition research is by


Grimsdale in 1959. The origin of a great deal of research work in the early sixties
was based on an approach known as analysis-by-synthesis method suggested by
Eden in 1968. The great importance of Eden's work was that he formally proved
that all handwritten characters are formed by a finite number of schematic
features, a point that was implicitly included in previous works. This notion was
later used in all methods in syntactic (structural) approaches of character
recognition.

K. Gaurav, Bhatia P. K. Et al, this paper deals with the various pre-processing
techniques involved in the character recognition with different kind of images
ranges from a simple handwritten form based documents and documents
containing colored and complex background and varied intensities. In this,
different preprocessing techniques like skew detection and correction, image
enhancement techniques of contrast stretching, binarization, noise removal
techniques, normalization and segmentation, morphological processing
techniques are discussed. It was concluded that using a single technique for
preprocessing, we can’t completely process the image. However, even after
applying all the said techniques might not possible to achieve the full accuracy
in a preprocessing system.
INTRODUCTION

A handwritten digit recognition system was used to visualize artificial


neural networks. It is already widely used in the automatic processing of
bank cheques, postal addresses, in mobile phones etc.

Character recognition is a fundamental, but most challenging in the


field of pattern recognition with large number of useful applications. It
has been an intense field of research since the early days of computer
science due to it being a natural way of interactions between computers
and humans. More precisely Character recognition is the process of
detecting and recognizing characters from the input image and converts
it into ASCII or other equivalent machine editable form.

The technique by which a computer system can recognize characters


and other symbols written by hand in natural handwriting is called
handwriting recognition system. Handwriting recognition is classified into
offline handwriting recognition and online handwriting recognition . If
handwriting is scanned and then understood by the computer, it is called
offline handwriting recognition. In case, the handwriting is recognized
while writing through touch pad using stylus pen, it is called online
handwriting recognition. From the classifier perspective, character
recognition systems are classified into two main categories i.e.
segmentation free (global) and segmentation based (analytic). The
segmentation free also known as the holistic approach to recognize the
character without segmenting it into subunits or characters. Each word is
represented as a set of global features, e.g. ascender, loops, cusp, etc.
Whereas segmentation based approach.
CHAPTER 1
1.1 CO – LABORATORY SOFTWARE

Colab members came together as a collective in 1977, first using the


name Green Corporation, and initially received a National Endowment for
the Arts (NEA) Workshop Grant through Center for New Art Activities, Inc.,
a small not-for-profit organization formed in 1974. In 1978, Collaborative
Projects was incorporated as a not-for-profit of its own. By raising its own
sources of funding, Colab was in control of its own exhibitions and cable
TV shows.

Advocating a form of cultural activism that was purely artist driven, the
group created artworks, negotiated venues, curated shows, and engaged
in discourse that responded to the political themes and predicaments of
their time, among them the recessions of the 1970s, the Reagan era of
budget cuts and nuclear armament, the housing crisis and gentrification
in New York City, and other pressing social issues.

In order to become a member, an artist had to attend three consecutive


meetings. Artists who proposed artistic projects for funding needed at
least two Colab members involved in the project.
1.2 PROJECTS

From November 1978, different artist members organized and


installed original one-off group shows in their own studios or other
temporary sites, such as The Batman Show, (591 Broadway
1979), Income and Wealth Show (5 Bleecker Street Store
1979), Doctors and Dentists Show (591 Broadway 1979), The
Manifesto Show (5 Bleecker Street Store 1979), The Dog
Show (591 Broadway 1979), Just Another Asshole Show (5
Bleecker Street Store), The Real Estate Show (Delancey Street,
Jan. 1980), Jay Street Film Shows (1979), Exhibit A (93 Grand
Street, 1979), Island of Negative Utopia (The Kitchen, 1984)
and The Times Square Show (201 W 41st, June 1980): a large open
exhibition near the center of New York's entertainment (and
pornography) district (Times Square) that was put on with Bronx-
based Fashion Moda.

Colab members came together as a collective in 1977,[4] first using


the name Green Corporation, and initially received a National
Endowment for the Arts (NEA) Workshop Grant through Center for
New Art Activities, Inc., a small not-for-profit organization formed in
1974.

In 1978, Collaborative Projects was incorporated as a not-for-profit


of its own. By raising its own sources of funding, Colab was in
control of its own exhibitions and cable TV shows.
CHAPTER 2

2.1 TENSOR FLOW

TensorFlow allows developers to create dataflow graphs—


structures that describe how data moves through a graph, or a
series of processing nodes. Each node in the graph represents a
mathematical operation, and each connection or edge between
nodes is a multidimensional data array, or tensor.

TensorFlow can train and run deep neural networks for handwritten
digit classification, image recognition, word embeddings, recurrent
neural networks, sequence-to-sequence models for machine
translation, natural language processing, and PDE (partial
differential equation) based simulations. Best of all,TensorFlow
supports production prediction at scale, with the same models used
for training.

2.2 MATPLOTLIB

Matplotlib is a library in Python and it is numerical – mathematical


extension for NumPy library. Pyplot is a state-based interface to a
Matplotlib module which provides a MATLAB-like interface. There
are various plots which can be used in Pyplot are Line Plot,
Contour, Histogram, Scatter, 3D Plot, etc.

Matplotlib is a plotting library for the Python programming language


and its numerical mathematics extension NumPy. It provides an
object-oriented API for embedding plots into applications using
general-purpose GUI toolkits like Tkinter, wxPython, Qt, or GTK.

Matplotlib is an open-source plotting library in Python introduced in


the year 2003. ... It consists of several plots like the Line Plot, Bar
Plot, Scatter Plot, Histogram e.t.c through which we can visualise
various types of data.
2.3 RELU
The rectified linear activation function or ReLU for short is a
piecewise linear function that will output the input directly if it is
positive, otherwise, it will output zero. ... The rectified linear
activation function overcomes the vanishing gradient problem,
allowing models to learn faster and perform better.

The ReLU is the most used activation function in the world right
now. Since, it is used in almost all the convolutional neural networks
or deep learning. As you can see, the ReLU is half rectified (from
bottom). f(z) is zero when z is less than zero and f(z) is equal to z
when z is above or equal to zero.

2.4 ARGMAX
Argmax is a mathematical function that you may encounter
in applied machine learning.
Argmax is an operation that finds the argument that gives
the maximum value from a target function. Argmax is most
commonly used in machine learning for finding the class
with the largest predicted probability.

Argmax is a function which gives the index of the greatest


number in the given row or column and the row or column
can be decided using axis attribute of argmax funcion. If
we give axis=0 then it will give the index from columns and
if we give axis=1 then it will give the index from rows
2.5 SOFTMAX

The softmax function takes as input a vector z of K real


numbers, and normalizes it into a probability distribution
consisting of K probabilities proportional to the
exponentials of the input numbers. That is, prior to
applying softmax, some vector components could be
negative, or greater than one; and might not sum to 1; but
after applying softmax, each component will be in the
interval displaystyle (0,1)(0,1), and the components will
add up to 1, so that they can be interpreted as
probabilities. Furthermore, the larger input components
will correspond to larger probabilities.

2.6 MNIST DATASET

The MNIST database of handwritten digits, available from this


page, 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.
It is a good database for people who want to try learning tech.

It is a good database for people who want to try learning


techniques and pattern recognition methods on real-world data
while spending minimal efforts on preprocessing and formatting.
BLOCK DIAGRAM
PROGRAM
import tensorflow as tf

import matplotlib.pyplot as plt

import numpy as np

# New Section

### mnist = tf.keras.datasets.fashion_mnist

mnist = tf.keras.datasets.mnist

(xtrain,ytrain),(xtest,ytest) = mnist.load_data()

len(xtest)

xtrain[12]

ytrain[12]

plt.imshow(xtrain[12])

plt.show()

plt.imshow(xtrain[100])

plt.show()

plt.imshow(xtrain[100],cmap='gray')

plt.show()

for i in range(25):

plt.subplot(5,5,i+1)

plt.imshow(xtrain[i],cmap='gray')

plt.show()
for i in range(25):

plt.subplot(5,5,i+1)

plt.xticks([])

plt.yticks([])

plt.imshow(xtrain[i],cmap='gray')

plt.show()

#### Build Model

model = tf.keras.models.Sequential()

### Adding the layers

model.add(tf.keras.layers.Flatten()) ### input layer

model.add(tf.keras.layers.Dense(784,activation='relu')) ### hidden layer

model.add(tf.keras.layers.Dense(600,activation='relu')) ### hidden layer

model.add(tf.keras.layers.Dense(64,activation='relu')) ### hidden layer

### Adding the layers

model.add(tf.keras.layers.Dense(64,activation='relu')) ### hidden layer

model.add(tf.keras.layers.Dense(10,activation='softmax'))

### Configure the model

model.compile(optimizer='adam',loss='sparse_categorical_crossentropy',metrics=['accuracy'])

#### Train the model

## model.fit(xtrain,ytrain,epochs=3,batch_size=20)

model.fit(xtrain,ytrain,epochs=3)

##### Predictions

predictions = model.predict(xtest)
plt.figure(figsize=(10,10))

for i in range(25):

plt.subplot(5,5,i+1)

plt.xticks([])

plt.yticks([])

plt.imshow(xtest[i],cmap='gray')

plt.show()

ytest[4]

np.argmax(predictions[4])

np.argmax(predictions[20])

predictions[20]

loss,accu = model.evaluate(xtest,ytest)

loss,accu

OUTPUT
CONCLUSION
The main goal is purely educational one, a moderate recognition rate of
98% was reached on a test set.

The Handwritten Digit Recognition is used to recognize the Digits which


are written by hand.
The handwritten digit recognition have also proven to be a good neural
network. architecture and application for the purpose of
introducing and demonstrating neural networks to the general public.
REFERENCES
1.12 June 2020 Improved Handwritten Digit Recognition Using
Convolutional Neural Networks (CNN), Savita Ahlawat, Amit Choudhary,
Anand Nayyar, Saurabh Singh and Byungun Yoon.
2. 4 July 2020 Handwritten Digit Recognition Using Various Machine
Learning Algorithms and Models, Pranit Patil and Bhupinder Kaur.
3.2020 Handwritten Digit Recognition Using Computer Vision , Ashish
Shekhar and Ajay Kaus.
4.6 June 2019 Handwritten Digit Recognition using CNN, Vijayalaxmi R
Rudraswamimath and Bhavanishankar K.
5. 5.2019 Recognition of Handwritten Digit using Convolutional Neural
Network (CNN), Md. Anwar Hossain & Md. Mohon Ali.
6.31 August 2019 An efficient and improved scheme for handwritten
digit recognition based on convolutional neural network , Saqib Ali,
Zeeshan Shaukat, Muhammad Azeem, Zareen Sakhawat , Tariq
Mahmood & Khalil Rehman

You might also like