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:
- Transformation (Trans.) normalizes the input text image using the Spatial Transformer Network (STN [12]) to ease downstream stages.
- 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.
- 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.
- 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
User Reviews
0 total ratings
Model has not been reviewed yet.