A PyTorch port of the CRNN scene-text workhorse
Reimplements the 2016 CRNN text recognizer in PyTorch, sparing you the original Lua dependencies.

What it does
This is a PyTorch implementation of the Convolutional Recurrent Neural Network (CRNN) described by Shi et al. It takes an image containing text—like a street sign or scanned word—and predicts the character sequence directly. The demo script loads a converted pretrained model and decodes the result, collapsing raw CTC alignments into readable strings.
The interesting bit
The project is essentially a port of the original Torch/Lua codebase into modern PyTorch, swapping in warp_ctc_pytorch for the CTC loss. The README’s example output is charmingly honest: it shows the raw CTC path (a-----v--a-i-l-a-bb-l-ee--) before collapsing it to available, which neatly illustrates how the network learns alignment without explicit character bounding boxes.
Key highlights
- End-to-end scene text recognition from images using CNN feature extraction + RNN transcription
- Includes a converted pretrained model for immediate inference via
demo.py - Supports training new models with variable-length images, though you must manually sort by text length and tweak
tool/create_dataset.py - Depends on
warp_ctc_pytorchfor CTC loss computation andlmdbfor dataset storage - Cites the original 2016 IEEE TPAMI paper and links back to the original Torch implementation
Caveats
- Training setup is not self-contained: you must follow the original repo’s dataset guide and manually edit scripts to handle variable aspect ratios
- Pretrained weights live on third-party hosting (Dropbox and Baidu Netdisk), not GitHub releases or a model hub
- The README is sparse on architecture details and leaves most training exploration to reading
train.pydirectly
Verdict
Grab this if you need a straightforward, hackable PyTorch baseline for scene text recognition or want to compare against the classic 2016 CRNN paper. Skip it if you are looking for a modern, batteries-included OCR pipeline with active maintenance and turnkey data loaders.
Frequently asked
- What is meijieru/crnn.pytorch?
- Reimplements the 2016 CRNN text recognizer in PyTorch, sparing you the original Lua dependencies.
- Is crnn.pytorch open source?
- Yes — meijieru/crnn.pytorch is open source, released under the MIT license.
- What language is crnn.pytorch written in?
- meijieru/crnn.pytorch is primarily written in Python.
- How popular is crnn.pytorch?
- meijieru/crnn.pytorch has 2.5k stars on GitHub.
- Where can I find crnn.pytorch?
- meijieru/crnn.pytorch is on GitHub at https://github.com/meijieru/crnn.pytorch.