0% found this document useful (0 votes)
46 views26 pages

Writer Identification of Hand Written Scripts Using Machine Learning

writer identification of hand written scripts using machine learning, used popular features to train the model and also tried deep learning, CNN model
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views26 pages

Writer Identification of Hand Written Scripts Using Machine Learning

writer identification of hand written scripts using machine learning, used popular features to train the model and also tried deep learning, CNN model
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 26

WRITER IDENTIFICATION USING

DEEP NEURAL NETWORKS

Submitted in partial fulfilment of the requirements of the degree


of Bachelor of Technology

by
Shiva Datta Erroju - 204219
Gopu Sai Shiva Varaprasad - 204222
Sravan Kodumoori - 204231

Supervisor
Dr. Raghunadh M
V Associate
Professor
Department of Electronics and Communication Engineering

Department of Electronics and Communication


Engineering
National Institute of Technology
Warangal 2023-2024
Approval Sheet
This Project entitled

“WRITER IDENTIFICATION USING DEEP NEURAL


NETWORKS”

Done by
Shiva Datta Erroju - 204219
Gopu Sai Shiva Varaprasad - 204222
Sravan Kodumoori - 204231

is approved for the degree of Bachelor of Technology.


Examiners

Supervisor
Sri M V Raghunadh
Associate Professor
Department of Electronics and Communication Engineering

Head of the Department


Prof. Vakula D
Department of Electronics and Communication Engineering

Date: 31-10-2023
Place: Warangal
Declaration
I declare that this written submission represents my ideas in my own words and where others'
ideas or words have been included, I have adequately cited and referenced the original
sources. I also declare that I have adhered to all principles of academic honesty and integrity
and have not misrepresented or fabricated or falsified any idea / data / fact / source in my
submission. I understand that any violation of the above will be cause for disciplinary action
by the Institute and can also evoke penal action from the sources which have thus not been
properly cited or from whom proper permission has not been taken when needed.

Shiva Datta Erroju - 204219

Gopu Sai Shiva Varaprasad - 204222

Sravan Kodumoori - 204231

Date: 31-10-2023
Certificate

This is to certify that the dissertation Work entitled “WRITER IDENTIFICATION USING
DEEP NEURAL NETWORKS” is a bonafide record of work carried out by

Shiva Datta Erroju - 204219


Gopu Sai Shiva Varaprasad - 204222
Sravan Kodumoori - 204231

submitted to the faculty of “Department of Electronics and Communication Engineering”, in


partial fulfillment of the requirements for the award of the degree of Bachelor of Technology
in “Electronics and Communication Engineering” at National Institute of Technology,
Warangal during the academic year 2023-2024

Prof. Vakula D.
Sri M V Raghunadh
Head of the Department
Associate Professor
Department of Electronics and
Department of Electronics and
Communication Engineering
Communication Engineering
NIT Warangal
NIT Warangal
Abstract

Writer identification aims to identify the author of handwritten scripts/documents in


question using machine learning algorithms. Automated writer identification is of interest
because of its more time efficient and less prone to gross errors compared to manual human
verification methods. This technique has various practical applications like forensic
document analysis, biometric identification, and historical document analysis.

Previous research on writer identification using machine algorithms are based on


extracting different features specific to their field of application like, Quill tip angle based
approach and hinge based approach for writer identification in historical documents. We
chose Deep learning because, models such as convolutional neural networks and recurrent
neural networks are trained on a large dataset, learn distinctive features and can extract
relevant features from the input data. That means, these models distinctive features of each
writer's handwriting style and thus shown promise in writer identification.

We aim to implement Deep Convolution Neural Networks in classification of


handwritten images into multiple classes, representing different authors of the text. We plan
to analyze different architectures and hyperparameters and design an architecture best suitable
for the writer identification. We plan to further extend this project to writer identification in
multiple languages.

Thus by doing this project we aim to reduce document frauds, which in sense is
identity theft, and add to field of digital forensics. We will implement it locally by using this
on handwritten assignments of students.
Introduction

Computer and phones may be more ubiquitous than ever, but many people still prefer the
traditional feeling of writing with ink on paper. Despite having various tools, traditional handwriting
using pen on a paper has been the dominant way for non-verbal communication for years. Each
individual's writing has its own uniqueness so that handwriting often becomes the character or
characteristic of the author. The hand-writing pattern usually becomes a character for the
writer so that people who recognize the writing will easily guess the ownership of the related
handwriting. However, handwriting is often used by irresponsible people in the form of handwriting
falsification. The acts of writing falsification often occur in the workplace or even in the field of
education. This is one of the driving factors for creating a reliable system in tracking someone's
based on their ownership. This tool has various applications, such as forensic investigations,
document authentication, and educational assessment

Writer identification generally differs between writer identification and writer


verification. Writer identification is binary classification involves finding the author of a
query document against a reference database containing documents by known authors. Writer
verification, on the other hand, is perceived as an n-class problem which determines whether
two samples were written by the same person.

The Identification can also be differentiated as text dependent and text independent.
Text independent identification, as the name suggests, identifies the writer based on his
writing style and does not depend on the content of the script written. This is of preference
due to the fact that the writer may not similar content everywhere and the lack of large dataset
availability in cases of forensics. Further we will be experimenting to achieve language
independent writer identification.
Most of the current related studies focused on feature extraction and generally on the
feature engineering using either new modern deep approaches or classical descriptors. We
propose a deep neural network-based writer identification system, which is a text-
independent approach and very efficient for discovering author characteristics from
handwriting images. It is also known as offline handwriting writer identification. Deep
Convolution Neural Networks is useful in extracting meaningful features from the dataset
automatically. We will be implementing an conjugation of deep and traditional feature
descriptors (e.g., the inter letter spacing or the handwriting thickness information) is useful
for handwriting writer identification applications.

In this report, we will then discuss previous research on writer identification using
deep learning. We will discuss the use of deep learning for writer identification. Explore
conjugating traditional feature extraction with Deep Convolution Neural Networks. Then test
different architectures so that we can build an architecture and fine tuning it. Try extending
this to make it an language independent model. Finally, we will present our results and
conclusions we have made.
Problem Statement
Text-independent Language-independent Offline handwriting writer identification
using conjugation of deep learning and traditional feature descriptors

Motivation:

Writer identification is a significant field within the realm of behavioral biometrics,


presenting a complex challenge in pattern classification. This task involves overcoming
several obstacles, including a large pool of writers, a limited amount of handwritten text per
writer, and inherent variations within the writing samples of the same individual. As a result,
writer identification remains an ongoing research conundrum that necessitates further
exploration and investigation.

The significance of writer recognition extends to various practical applications in


fields like forensics, cybersecurity, and document analysis. The ability to attribute a piece of
text to its author holds the potential to aid in solving crimes, uncovering forgeries, and
gaining insights into the writing style of historical figures. Traditional techniques for writer
recognition, such as manual handwriting analysis, often suffer from subjectivity, time
constraints, and limited applicability. This situation has fueled a growing interest in
developing automated systems for writer recognition, harnessing the capabilities of machine
learning and, in particular, deep learning techniques. These advanced methods promise
greater accuracy and efficiency in the identification process.

Deep learning has ushered in a revolution in the realm of pattern recognition by


facilitating the automatic extraction of intricate features from raw data. When applied to
writer recognition, deep learning models excel in learning to discern the subtle nuances and
distinctive characteristics of an individual's handwriting style. Recent years have witnessed
remarkable progress in the utilization of deep learning for writer recognition, with numerous
models achieving remarkable accuracy rates on various datasets.
The core motivation driving this project is to delve into the potential of deep learning
techniques for writer recognition. By doing so, we aim to contribute to the existing body of
research in this field and offer a more precise and efficient means of identifying the authors
of handwritten documents. This project seeks to apply deep learning to tackle the intricacies
of offline handwritten script writer identification, making a meaningful contribution to a vital
area of research with wide-ranging applications in our digital age.

Applications:
● Forensics:
This project can be used to detect fraud such as student handwritten projects. This
algorithm detects discrepancies between the author of the old assignment and the
submitted assignment and informs the professor. It can integrate with our LMS and
allow students to upload assignments.

● Personals and Biometrics:


Handwriting is recognized as a valid biometric and forensic or document examiner
evidence (FDE/QDE) is legally admissible (Srihari et al., 2002; Davis, 2007; Jain
2002). Its main use is to determine expert intuition about the authenticity of a
particular text and the authorship of unknown or questioned historical texts.

● Documents Authenticity:
To prevent fraud, the authenticity of legal documents such as wills and signatures
must be verified

● Forgery Detection:
Forgery detection methods should examine static and dynamic features to detect subtle
differences between presented and real samples (handwriting shake, pen float, etc.).

● Indexing, Analysis, Retrieving Historical Documents:


Analyzing historical data is usually the job of a professional historian or
paleontologist.

● Verifying Signatures:
Among biometric systems, handwritten signatures are one of the most widely used
personal characteristics as a legal means of personal authentication in government and
financial institutions. A person's signature can basically be defined as a combination
of symbols and strokes that are personal characteristics and represent the person's own
unique writing style.

● Property Security:
A collateral agreement is a legal document that gives the lender the right to claim
certain assets or properties pledged by the borrower as collateral for the loan. These
documents can be easily forged, so we need a way to identify the author to see if the
document was signed by the rightful owner

Merits:

1.Feature Learning: Deep learning models can automatically learn relevant features
from raw audio data, reducing the need for handcrafted feature engineering. This makes the
process more adaptable to different acoustic scenes

2.High Accuracy: Deep learning models have demonstrated the ability to achieve
high accuracy in acoustic scene classification, often outperforming traditional machine
learning approaches. They can capture complex patterns and relationships in audio data.

3.Generalization: Deep learning models can generalize well to unseen data, which is
crucial for real-world applications where hand-writing scenes may vary widely.

Demerits:

1.Computational Resources: Training deep learning models can be computationally


intensive and time-consuming, requiring access to powerful hardware and potentially leading
to high operational costs
2.Data Requirements: Deep learning models typically require large amounts of
labelled data for training, which can be challenging to obtain, especially for rare or
specialized acoustic scene.

3.Complexity: Designing and fine-tuning deep learning models can be complex and
require expertise in neural network architecture, hyperparameter tuning, and training

4.Overfitting: Deep learning models are susceptible to overfitting, where they may
perform well on the training data but poorly on unseen data. Effective regularization
techniques are necessary to mitigate this issue.

5.Interpretability: Deep learning models are often seen as "black boxes" with
limited interpretability. Understanding the model's decision-making process can be
challenging, which may not be suitable for applications requiring transparency.
LITERATURE SURVEY

PAPER NAME AUTHOR YEAR METHODOLOGY RESULTS


S
NAME
.

N
O

1. A new method Abdeljalil 2023 Writer characterizing It can be seen that by


Gattal , from challenging
for writer using the proposed
Chawki Djeddi
identification historical manuscripts moment-based
, Faycel Abbas
based on using oBIFs and distance, Top-1
, Imran Siddiqi
historical and Brahim hinge features. identification rates of
documents Bouderah Introduction of a as high as 77.36% and
novel moment-based 75% are reported with
measure to compute the oBIF column
the distance between histogram and delta
two feature vectors. hinge feature
A comprehensive respectively. A similar
experimental study trend can be observed
on publicly available for all the employed
historical documents. metrics, i.e., Top-5
Promising and Top-10
performance in terms identification rates
of writer and mAP
identification rates
outperforming the
existing methods.
2. A deep learning Malihe Javidi, 2020 A new handwritten Achieved 95.25%
Mahdi
framework for thickness descriptor accuracy on the IAM
Jampour
text-independent (HTD) is proposed. • dataset
writer Analysis of deep and
identification traditional features is
provided.

Next concatenate this


HTD feature with very
known ResNet model

3. Handwritten I Khandokar, 2020 The model consists of Increasing the number


Md M Hasan,
character four stages: of training images
F Ernawan,
recognition using Preprocessing enhances improves average
Md S Islam, M
convolutional N Kabir*
input images by accuracy and
neural network removing noise and parameter learning.
converting them to For instance, accuracy
grayscale or binary. grows from 65.32%
Segmentation isolates with 200 images to
individual characters, and 92.91% with 1000
extreme borders are images. However,
removed. Feature there's an accuracy
extraction employs limit due to numerical
CNN with ReLU errors and CNN's
activation to generate a image differentiation
feature vector for each constraints for labels.
character. In the
Classification and
Recognition stage, this
feature vector is used for
classification and
recognition, with pre-
calculated parameters
from the training phase.

A database with 5 simple In this paper a way for


4. Convolutional Marco 2020. grapheme types namely, processing simple
Mora,Jose
Neural Networks Naranjo- graphemes for writer
Torres,,Veroni
for Off-Line identification is
ca Aubin.
Writer defined. This approach

Identification is used for verification is based on the use of

Based on Simple tests with an SVM-based CNN. In this

classifier. Images from experimentation


Graphemes
50 writers include 100 AlextNet, VGG-16,

samples of each VGG-19 and ResNet-


18 models are used as
grapheme. To classify
these distinct images, they have a reasonable
pretrained CNN models compromise between
like AlexNet, ResNet, accuracy and training
and VGG-16/19 undergo time. In this

a learning transfer experiment the best

process, adapting to the result was obtained

graphemes' unique while using original


grapheme image and
characteristics, including
ResNet-18 CNN
rectified and original
model.
forms. The dataset is
called LITRP-SGDB.

Approach uses CNN for


5. Writer Stefan Fiel 2015 the task of writer Evaluation results on
and Robert
Identification identification and writer the CVL-Database
Sablatnig
and Retrieval retrieval. The model paper is 79.9%
Using a consists of four stages: The retrieval criterion
Convolutional evaluation results on
Preprocessing: Gray-
Neural Network the CVL-Database is
Scale image inputs are
93.3%
binarized using
thresholding, threshold is
found using Otsu
method. Since the CNNs
require an image of fixed
size as input, images are
split up using a sliding
window approach with a
step size of 20 pixels.

Generation of the
Feature Vector: For
this, a well know CNN
model called Caffenet is
used. It is trained using a
softmax loss function

Design of the CNN, the “caffenet” of the “Caffe - Deep learning framwork”

6.
Writer A.A.Brinka, ,J. Analyzes the width of In performance
2011
Smitb,M.L.Bul
identification ink traces to identify experiments, the well-
acua,L.R.B.Sc
using directional distinctive writing known Directions
homakera
ink-trace width patterns feature achieved top-1
measurements Collects samples of accuracy between
known authors for 48% and 74%. In
analysis. contrast, the Ink
Preprocesses handwritten Width feature,
samples by digitizing and describing ink trace
isolating ink traces. width, showed results
Preprocesses handwritten ranging from 22% to
samples by digitizing and 73%. The Quill
isolating ink traces. feature, combining
Uses statistical and trace direction and
machine learning
width, outperformed
techniques for writer
both Directions and
identification.
Ink Width, achieving
Validates and tests the
top-1 accuracy of 63%
model with additional
to 95%. This
samples for accuracy.
emphasizes the value
of combining
directionality and
width measurements
for writer
identification,
demonstrating Quill's
superior performance
compared to other
features.
WORK FLOW
A typical workflow in deep learning involves several key steps, from data preparation
to model deployment. Here is a general overview of the deep learning workflow:

Data Acquisition:
- Gather the data needed for your deep learning project. The dataset should be
representative of the problem and large enough to train a robust model.

Data Pre-processing:
- Prepare the data for training and testing. This may involve tasks such as data
cleaning, data augmentation, data splitting (into training, validation, and test sets), and
label encoding or one-hot encoding.

Model Selection:
- Choose an appropriate deep learning architecture or model type based on the
problem. This could be a convolutional neural network (CNN) for image tasks,
recurrent neural network (RNN) for sequences, or a pre-trained model like a ResNet or
BERT.

Model Design:
- Design the architecture of the deep learning model, specifying the number of layers,
types of layers, activation functions, and any special considerations (e.g., recurrent
layers for sequential data).

Model Compilation:
- Compile the model by specifying the loss function, optimizer, and evaluation
metrics. This step configures how the model is trained.
Model Training:
- Train the model on the training data. This is the process of adjusting the model's
weights and biases using backpropagation and optimization algorithms. Monitor the
model's performance on the validation set during training to avoid overfitting.

Model Evaluation:
- Assess the model's performance on the test dataset, which it has not seen during
training. Evaluate the model using appropriate metrics (e.g., accuracy, precision, recall,
F1-score, etc.).

Model Fine-Tuning(Optional):
- If the model's performance is not satisfactory, fine-tune hyperparameters, adjust the
architecture, or explore different pre-processing techniques.

Model Validation:
- Validate the model's performance on new, real-world data, ensuring it works in the
intended application. This may involve deployment to a controlled environment.

Model Deployment:
- Deploy the trained model for making predictions on new, unseen data. Deployment
can be on the cloud, edge devices, or as part of an application.

Monitoring and Maintenance:


- Continuously monitor the model's performance in the deployed environment.
Retrain or fine-tune the model as new data becomes available. Ensure the model
remains accurate and reliable.

Documentation:
- Document the entire deep learning process, including data sources, model
architecture, training procedures, and evaluation metrics. Proper documentation is
crucial for reproducibility and knowledge sharing.

Scaling:
- For large-scale applications, consider scaling your deep learning solution to handle
higher loads, whether it's through distributed training, model serving systems, or other
methods.

Iterate and Improve:


- Deep learning projects are often iterative. Regularly revisit and improve the model
based on new data, changing requirements, or advances in research.

The deep learning workflow can vary depending on the specific problem and
application. However, these general steps provide a roadmap for tackling deep learning
projects effectively and systematically.
WORK DONE

I.Data Set Collection:


Initial stage in any type of project based on deep learning is purely depends on
dataset collection .Because huge amount of data is required for to train the deep
learning models.

 Local dataset:We collected the image samples of individual friends from their
hand written notebooks,assignments,records….

Writer-1 Writer-2

 IAM Handwriting Database: The IAM Handwriting Database is a well-


known and publicly accessible dataset utilized extensively for research and
advancements in the domains of writer recognition and handwriting analysis.
Initially introduced in ICDAR 1999, this database is detailed in [8]1. It
comprises 1,539 pages of handwritten text from 657 authors, with varying page
counts per author. The participants were instructed to transcribe printed English
text onto paper using any pen type. The IAM Handwriting Database has
become a valuable resource for researchers due to its comprehensive collection
of diverse handwriting samples.

 Firemaker: The dataset [24] 2 mentioned comprises texts authored by 250


individuals in Dutch. Each author has contributed four manuscript pages.
Similar to the IAM Handwriting Database, this dataset exhibits an artificial
nature in its construction. Each author's writing status differs across the pages.
On the first page, all 250 authors copy the same specific text. The second page
features the same text, but this time it is written in capital letters. The third page
entails copied text with the condition that authors write in a different style than
the original. The last four pages consist of cartoon illustrations. Consequently,
each author presents a distinct text, encompassing variations and unique
stylistic elements within the dataset.

 ICDAR17: The dataset mentioned was originally put forth for the 2017 ICDAR
Competition on Author Identification of Historical Documents, which took
place at the International Conference on Document Analysis and Recognition
[10]. Its primary purpose was to enable the evaluation of methods and
algorithms for searching written documents using the "Query by Example"
approach. The dataset was specifically designed to facilitate research and
advancements in author identification of historical documents, offering
participants a standardized benchmark for their investigations during the
competition.

II.Dataset Preprocessing :
Dataset preprocessing is a crucial step in preparing data for input into a deep
learning model. It involves a series of tasks to clean, transform, and organize the data to
make it suitable for training a neural network.

 Data Cleaning: Remove or handle missing values, outliers, and errors in the
data. Inconsistent or noisy data can negatively impact model performance.

 Data Normalization/Scaling: Standardize the data so that features have similar


scales. This helps the model converge faster and prevents certain features from
dominating the learning process.

In the process of preparing handwritten samples for analysis with neural


networks, several preprocessing steps are essential. These steps include deskewing,
scaling, and binarization to ensure proper alignment and normalization. After these
steps, the resulting cropped images may vary in size. To make them suitable for neural
network input, a text padding technique is applied. This technique involves adding a
white background to the cropped image, expanding its dimensions, and filling the blank
areas with segments of the original text. This process acts as a form of "data
augmentation," which enhances the dataset and introduces additional variations in the
training data. Text padding ultimately generates fixed-size images that can be easily
used for further analysis and processing with neural networks.

 Filters: Filters are a fundamental concept in image processing, used to


enhance or extract specific features or information from images. They are
commonly applied through a process called convolution.

i) Median Filter: Replaces each pixel's value with the median value in its
neighborhood, which is effective in removing salt-and-pepper noise.
ii) Gaussian Filter: Used to blur and reduce high-frequency noise in images.
It's especially useful for images corrupted with Gaussian noise.

iii) Otsu Binarization: Global thresholding methods typically involve


manually selecting a threshold value, which can be a subjective process. In
contrast, Otsu's method offers an automated approach for determining the
optimal threshold without the need for manual intervention. Otsu's method
operates by analyzing the histogram of an image. When an image consists
of only two distinct intensity values, the histogram exhibits two peaks. The
ideal threshold for binarization lies between these two peaks. Otsu's method
calculates the optimal global threshold by finding the threshold value that
minimizes the intra-class variance or maximizes the inter-class variance. By
applying Otsu's method, we can automatically determine the threshold value
that yields the best results for binarizing the image. This eliminates the need
for manual threshold selection and ensures an objective and effective
thresholding process.

III.Model Training: These include defining the model architecture, configuring


hyperparameters, and optimizing the model using backpropagation. In this particular
study, the ResNet neural network architecture, specifically the ResNet50 version, is
being employed. Additionally, the study plans to conduct initial experiments using
other well-known models like VGG, AlexNet, and DenseNet. The goal is to explore
different versions of the ResNet architecture to thoroughly assess their performance in
the given task.

Results:

1.Epochs=100,AlexNet

2.Epochs=100,ResNet

You might also like