Skip to main content

Table Image Synthesis

Project description

Table Synthesis Library

Introduction

This is the Table Image Synthesis tool that can generate a number of template table images given a template, with a goal of providing similar images to fine-tune the table recognition model. This is done by keeping the table structure and changing the text inside it.

Usage

First, depending on the browser you use, get the corresponding driver executable with the browser (chromedriver.exe for Chrome or geckodriver.exe for Firefox) from the Internet. Then put the driver file in the same directory as your main file.

The full model usage can be found here:

from table_synthesis import SynthesizeTable

syn = SynthesizeTable(input_path='test',
                        out_path='test_out')

syn(num_synth=1)

Here, the input_path is the path to the folder with the gt.txt file (which is a label file exported from PPOCRLabel program), and optionally the extra html files in the html/ folder if using TableGeneration tool.

The out_path should be the folder containing the output (recommended empty).

Then initilalize the Synthesis class and run it to generate num_synth images from each label image.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

table_synthesis-1.0.0-py3-none-any.whl (14.0 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page