ID: 5dc1967919ef63725087b9d1

OCR

by Raj Kumar

Sequence To sequence OCR


License: Apache License 2.0

Tags: OCR NLP Sequence To sequence Pytorch

Ā Model stats and performance
Dataset Used View
Framework PyTorch
OS Used Linux
Publication View
Inference time in seconds per sample.

Screenshots


SEQUENCE TO SEQUENCE OCR

WHAT IS IT?

Optical Character Recognition (OCR) to convert image to text. The four stages derived from model are as follows:

  1. Transformation (Trans.) normalizes the input text image using the Spatial Transformer Network (STN [12]) to ease downstream stages.
  2. Feature extraction (Feat.) maps the input image to a representation that focuses on the attributes relevant for character recognition, while suppressing irrelevant features such as font, color, size, and background.
  3. Sequence modeling (Seq.) captures the contextual information within a sequence of characters for the next stage to predict each character more robustly, rather than doing it independently.
  4. Prediction (Pred.) estimates the output character sequence from the identified features of an image. To run The Inference Script run this command

python3 run.py --Transformation TPS --FeatureExtraction ResNet --SequenceModeling BiLSTM --Prediction Attn --image_folder demo_image/ --saved_model TPS-ResNet-BiLSTM-Attn.pth

For help, python run.py -h

ARGUMENTS DETAILS HELP OPTIONS
--Transformation Transformation Transformation stage. None
--SequenceModeling SequenceModeling SequenceModeling stage. None
-generatestats GENERATESTATS Generate model stats
--image_folder IMAGE FOLDER path to image_folder which contains text images
--saved_mode saved_mode path to saved_model to evaluation

WHAT ARE THE REQUIREMENTS?

To get all the requirements and dependencies installed run the command For GPU - pip install -r gpu_requirements.txt For CPU - pip install -r cpu_requirements.txt

Author View Profile


Raj Kumar
New Delhi, India.
Level 20 25450 XP

1258 Profile
Views

I love coding

User Reviews



0 total ratings

Model has not been reviewed yet.

More by this user | Show All



Also checkout...