Skip to content

Training data generator for Text Detection and Text Recognition

Notifications You must be signed in to change notification settings

xReniar/OCR-Dataset-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OCR dataset generator

Training data generator for Text Detection and Text Recognition. The training data will be generated following the format specified by the various supported OCR systems. The supported OCR systems are:

At the moment the datasets that can be used to generate the training data are:

Setup

Install the requirements:

pip3 install -r requirements.txt

Generate training data

To generate the training data check the ./config/config.json first. This json file specifies:

  • output: the output of the training data, stored in ./output/
  • ocr-system: the ocr system that will be trained, the choices are doctr, mmocr, paddleocr
  • tasks: specify if the training data is for detection, recognition or both.
    "tasks": ["det"]        # only det
    "tasks": ["rec"]        # only rec
    "tasks": ["det", "rec"] # both
  • datasets: specify which datasets are going to be used for the generation of the training data. To select the dataset just set it to y otherwise set it to n, example below:
    "dataset1": "y",        # selected
    "dataset2": {
        "sub1": "n",        # not selected
        "sub2": "y"         # selected
    }

When everything is set up just run:

python3 generate.py

Docs

About

Training data generator for Text Detection and Text Recognition

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages