All Projects → him4318 → Transformer-ocr

him4318 / Transformer-ocr

Licence: Unlicense license
Handwritten text recognition using transformers.

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Transformer-ocr

Vedastr
A scene text recognition toolbox based on PyTorch
Stars: ✭ 290 (+215.22%)
Mutual labels:  ocr, transformer, ocr-recognition
handprint
Apply different text recognition services to images of handwritten documents.
Stars: ✭ 127 (+38.04%)
Mutual labels:  htr, handwritten-text-recognition
EverTranslator
Translate text anytime and everywhere, even you are gaming!
Stars: ✭ 59 (-35.87%)
Mutual labels:  ocr, ocr-recognition
CRNN-OCR-lite
Lightweight CRNN for OCR (including handwritten text) with depthwise separable convolutions and spatial transformer module [keras+tf]
Stars: ✭ 130 (+41.3%)
Mutual labels:  ocr, handwritten-text-recognition
Deep Text Recognition Benchmark
Text recognition (optical character recognition) with deep learning methods.
Stars: ✭ 2,665 (+2796.74%)
Mutual labels:  ocr, ocr-recognition
Awesome Ocr
Stars: ✭ 198 (+115.22%)
Mutual labels:  ocr, ocr-recognition
receipt-manager-app
Receipt parser application written in dart.
Stars: ✭ 140 (+52.17%)
Mutual labels:  ocr, ocr-recognition
Textshot
Python tool for grabbing text via screenshot
Stars: ✭ 1,163 (+1164.13%)
Mutual labels:  ocr, ocr-recognition
ID-Card-Passport-Recognition-SDK-Android
On-Device ID Card & Passport & Driver License Recognition SDK for Android
Stars: ✭ 223 (+142.39%)
Mutual labels:  ocr, ocr-recognition
Transformer-MM-Explainability
[ICCV 2021- Oral] Official PyTorch implementation for Generic Attention-model Explainability for Interpreting Bi-Modal and Encoder-Decoder Transformers, a novel method to visualize any Transformer-based network. Including examples for DETR, VQA.
Stars: ✭ 484 (+426.09%)
Mutual labels:  transformer, detr
htr-united
Ground Truth Resources for the HTR of patrimonial documents
Stars: ✭ 23 (-75%)
Mutual labels:  htr, handwritten-text-recognition
Awesome Deep Text Detection Recognition
A curated list of resources for text detection/recognition (optical character recognition ) with deep learning methods.
Stars: ✭ 2,282 (+2380.43%)
Mutual labels:  ocr, ocr-recognition
Sightseq
Computer vision tools for fairseq, containing PyTorch implementation of text recognition and object detection
Stars: ✭ 116 (+26.09%)
Mutual labels:  ocr, transformer
Opencv
📷 Computer-Vision Demos
Stars: ✭ 244 (+165.22%)
Mutual labels:  ocr, ocr-recognition
Bert ocr.pytorch
Unofficial PyTorch implementation of 2D Attentional Irregular Scene Text Recognizer
Stars: ✭ 101 (+9.78%)
Mutual labels:  ocr, transformer
Handwritten-Names-Recognition
The goal of this project is to solve the task of name transcription from handwriting images implementing a NN approach.
Stars: ✭ 54 (-41.3%)
Mutual labels:  ocr, handwritten-text-recognition
form-segmentation
Let's explore how we can extract text from forms
Stars: ✭ 42 (-54.35%)
Mutual labels:  ocr, handwritten-text-recognition
Attention Ocr
A Tensorflow model for text recognition (CNN + seq2seq with visual attention) available as a Python package and compatible with Google Cloud ML Engine.
Stars: ✭ 844 (+817.39%)
Mutual labels:  ocr, ocr-recognition
Zxingcamera
Camera for Android,身份证号码识别 (本地,实时)
Stars: ✭ 34 (-63.04%)
Mutual labels:  ocr, ocr-recognition
deep-learning-for-document-dewarping
An application of high resolution GANs to dewarp images of perturbed documents
Stars: ✭ 100 (+8.7%)
Mutual labels:  ocr, ocr-recognition

Handwritten Text Recognition (HTR) system implemented using Pytorch and trained on the Bentham/IAM/Rimes/Saint Gall/Washington offline HTR datasets. This Neural Network model recognizes the text contained in the images of segmented texts lines.

Data pre-processing is totally based on this awesome repository of handwritten text recognition. Data partitioning (train, validation, test) was performed by following the methodology of each dataset.

Model building is done using the transformer architecture. Recentely facebook research realeased a paper where, they used transformer for object detection. I made few changes to their model so that it could be run on text recognition.

Tutorial (Google Colab/Drive)

A Jupyter Notebook is available for demo, check out the tutorial on Google Colab/Drive.

Datasets supported

a. Bentham

b. IAM

c. Rimes

d. Saint Gall

e. Washington

Requirements

  • Python 3.6
  • OpenCV 4.x
  • editdistance
  • Pytorch 1.5

Command line arguments

  • --source: dataset/model name (bentham, iam, rimes, saintgall, washington)
  • --transform: transform dataset to the HDF5 file
  • --image: prediction on a single image with the source parameter
  • --train: train model using the source argument
  • --test: evaluate and predict model using the source argument
  • --norm_accentuation: discard accentuation marks in the evaluation
  • --norm_punctuation: discard punctuation marks in the evaluation
  • --epochs: number of epochs
  • --batch_size: number of the size of each batch
  • --lr: Learning rate

Notes:

  • Model used is from DETR(facebook research) notebook but in there paper they perfromed few more steps.
  • For improving the results few more things can be done:
    • Using the warmup steps
    • Using sine positional encodings for image vector.
    • Trying more FC layers before output.
    • Trying different parameters of Transformer.
    • Trying different backbone model for getting feature vector of image.
  • Training took ~20 hrs on google colab. where as arthurflor model can be trained in ~8hrs.
  • Word error rate is 15% less when compared to Arthur's model on bentham dataset.
  • Purpose of this project was to showcase the power of Transformer ie: You can use them anywhere.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].