All Projects → bgshih → Crnn

bgshih / Crnn

Licence: mit
Convolutional Recurrent Neural Network (CRNN) for image-based sequence recognition.

Programming Languages

lua
6591 projects
C++
36643 projects - #6 most used programming language
shell
77523 projects
python
139335 projects - #7 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to Crnn

Textrecognitiondatagenerator
A synthetic data generator for text recognition
Stars: ✭ 2,075 (+9.15%)
Mutual labels:  ocr
Craft keras
Keras implementation of Character Region Awareness for Text Detection (CRAFT)
Stars: ✭ 143 (-92.48%)
Mutual labels:  ocr
Tesseract4android
Fork of tess-two rewritten from scratch to support latest version of Tesseract OCR.
Stars: ✭ 148 (-92.21%)
Mutual labels:  ocr
Easyocr
Ready-to-use OCR with 80+ supported languages and all popular writing scripts including Latin, Chinese, Arabic, Devanagari, Cyrillic and etc.
Stars: ✭ 13,379 (+603.79%)
Mutual labels:  ocr
Ambar
🔍 Ambar: Document Search Engine
Stars: ✭ 1,829 (-3.79%)
Mutual labels:  ocr
Crnn.pytorch
crnn实现水平和垂直方向中文文字识别, 提供在3w多个中文字符训练的水平识别和垂直识别的预训练模型; 欢迎关注,试用和反馈问题... ...
Stars: ✭ 145 (-92.37%)
Mutual labels:  ocr
Transformer str
PyTorch implementation of my new method for Scene Text Recognition (STR) based on Transformer,Equipped with Transformer, this method outperforms the best model of the aforementioned deep-text-recognition-benchmark by 7.6% on CUTE80.
Stars: ✭ 131 (-93.11%)
Mutual labels:  ocr
Neuralnet Handwriting Ios
A handwriting recognition example for iOS using NeuralNet
Stars: ✭ 148 (-92.21%)
Mutual labels:  ocr
Lockdemo
指纹识别、图形识别、aliOCR识别
Stars: ✭ 142 (-92.53%)
Mutual labels:  ocr
Scene Text Recognition
Scene text detection and recognition based on Extremal Region(ER)
Stars: ✭ 146 (-92.32%)
Mutual labels:  ocr
Alfred Ocr
OCR & Translate using multiple interfaces for Alfred Workflow
Stars: ✭ 136 (-92.85%)
Mutual labels:  ocr
Lexpredict Contraxsuite
LexPredict ContraxSuite
Stars: ✭ 140 (-92.64%)
Mutual labels:  ocr
Binary Face Alignment
Real time face alignment
Stars: ✭ 145 (-92.37%)
Mutual labels:  torch7
Hrcloud2
A full-featured home hosted Cloud Drive, Personal Assistant, App Launcher, File Converter, Streamer, Share Tool & More!
Stars: ✭ 134 (-92.95%)
Mutual labels:  ocr
Stb Tester
Automated Testing for Set-Top Boxes and Smart TVs
Stars: ✭ 148 (-92.21%)
Mutual labels:  ocr
Ssocr
Seven Segment Optical Character Recognition
Stars: ✭ 133 (-93%)
Mutual labels:  ocr
Tedeval
TedEval: A Fair Evaluation Metric for Scene Text Detectors
Stars: ✭ 143 (-92.48%)
Mutual labels:  ocr
Captcha trainer
[验证码识别-训练] This project is based on CNN/ResNet/DenseNet+GRU/LSTM+CTC/CrossEntropy to realize verification code identification. This project is only for training the model.
Stars: ✭ 2,228 (+17.2%)
Mutual labels:  ocr
Deep License Plate Recognition
Automatic License Plate Recognition (ALPR) or Automatic Number Plate Recognition (ANPR) software that works with any camera.
Stars: ✭ 148 (-92.21%)
Mutual labels:  ocr
Paddleocr
Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)
Stars: ✭ 18,084 (+851.29%)
Mutual labels:  ocr

Convolutional Recurrent Neural Network

This software implements the Convolutional Recurrent Neural Network (CRNN), a combination of CNN, RNN and CTC loss for image-based sequence recognition tasks, such as scene text recognition and OCR. For details, please refer to our paper http://arxiv.org/abs/1507.05717.

UPDATE Mar 14, 2017 A Docker file has been added to the project. Thanks to @varun-suresh.

UPDATE May 1, 2017 A PyTorch port has been made by @meijieru.

UPDATE Jun 19, 2017 For an end-to-end text detector+recognizer, check out the CTPN+CRNN implementation by @AKSHAYUBHAT.

Build

The software has only been tested on Ubuntu 14.04 (x64). CUDA-enabled GPUs are required. To build the project, first install the latest versions of Torch7, fblualib and LMDB. Please follow their installation instructions respectively. On Ubuntu, lmdb can be installed by apt-get install liblmdb-dev.

To build the project, go to src/ and execute sh build_cpp.sh to build the C++ code. If successful, a file named libcrnn.so should be produced in the src/ directory.

Run demo

A demo program can be found in src/demo.lua. Before running the demo, download a pretrained model from here. Put the downloaded model file crnn_demo_model.t7 into directory model/crnn_demo/. Then launch the demo by:

th demo.lua

The demo reads an example image and recognizes its text content.

Example image: Example Image

Expected output:

Loading model...
Model loaded from ../model/crnn_demo/model.t7
Recognized text: available (raw: a-----v--a-i-l-a-bb-l-e---)

Another example: Example Image2

Recognized text: shakeshack (raw: ss-h-a--k-e-ssh--aa-c--k--)

Use pretrained model

The pretrained model can be used for lexicon-free and lexicon-based recognition tasks. Refer to the functions recognizeImageLexiconFree and recognizeImageWithLexicion in file utilities.lua for details.

Train a new model

Follow the following steps to train a new model on your own dataset.

  1. Create a new LMDB dataset. A python program is provided in tool/create_dataset.py. Refer to the function createDataset for details (need to pip install lmdb first).
  2. Create model directory under model/. For example, model/foo_model. Then create configuraton file config.lua under the model directory. You can copy model/crnn_demo/config.lua and do modifications.
  3. Go to src/ and execute th main_train.lua ../models/foo_model/. Model snapshots and logging file will be saved into the model directory.

Build using docker

  1. Install docker. Follow the instructions here
  2. Install nvidia-docker - Follow the instructions here
  3. Clone this repo, from this directory run docker build -t crnn_docker .
  4. Once the image is built, the docker can be run using nvidia-docker run -it crnn_docker.

Citation

Please cite the following paper if you are using the code/model in your research paper.

@article{ShiBY17,
  author    = {Baoguang Shi and
               Xiang Bai and
               Cong Yao},
  title     = {An End-to-End Trainable Neural Network for Image-Based Sequence Recognition
               and Its Application to Scene Text Recognition},
  journal   = {{IEEE} Trans. Pattern Anal. Mach. Intell.},
  volume    = {39},
  number    = {11},
  pages     = {2298--2304},
  year      = {2017}
}

Acknowledgements

The authors would like to thank the developers of Torch7, TH++, lmdb-lua-ffi and char-rnn.

Please let me know if you encounter any issues.

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].