GithubHelp home page GithubHelp logo

crnn's Introduction

CRNN

Introduction

CRNN is the abstraction of Convolutional Recurrent Neural Network. It is basically a CNN followed by a RNN. The CNN is actually doing the encoding work, and the RNN is actually doing the decoding work. CRNN can be used to do text recognition. In this process, CRNN takes an image as input and outputs texts contained in the image.

The paper where CRNN comes from is An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition. The original code of this paper is bgshih/crnn. The codes in this repository are basically built on meijieru/crnn.pytorch.

Dependency

  • PyTorch 1.3.0
  • lmdb 0.98
  • Pillow 6.2.1
  • a GPU

Demo

A demo program can be found in demo.py.

A trained model is provided in Baidu Netdisk. You should download it first and put it in trained_model/.

Then launch the demo by:

python demo.py

Example image:

Example image

Expected output:

load input image...
load trained model...
predicted label: developer

Result

More results are listed below.

Image:

Image

Output:

load input image...
load trained model...
predicted label: discussion

Image:

Image

Output:

load input image...
load trained model...
predicted label: reception

The model is trained on the dataset of Robust Reading Competition's Born-Digital Images (Web and Email) Challenge Task 1.3. The model can achieve around 70% accuracy on the validationset.

Train a new model

  1. Construct a new dataset using create_dataset.py.

  2. Execute:

     python train.py --trainset_path PATH_TO_TRAINSET --validationset_path PATH_TO_VALIDATIONSET
    

    The model will be saved every epoch. The model will be saved into directory model/.

crnn's People

Contributors

ruiyang-061x avatar

Stargazers

Roman avatar SenWang avatar  avatar

Watchers

James Cloos avatar  avatar paper2code - bot avatar

Forkers

dun933

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.