Giter VIP home page Giter VIP logo

crnn-study's Introduction

Robust Scene Text Recognition with Automatic Rectification

This repository implements the Robust Scene Text Recognition with Automatic Rectification (SRN only) in pytorch, which is modified from https://github.com/meijieru/crnn.pytorch

Train for VGG text data

download dataset

  1. create a link to mnt folder
  2. python data/create_mnt_list.py
  3. python main.py --trainlist data/train_list.txt --vallist data/test_list.txt --cuda --adam --lr=0.001

crnn-study's People

Contributors

wenyafei4 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

crnn-study's Issues

does it work?

请问你的代码是基于paython2还是paython3de

some question about crnn+attention model

I have noticed that in your crnn+attention's code, you define the forward function of crnn class by three variables:input length text, while I can not find the length text as the error msg shows:
TypeError: forward() missing 2 required positional arguments: 'length' and 'text'

and your code shows below

def forward(self, input, length, text):
# conv features
conv = self.cnn(input)
b, c, h, w = conv.size()
assert h == 1, "the height of conv must be 1"
conv = conv.squeeze(2)
conv = conv.permute(2, 0, 1) # [w, b, c]

        # rnn features
    crnnShare,_ = self.rnnShare(conv)
    T, b, h = crnnShare.size()
    t_rec = crnnShare.view(T * b, h)
    CTCEmbed = self.embeddingCTC(t_rec)  # [T * b, nOut]
    outputCTC = CTCEmbed.view(T, b, -1)
    AttentionEmbed = self.embeddingAttention(t_rec)  # [T * b, nOut]
    AttentionInput = AttentionEmbed.view(T, b, -1)
    outputAttention = self.attention(AttentionInput, length, text)

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.