Coder Social home page Coder Social logo

Comments (1)

ajgallego avatar ajgallego commented on June 27, 2024

Hi @justinner,

that error indicates that you are not loading the training images correctly. It is possible that the folder structure is not correct, check the "load_dataset_folds" function of the "train.py" file.

For example, to use Dibco 2016 as test set and Dibco 2009-2014 as training sets, you have to write:

python -u train.py -path datasets -db dibco -dbp 6 --aug -w 256 -s 128 -f 64 -k 5 -e 200 -b 10 -th -1 -stride 2 -page 64

Inside your folder you have to create a subfolder called "datasets", and inside this other one called "Dibco", like this:

  • Dibco/2009/handwritten_GR
  • Dibco/2009/printed_GR
  • Dibco/2010/handwritten_GR
  • Dibco/2011/handwritten_GR
  • Dibco/2011/printed_GR
  • Dibco/2012/handwritten_GR
  • Dibco/2013/handwritten_GR
  • Dibco/2013/printed_GR
  • Dibco/2014/handwritten_GR,
  • Dibco/2016/handwritten_GR

If you do not want to use augmented remove the "--aug" option from the command. If you want to use augmented files you have to create the same folders but using the prefix "aug_", for example, for Dibco 2009 it would be:

  • Dibco/2009/aug_handwritten_GR
  • Dibco/2009/aug_printed_GR

Remember also that the images have to be in PNG format.

Another important issue is that the input images and their corresponding ground truth must to have the same filename, for example, for the following training images of Dibco 2009:

  • datasets/Dibco/2009/handwritten_GR/H01.png
  • datasets/Dibco/2009/handwritten_GR/H02.png
  • datasets/Dibco/2009/handwritten_GR/H03.png
  • datasets/Dibco/2009/handwritten_GR/H04.png
  • datasets/Dibco/2009/handwritten_GR/H05.png

We would have the following corresponding images of ground truth:

  • datasets/Dibco/2009/handwritten_GT/H01.png
  • datasets/Dibco/2009/handwritten_GT/H02.png
  • datasets/Dibco/2009/handwritten_GT/H03.png
  • datasets/Dibco/2009/handwritten_GT/H04.png
  • datasets/Dibco/2009/handwritten_GT/H05.png

from document-image-binarization.

Related Issues (13)

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.