- Notifications
You must be signed in to change notification settings - Fork124
Use Convolutional Recurrent Neural Network to recognize the Handwritten line text image without pre segmentation into words or characters. Use CTC loss Function to train.
License
sushant097/Handwritten-Line-Text-Recognition-using-Deep-Learning-with-Tensorflow
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Use Convolutional Recurrent Neural Network to recognize the Handwritten line text image without pre segmentation into words or characters. Use CTC loss Function to train.More read thisMedium Post
Deep Learning self extracts features with a deep neural networks and classify itself. Compare to traditional Algorithms it performance increase with Amount of Data.
- First Use Convolutional Recurrent Neural Network to extract the important features from the handwritten line text Image.
- The output before CNN FC layer (512x1x100) is passed to the BLSTM which is for sequence dependency and time-sequence operations.
- Then CTC LOSSAlex Graves is used to train the RNN which eliminate the Alignment problem in Handwritten, since handwritten have different alignment of every writers. We just gave the what is written in the image (Ground Truth Text) and BLSTM output, then it calculates loss simply as
-log("gtText")
; aim to minimize negative maximum likelihood path. - Finally CTC finds out the possible paths from the given labels. Loss is given by for (X,Y) pair is:
- Finally CTC Decode is used to decode the output during Prediction.
- Project consists of Three steps:
- Tensorflow 1.8.0 ; You can upgrade to Tensorflow v2 with thislink
- Flask
- Numpy
- OpenCv 3
- Spell Checker
autocorrect
>=0.3.0pip install autocorrect
- IAM dataset download fromhere
- Only needed the lines images and lines.txt (ASCII).
- Place the downloaded files inside data directory
The Trained model is available and download from thislink. The trained model available have CER=8.32% and trained on IAM dataset with some additional created dataset. The final model have 3.42% CER which is not available publicly.
To Train the model from scratch
$ python main.py --train
To validate the model
$ python main.py --validate
To Prediction
$ python main.py
Run in Web with Flask
$ python upload.pyValidation character error rate of saved model: 8.654728%Python: 3.6.4 Tensorflow: 1.8.0Init with stored values from ../model/snapshot-24Without Correction clothed leaf by leaf with the dioappoistmestWith Correction clothed leaf by leaf with the dioappoistmest
Prediction output on IAM Test Data
Prediction output on Self Test Data
See the projectDevnagari Handwritten Word Recognition with Deep Learning for more insights.
- Using MDLSTM to recognize whole paragraph at onceScan, Attend and Read: End-to-End Handwritten Paragraph Recognition with MDLSTM Attention
- Line segmentation can be added for full paragraph text recognition. To segment a paragraph into lines, you can use an A* path planning algorithm or CNN model.
- Better Image preprocessing, such as: reducing background noise to handle real-time images more accurately.
- Better Decoding approach to improve accuracy. Some of the CTC Decoder foundhere
If you use any part of this project in your work, please cite:
@techreport{Handwritten-Line-text-recognition-using-deep-learning-2019, title={Handwritten Line Text Recognition}, author={Gautam Sushant}, institution={Tribhuvan University}, year={2019}}
Feel Free to improve this project with a pull Request.
- This is a work from my undergraduate thesis in computer engineering at Tribhuvan University in 2019.
About
Use Convolutional Recurrent Neural Network to recognize the Handwritten line text image without pre segmentation into words or characters. Use CTC loss Function to train.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.