sushant097 / Handwritten-Line-Text-Recognition-using-Deep-Learning-with-Tensorflow

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.
Apache License 2.0
293 stars 122 forks source link
blstm cnn crnn-tensorflow ctc-loss deep-learning deep-neural-networks handwritten-text-recognition iam-dataset python3 recurrent-neural-network tensorflow

Handwritten Line Text Recognition using Deep Learning with Tensorflow

GitHub stars GitHub forks Maintenance Website shields.io Ask Me Anything ! License

Description

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 this Medium Post

Why Deep Learning?

Why Deep Learning

Deep Learning self extracts features with a deep neural networks and classify itself. Compare to traditional Algorithms it performance increase with Amount of Data.

Basic Intuition on How it Works.

Step_wise_detail

Detail Project Workflow

Architecture of Model

Requirements

  1. Tensorflow 1.8.0 ; You can upgrade to Tensorflow v2 with this link
  2. Flask
  3. Numpy
  4. OpenCv 3
  5. Spell Checker autocorrect >=0.3.0 pip install autocorrect

Dataset Used

The Trained model is available and download from this link. 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.py
Validation character error rate of saved model: 8.654728%
Python: 3.6.4 
Tensorflow: 1.8.0
Init with stored values from ../model/snapshot-24
Without Correction clothed leaf by leaf with the dioappoistmest
With Correction clothed leaf by leaf with the dioappoistmest

Prediction output on IAM Test Data PredictionOutput

Prediction output on Self Test Data PredictionOutput

See the project Devnagari Handwritten Word Recognition with Deep Learning for more insights.

Further Improvement

Citation

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 pull Request.

This is a work from my last semester project in computer engineering at Tribhuvan University. In July of 2019,