Giter VIP home page Giter VIP logo

Comments (1)

herobd avatar herobd commented on August 10, 2024

The project used two datasets, the IAM and RIMES. The objects in datasets/ are used to read them in their individual formats and then prepare the data for what the trainer and model expect. If you're wanting to use this on your own dataset/new language, I'd recommed looking at what I said here: #23

The data passed to the trainer from the __getitem__ function of the dataset objects is a dictionary with these elements:

  • image: Normalized to height of 64 pixels, range of -1 (background) to 1 (foreground/ink). Can be multiple images by the same author. (They'll all get appened in the same batch, but reshaped with the a_batch_size during style extraction)
  • gt: Plain text for the image(s)
  • label: IntTensor with the char indexes (startiing at 1) of the ground truth text for the image(s). Padded to be the same length.
  • label_lengths: IntTensor with the length of each label (before padding).
  • a_batch_size: (defined in collate function) The number consecutive images by the same author.
  • name: ID for each image (for display purposes)
  • author: author (for display purposes)

You'll see a couple more things returned from the actually dataset files, but they aren't used by the trainer.

from handwriting_line_generation.

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.