- Bugfix: Added image submodule to setup.py
- Added an option to PDF synthesizing that attempts to correct incomplete and/or bad PDFs before synthesizing. This will result in more PDFs being synthesized and more of the PDFs' text being synthesized. The option requires you to have libreoffice installed. If using the docker image, libreoffice comes pre-installed.
- Basic Synthesizer: Do not synthesize zeros since prefixed and suffixed zeros are often stripped in amounts. E.g.
2340.00might be synthesized to0432.22which should've been written432.22but we can't detect this. Another example would be if the value in ground truth is2340.00and in the PDF it is written as2340. If we synthesize to0432.22in the ground truth, we'll have the incorrect amount of0432in the PDF.
- Do not trust font character mappings in PDF, instead scan PDF for all printed characters when determining which characters are available for synthesizing
- Added timeout to PDF synthesizing
- Additional usage of typing library
- Using typing library in
synthetic/core/synthesizer.py - Fixed indentation of docstring in
synthetic/image/poisson_blending.py
- Added image synthesizing. To use image synthesizing you need to also provide bounding boxes in the ground truth JSON for each label.
- Bugfix: mismatch between ground truth and document on subsequent runs targeting the same directory
- Now catching additional exceptions that might occur when synthesizing PDFs.
- Now checking
dst_dirfor existing files to avoid processing already processed PDFs. - Added optional
--max-fontsto specify the maximum number of fonts a PDF can contain for synthesizing. PDFs breaching the threshold will be discarded.
- Added optional
--num-outputs-per-documentto specify how many output PDFs to create per input PDF - Added optional
--max-pagesto specify the maximum number of pages a PDF can contain for synthesizing. PDFs breaching the threshold will be discarded.
- Save new PDFs in compressed non-qpdf mode