Code Monkey home page Code Monkey logo

Comments (5)

caoyangcr7 avatar caoyangcr7 commented on May 13, 2024

N is the number of stn matrix in paper.

from stn-ocr.

Bartzi avatar Bartzi commented on May 13, 2024

Hi,

N does not change during training. It is set to the maximum amount of text regions you want your network to extract. Naturally, it will happen that some words are shorter than N. IN this case you must make sure that the these extra timesteps are labelled with the blank label, so that the network learns to predict the correct number of characters/words in the image.

Let's have a look at your example: Let's assume the 16 is in the top-left corner of the image and the 18 is in the bottom-right corner of the image. Since we always assumed that we read from left to right and top to bottom, we would say that the first label is 16 and the second label is 18. With this way of defining our labels, we tell the network to put the first prediction always close to the most top-left word and all other predictions following the reading direction.

from stn-ocr.

caoyangcr7 avatar caoyangcr7 commented on May 13, 2024

@Bartzi,thanks for your reply. Maybe I didn`t explain my question 1 clearly. for question 2,I got it. About the N,it seems that you explain it as CTC loss. My question is that ,for example,now the N is set as 3,it means we can get 3 prediction text regions. if the number of ground truth labels is only 2,like “16” and "18" as above,you mean that we must make sure the label of extra prediction region is blank?Am I right?

from stn-ocr.

Bartzi avatar Bartzi commented on May 13, 2024

Yes, that's it!

from stn-ocr.

caoyangcr7 avatar caoyangcr7 commented on May 13, 2024

@Bartzi Thanks a lot ! Hope everything goes well with you !

from stn-ocr.

Related Issues (20)

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.