Sign In to Follow Application
View All Documents & Correspondence

Handwriting Generation System Using Machine Learning Techniques

Abstract: HANDWRITING GENERATION SYSTEM USING MACHINE LEARNING TECHNIQUES The present invention relates to handwriting generation systems, specifically to a system that mimics the handwriting of an individual using advanced machine learning techniques such as convolutional neural networks (CNN), recurrent neural networks (RNN), and generative adversarial networks (GAN). This system is designed to generate a user’s handwriting style for any provided text, offering a more personalized alternative to conventional handwriting generation tools.

Get Free WhatsApp Updates!
Notices, Deadlines & Correspondence

Patent Information

Application #
Filing Date
10 September 2024
Publication Number
38/2024
Publication Type
INA
Invention Field
COMPUTER SCIENCE
Status
Email
Parent Application

Applicants

SR UNIVERSITY
ANANTHSAGAR, HASANPARTHY (M), WARANGAL URBAN, TELANGANA - 506371, INDIA

Inventors

1. DR. MOHAMMED ALI SHAIK
SR UNIVERSITY, ANANTHSAGAR, HASANPARTHY (M), WARANGAL URBAN, TELANGANA - 506371, INDIA
2. DEVIREDDY POOJITHA REDDY
SR UNIVERSITY, ANANTHSAGAR, HASANPARTHY (M), WARANGAL URBAN, TELANGANA - 506371, INDIA
3. DEVIREDDY JAYADEEP REDDY
SR UNIVERSITY, ANANTHSAGAR, HASANPARTHY (M), WARANGAL URBAN, TELANGANA - 506371, INDIA

Specification

Description:FIELD OF THE INVENTION
The present invention relates to handwriting generation systems, specifically to a system that mimics the handwriting of an individual using advanced machine learning techniques such as convolutional neural networks (CNN), recurrent neural networks (RNN), and generative adversarial networks (GAN). This system is designed to generate a user’s handwriting style for any provided text, offering a more personalized alternative to conventional handwriting generation tools.
BACKGROUND OF THE INVENTION
Despite of handwriting generators which are available now-a-days, they lack in mimicking the user handwriting, rather the existing apps or websites on the internet having the system which provides the user with the limited varieties of font styles and handwriting is lagging behind. Now the times have changed and the customer are willing to note down the things in their personal handwriting. So, there is a need of a system which uses the advanced techniques to capture the individual's handwriting photographs as an input and generating the same handwriting of the user for the provided text by the individual.
For creating this system, machine learning and deep learning techniques involving the artificial neural networks and the GPT-3 models, handwriting segmentation, vectorization techniques needed to be used. By implementing this system can lead to the best feature for the existing apps and can provide the satisfaction for the user.
Existing handwriting generation tools available on various apps and websites provide only a limited variety of predefined font styles. These tools lack the capability to accurately replicate the handwriting style of individual users. With increasing demand for personalized handwriting in digital environments, there is a need for a system that can capture a user's handwriting style and replicate it automatically for any text provided by the user.
The present invention addresses this need by employing machine learning and deep learning techniques, including neural networks, for handwriting segmentation and vectorization. The system captures images of the user’s handwriting, learns its characteristics, and generates new text in the same style. This enhances the user experience by offering a more personal and customized handwriting generation solution.
SUMMARY OF THE INVENTION
This summary is provided to introduce a selection of concepts, in a simplified format, that are further described in the detailed description of the invention.
This summary is neither intended to identify key or essential inventive concepts of the invention and nor is it intended for determining the scope of the invention.
The present invention provides a system for generating handwriting that closely resembles the user's own handwriting. The system uses a combination of machine learning models, including CNN, RNN, and GAN, to process and generate handwriting based on provided text input. The system captures the user's handwriting style via photographed samples and trains a model to replicate this style.
The invention is particularly advantageous because it allows for the automatic generation of handwriting in the user’s specific style, overcoming the limitations of existing font-based handwriting generators. The system’s use of neural networks ensures accuracy, efficiency, and the ability to handle complex variations in handwriting styles.
To further clarify advantages and features of the present invention, a more particular description of the invention will be rendered by reference to specific embodiments thereof, which is illustrated in the appended drawings. It is appreciated that these drawings depict only typical embodiments of the invention and are therefore not to be considered limiting of its scope. The invention will be described and explained with additional specificity and detail with the accompanying drawings.
The methodology includes these four stages: Data preprocessing, feature selection, machine learning models, algorithms implementations and prediction. Flow of stages one by one is as follows figure 1.
BRIEF DESCRIPTION OF THE DRAWINGS
The illustrated embodiments of the subject matter will be understood by reference to the drawings, wherein like parts are designated by like numerals throughout. The following description is intended only by way of example, and simply illustrates certain selected embodiments of devices, systems, and methods that are consistent with the subject matter as claimed herein, wherein:
FIGURE 1: THE FLOW OF MODEL
The figures depict embodiments of the present subject matter for the purposes of illustration only. A person skilled in the art will easily recognize from the following description that alternative embodiments of the structures and methods illustrated herein may be employed without departing from the principles of the disclosure described herein.

DETAILED DESCRIPTION OF THE INVENTION
The detailed description of various exemplary embodiments of the disclosure is described herein with reference to the accompanying drawings. It should be noted that the embodiments are described herein in such details as to clearly communicate the disclosure. However, the amount of details provided herein is not intended to limit the anticipated variations of embodiments; on the contrary, the intention is to cover all modifications, equivalents, and alternatives falling within the scope of the present disclosure as defined by the appended claims.
It is also to be understood that various arrangements may be devised that, although not explicitly described or shown herein, embody the principles of the present disclosure. Moreover, all statements herein reciting principles, aspects, and embodiments of the present disclosure, as well as specific examples, are intended to encompass equivalents thereof.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments. As used herein, the singular forms “a",” “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises,” “comprising,” “includes” and/or “including,” when used herein, specify the presence of stated features, integers, steps, operations, elements and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and/or groups thereof.
It should also be noted that in some alternative implementations, the functions/acts noted may occur out of the order noted in the figures. For example, two figures shown in succession may, in fact, be executed concurrently or may sometimes be executed in the reverse order, depending upon the functionality/acts involved.
In addition, the descriptions of "first", "second", “third”, and the like in the present invention are used for the purpose of description only, and are not to be construed as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Thus, features defining "first" and "second" may include at least one of the features, either explicitly or implicitly.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which example embodiments belong. It will be further understood that terms, e.g., those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
Present invention discloses a handwriting generation system using machine learning, comprising: A processor, configured to execute machine learning models for handwriting generation; A memory, coupled to the processor, storing instructions and data for machine learning operations; A data preprocessing module, implemented on the processor, configured to clean and segment input handwriting data into individual strokes, lines, and characters; A feature selection module, implemented on the processor, configured to identify relevant handwriting features using statistical methods; A model training module, implemented on the processor, utilizing convolutional neural networks (CNN), recurrent neural networks (RNN), and generative adversarial networks (GAN) to train on handwriting samples; A handwriting generation module, implemented on the processor, configured to generate personalized handwriting based on provided text using the trained models; An input device, configured to receive handwriting samples from the user, and; An output device, configured to display or export the generated handwriting in the user's style.
In another embodiment, the feature selection module uses the Chi-Square Test to identify significant handwriting features from the input data.
In another embodiment, the RNN model is trained to generate continuous handwriting strokes based on sequential input data from the user’s handwriting samples.
In another embodiment, the GAN model is used to generate realistic handwritten text images conditioned on the input text provided by the user.
In another embodiment, the data preprocessing module normalizes the handwriting samples to a consistent format suitable for machine learning model training and inference.
In another embodiment, the handwriting generation module produces personalized handwriting that mimics the user’s actual handwriting style based on the trained machine learning models.
In another embodiment, further comprising a camera or scanning device, configured to capture high-resolution images of the user's handwriting samples for input to the data preprocessing module.
In another embodiment, further comprising a touchscreen or stylus input device, configured to allow the user to input handwriting samples directly for real-time training and generation.
In another embodiment, the output device comprises a printer or display screen to physically or digitally reproduce the personalized handwriting style generated by the system.
In another embodiment, further comprising a storage device, configured to store handwriting samples, trained models, and generated handwriting data for future use and retrieval.
The methodology includes these four stages: Data preprocessing, feature selection, machine learning models, algorithms implementations and prediction. Flow of stages one by one is as follows figure 1.
DETAILS OF DATASET
The dataset is a collection of inter-related data. It has been taken from IAM database and contains the following details:
* 13,353 images of handwritten sentences of text made by 657 writers
* The texts transcribed by these writers are from the Lancaster-Oslo/Bergen Corpus of British English
* A total of 1,539 handwritten pages having the 115,320 words.
* Categorized as part of latest collection.
* Labeled at each sentence, line, and words.
B. DATAPRE-PROCESSING
Data preprocessing is like getting your raw data in shape for machine learning models. It cleans up the messy and incomplete data, making sure it's in a format that the models can work with.
C. FEATURE IDENTIFICATION
So, feature selection is a way to improve how well a predictive model works by cutting down on the number of input variables. It helps make the model run faster and saves on computing power by getting rid of unnecessary features. The Chi-Square Test is the method used for this. It looks at the importance of different attributes by using chi-squared statistics, which gives more weight to the attributes that are the most relevant. This method only works with nominal labels and uses frequencies instead of means and variances to calculate the value.
X^2=∑▒[〖(O-E)〗^2/E] (1)
D. SPLITTING DATA
When we split the data, we generally define two independent variables as X and Y. The dataset is then divided into a "Training set" and a "Testing set" in a 70:30 ratio, respectively. We use these two sets for future evaluation process.
E. ALGORITHMS USED FRO TRAINING MODEL
So, there are a bunch of various machine learning algorithms used to produce handwritten photographic data. In this project, we used algorithms like "convolutional neural networks , recurrent neural networks and generative adversarial networks" to give handwritten text images and then comparison is performed using confidence scores.
CNN: This algorithm is called as convolutional neural network algorithm is used in solving the problems in regression as well as classification.This is commonly used in Computer Vision. CNN’s have their neurons which are arranges in 3-D manner as width, height and depth. Each neuro will take the small patch of the image and will process it and send it to the next layers. After the image processing the model is trained and can be ready for the prediction.
RNN: This algorithm is used in solving both regression and classification problems.This algorithm better suits for the sequence data. Other than the neural networks, RNN have loops in them and allowing the data pass through them sequentially. Especially the RNN algorithm has the so called ‘memory’ with it can remember the calculations it has done so far.

GAN: it is a “unsupervised learning algorithm”. Most commonly it has two parts in it one is generator and other is discriminator. The generator will produce the data and the discriminator will check whether the data receiving is coming from the true training data or not. Gan’s are used to generate the realistic images for the task like synthesizing images with a description of text provided. Not only this they also can perform the Image synthesis, text-to-image Synthesis and style transfer, this is a very advance feature of GAN model.
E. METRICS EVALUATION
Different kinds of measures are used to evaluate algorithms which includes accuracy, precision, recall, and confusion matrix. These metrics are calculated using true positives (TP), true negatives (TN), false positives (FP), and false negatives (FN).
Accuracy: It is the ratio of count correct predictions to the total count of interpretations.
Accuracy=((TP+TN))/((TP+FP+FN+TN)) (2)
Precision: It is the ratio of accurately predicted positive observations to the total predicted positive observations
Precision=TP/((TP+FP)) (3)
Recall: It is the ratio of correct predicted positivevalues to the total no of predicted positive and negative values.
Recall=TP/((TP+FN)) (4)
We created a Handwriting generator application which is image synthesis tool that which performs the “Image synthesizing” for the model , in future deploy this model for generating User’s handwriting using neural network models through machine learning procedures.
COMPARISONS BETWEEN DATA MODELS:
The four algorithms were implemented to obtain the results. Random Forest has the highest accuracy among them all according to the results. That means that predictions made by Convolutional Neural Networks should be used.

model LOSS Accuracy
CNN 2.56 92.4
The accuracy we got is 92.4 percentage for the above CNN table.

mODEL LOSS ACCURACY
RNN 1.94 97.7
The accuracy we got is 97.7 percentage for the above RNN table.

MODEL LOSS ACCURACY
GAN 2.6 95
The accuracy we got is 95 percentage for the above GAN table.
algorithms implemented

Algorithm Accuracy (%)
CNN 92.4
RNN 97.7
GAN 95

This project uses "RNN, GNN, CNN" machine learning methods for precise results. “Trained model” performs well with “feature selection”.
The Ensemble ML Models are efficient and accurate in generating users’ handwriting as the accuracy of RNN comes out to be high than GAN and CNN. Additionally, for better performance extensive hyperparameter tuning of ML along with enhanced feature selection would be done.
REFRENCES
As per reference [1] has implemented handwriting synthesis in paper “Generating sequences with Recurrent neural networks” by Alex Graves. Initially they took the trained model using the Recurrent neural networks and then took the sample input of lines with biases, styles, stroke colors, stroke width from the wide varieties of styles and strokes, generate the handwriting.
As per reference [2] has implemented the handwriting mimicking with use of RNN with TensorFlow by Grzego took the help of the Alex paper. First, he had prepared the data set which includes normalization of data and splitting the strokes in lines and training the model using RNN and generated the handwriting with the given style and bias and the animation is also added to the text.
As per reference [3] is implemented by using the RNN, Pytorch, LSTM which included the one hod encoding and strokes used for the handwriting generation by the vicianad from a GitHub repository. In this reference the different handwriting photographs samples are taken and the sample texts are given as input and the handwriting is generated.
As per reference [4] which is fork from the anguelos/datasets which focusses on the improving of the handwritten document synthetization aspect of the original repository. For this fork the spline interpolation, document noise and background blending is performed and an option to disable distortion for the still generating parameters.
As per reference [5] has implemented a learning and generating multiple types of character trajectories with kinematics and features by pytrajkin, Yin, Melo, Billiard. It is a Synthesizing Robotic Handwriting Motion by Learning from Human Demonstrations. They used the packages like NumPy, SciPy, scikit-learn, matplotlib and implemented the concept of motion synthesis.
As per reference [6] from a GitHub repository named multi-medium implemented handwriting synthesis and handwriting simulation in the writing application with the help of the Json dataset and not only used the languages like python but also used the HTML and JavaScript for performing the handwriting generation with the help of the trained model with JavaScript.
As per reference [7] has proposed a Deep learning technique, Handwriting synthesis and handwriting mimicking with RNN neural network by Aniket Bajpai. He used a concept of Unconditional Handwriting Generation with two models implemented. One is LSTM with hidden dim of 900 and 1 layer and second model is hidden dim of 400 and 3 layers.
As per reference [8] who has proposed a GAN model can output the handwritten samples by Ruchita Nagare, Amit Panthi, Sujay Rokade have taken the dataset from IAM words dataset to collect 8593 samples and trained it using the GAN for the Adversial generation of handwritten text image conditioned on sequences. The GAN model could control the auxiliary network for the text recognition.
As per reference [9] from repository, Scribble.js was an old project with the goal of drawing scribbly looking things, such as randomized handwriting, to create more convincing results than a static handwriting font, even one that provides glyph substitutions to add variation. A neural network-based technique for rendering handwriting in different styles - this is impressive, and obviously much more dynamic in its generation of handwriting,
As per reference [10] had implementation of a network for handwriting synthesis on the work of generating sequences With RNN by alex. The dataset used to train this neural network is the IAM On-Line Handwriting Database. Here in this repository implementation of a model for Handwriting Synthesis using a LSTM recurrent neural network in PyTorch.
As per reference [11] X-rayLaser repository contains utilities for doing handwriting prediction and handwriting synthesis with RNN. The implementation follow generating sequences with recurrent neural networks with pytorch implementation with the prediction network architecture and exporting the models to ONNX.
As per reference [12] GAN writing model follow the method which is able to create handwritten image dataset using generative process with b calligraphic styles and text by LEI Kang, Axing Wang using the GAN model.
As per reference [13] 14 simplified models are created in the experiment created to know the domain about what handwriting is controlled by the system to order to which model gives the good handwriting by Plamondon and Maarse.
As per reference [14] have proposed twenty-three various models which can be used to tell about the asymmetric velocity profiles of the rapid movements. This comparison is done with the help of an analysis experiment on database consisting 1052 straight lines of 9 subjects BY AM Alimi, P Yergeau.
As per reference [15] by proctor, illingworth, mokhtarian introduced the cursive handwriting recognition using Markov models and a lexicon-driven algorithm via image signal processing.
, Claims:1. A handwriting generation system using machine learning, comprising:
A processor, configured to execute machine learning models for handwriting generation;
A memory, coupled to the processor, storing instructions and data for machine learning operations;
A data preprocessing module, implemented on the processor, configured to clean and segment input handwriting data into individual strokes, lines, and characters;
A feature selection module, implemented on the processor, configured to identify relevant handwriting features using statistical methods;
A model training module, implemented on the processor, utilizing convolutional neural networks (CNN), recurrent neural networks (RNN), and generative adversarial networks (GAN) to train on handwriting samples;
A handwriting generation module, implemented on the processor, configured to generate personalized handwriting based on provided text using the trained models;
An input device, configured to receive handwriting samples from the user, and;
An output device, configured to display or export the generated handwriting in the user's style.
2. The system as claimed in claim 1, wherein the feature selection module uses the Chi-Square Test to identify significant handwriting features from the input data.
3. The system as claimed in claim 1, wherein the RNN model is trained to generate continuous handwriting strokes based on sequential input data from the user’s handwriting samples.
4. The system as claimed in claim 1, wherein the GAN model is used to generate realistic handwritten text images conditioned on the input text provided by the user.
5. The system as claimed in claim 1, wherein the data preprocessing module normalizes the handwriting samples to a consistent format suitable for machine learning model training and inference.
6. The system as claimed in claim 1, wherein the handwriting generation module produces personalized handwriting that mimics the user’s actual handwriting style based on the trained machine learning models.
7. The system as claimed in claim 1, further comprising a camera or scanning device, configured to capture high-resolution images of the user's handwriting samples for input to the data preprocessing module.
8. The system as claimed in claim 1, wherein further comprising a touchscreen or stylus input device, configured to allow the user to input handwriting samples directly for real-time training and generation.
9. The system as claimed in claim 1, wherein the output device comprises a printer or display screen to physically or digitally reproduce the personalized handwriting style generated by the system.
10. The system as claimed in claim 1, further comprising a storage device, configured to store handwriting samples, trained models, and generated handwriting data for future use and retrieval.

Documents

Application Documents

# Name Date
1 202441068265-STATEMENT OF UNDERTAKING (FORM 3) [10-09-2024(online)].pdf 2024-09-10
2 202441068265-REQUEST FOR EARLY PUBLICATION(FORM-9) [10-09-2024(online)].pdf 2024-09-10
3 202441068265-POWER OF AUTHORITY [10-09-2024(online)].pdf 2024-09-10
4 202441068265-FORM-9 [10-09-2024(online)].pdf 2024-09-10
5 202441068265-FORM FOR SMALL ENTITY(FORM-28) [10-09-2024(online)].pdf 2024-09-10
6 202441068265-FORM 1 [10-09-2024(online)].pdf 2024-09-10
7 202441068265-EVIDENCE FOR REGISTRATION UNDER SSI(FORM-28) [10-09-2024(online)].pdf 2024-09-10
8 202441068265-EVIDENCE FOR REGISTRATION UNDER SSI [10-09-2024(online)].pdf 2024-09-10
9 202441068265-EDUCATIONAL INSTITUTION(S) [10-09-2024(online)].pdf 2024-09-10
10 202441068265-DRAWINGS [10-09-2024(online)].pdf 2024-09-10
11 202441068265-DECLARATION OF INVENTORSHIP (FORM 5) [10-09-2024(online)].pdf 2024-09-10
12 202441068265-COMPLETE SPECIFICATION [10-09-2024(online)].pdf 2024-09-10
13 202441068265-FORM 18 [17-02-2025(online)].pdf 2025-02-17