Git Product home page Git Product logo

Comments (3)

weinman avatar weinman commented on June 1, 2024

I don't think what you suggest is the right approach. Two issues come to mind. CTC ignores the location of the individual elements in the input image, so I cannot see how you would practically target individual sequence items. If you could, one ex post facto way to adjust your prior in a learned conditional model to use Bayes' rule.

P(class|obs) = P(obs|class) * P(class) / P(obs)
P'(class|obs) = P(obs|class) * P'(class) / P(obs) = P(class|obs) * P'(class) / P(class)

That is, you can adjust your discriminant function (in a non-sequential model) by rescaling with the ratio of training data to test data distributions.

from cnn_lstm_ctc_ocr.

skalinin avatar skalinin commented on June 1, 2024

Thanks for answering!
So, if I get you right, we may have 100 ‘q’ in training set and we know that it is not enough. In the test data it may be 10,000 ‘q’. So let say we have trained our model with what we have, and on the last step, we run the model and just multiply output probability ‘q’ by P’(q)/P(q)
where
P’(q) is 10,000/total_number_of_symbols_in_test
and
P(q) is 100/total_number_of_symbols_in_train

So, in that way we a little bit increase/decrease output probability of ‘q’.
It sounds tricky to me. Could you please tell if i understand you right?
And what you can say about MJSynth dataset imbalance? The class/symbols in that dataset not balanced either. Isn’t it affect to the results when we test the model trained on MJsynth on the other datasets?

from cnn_lstm_ctc_ocr.

weinman avatar weinman commented on June 1, 2024

There are no easy solutions. Any sequence model, such as the one in this repo, will perform best on test data with the same statistics (as captured by the model) as the training data.

from cnn_lstm_ctc_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.