Lightweight, performant, deep table extraction
Maintained. Last release 4 months ago, commits in 2 of the last 26 weeks. Weaker on commit activity and release cadence.
pip install gmftgmft
There are many pdfs out there, and many of those pdfs have tables. But despite a plethora of table extraction options, there is still no definitive extraction method.
About
gmft converts pdf tables to many formats. It is lightweight, modular, and performant. Batteries included: it just works, offering strong performance with the default settings.
It relies on microsoft's Table Transformers, qualitatively the most performant and reliable of the many alternatives.
Install: pip install gmft
Quickstarts: demo notebook, bulk extract, readthedocs.
Documentation: readthedocs
Why should I use gmft?
Fast, lightweight, and performant, gmft is a great choice for extracting tables from pdfs.
The extraction quality is superb: check out the bulk extract notebook for approximate quality. When testing the same tables across many table extraction options, gmft fares extremely well.
Many Formats
We support the following export options:
- Pandas dataframe
- By extension: markdown, latex, html, csv, json, etc.
- List of text + positions
- Cropped image of table
- Table caption
Cropped images can be passed into a vision recognizer, like:
- GPT-4 vision
- Mathpix/Adobe/Google/Amazon/Azure/etc.
- Or saved to disk for human evaluation
Lightweight
gmft is very lightweight. It can run on cpu - no GPU necessary.