GithubHelp home page GithubHelp logo

Comments (3)

Holmeyoung avatar Holmeyoung commented on June 19, 2024 1

@mariembenslama Hi,

  1. Check your data.

    What is the number of you train sample? In my case, i used 5*10^6 sample to train 1000 characters. To get satisfying result, we need enough clean data.

  2. Check your params.

    Some suggestions,

    • stage1

      nepoch = 1000
      batchSize = 64
      lr = 0.001
      
      displayInterval = 100
      valInterval = 1000
      saveInterval = 1000

      Set lr = 0.001 , we need a bigger lr to avoid getting local optimal solution at first.

      Set batchSize = 64 , small batchsize(eg: 2) will slow down the convergence speed and make it difficult to find the proper direction of gradient drop.

      Set nepoch = 1000 , this setting should be connected with displayInterval, valInterval, saveInterval . Print the val accuracy after valInterval and save model after saveInterval, when the accuracy get up and down, kill the training process manually, into stage2

    • stage2

      lr = 0.0001
      pretrained = 'path/to/your/model'

      Yes, just set lr = 0.0001 to make the result more stable. Load the model from stage1 to prevent training from zero.

    • about stage1, 2

      nepoch can be big enough, because you can kill the process manually after saving the good performance model. So set saveInterval to a proper number, too small will waste the disk, while too big will miss the model. It should be the same with valInterval , after getting the accuracy, then save the model.

  3. Check your loss and accuracy.

    Some suggestions

    loss value is more important than accuracy!

    If your training loss become smaller and smaller, it's OK. If the loss become smaller and smaller but the accuracy become up and down, you can turn to use a smaller lr and load the trained model to continue training.

    If your training loss doesn't converge, enmmm,

    • too little data
    • mistake with data
    • some metaphysical problem

SORRY to reply now, we are in different time zone.

Hope this can help you.

from crnn-pytorch.

Holmeyoung avatar Holmeyoung commented on June 19, 2024

@mariembenslama have you solved the accuracy problem?

from crnn-pytorch.

mariembenslama avatar mariembenslama commented on June 19, 2024

I'm still following your proposed solution so I'm creating a dataset with 50^6 * 4 images with variable text length < 26 right now so it's going to take sometime for that.

I'm using google colaboratory.

However I agree your solution will give a good accuracy as to follow it :)

Thank you very much for the help 😀😀😀

from crnn-pytorch.

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.