No description
  • Python 99.6%
  • Makefile 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Michele Dolfi 44197944f4
chore: update locked deps and address eMudhra CA incident (#200)
Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
2026-10-21 15:40:30 +02:00
.github chore: update locked deps and address eMudhra CA incident (#200) 2026-10-21 15:40:30 +02:00
docling_ibm_models ci: switch to ruff, ty and prek, and add PR fast checks (#196) 2026-10-21 14:48:16 +02:00
docs docs: Optimize images (#6) 2024-07-17 11:25:09 +02:00
tests ci: switch to ruff, ty and prek, and add PR fast checks (#196) 2026-10-21 14:48:16 +02:00
.gitignore fix: correct graphics-to-captions assignment in reading order (#183) 2026-08-28 08:47:48 +02:00
.pre-commit-config.yaml chore: update locked deps and address eMudhra CA incident (#200) 2026-10-21 15:40:30 +02:00
CHANGELOG.md chore: bump version to 4.0.4 [skip ci] 2026-10-21 11:33:21 +00:00
CODE_OF_CONDUCT.md Initial commit 2024-07-15 11:23:59 +02:00
CONTRIBUTING.md ci: switch to ruff, ty and prek, and add PR fast checks (#196) 2026-10-21 14:48:16 +02:00
LICENSE chore: fix placeholders in license (#20) 2024-09-06 16:48:31 +02:00
MAINTAINERS.md Initial commit 2024-07-15 11:23:59 +02:00
Makefile ci: switch to ruff, ty and prek, and add PR fast checks (#196) 2026-10-21 14:48:16 +02:00
pyproject.toml ci: switch to ruff, ty and prek, and add PR fast checks (#196) 2026-10-21 14:48:16 +02:00
README.md ci: switch to ruff, ty and prek, and add PR fast checks (#196) 2026-10-21 14:48:16 +02:00
run_tf.py feat!: New API for models initialization with accelerators parameters. Use HF implementation for LayoutPredictor. Migrate models to safetensors format. (#50) 2024-12-11 12:55:27 +01:00
uv.lock chore: update locked deps and address eMudhra CA incident (#200) 2026-10-21 15:40:30 +02:00

PyPI version PyPI - Python Version uv Ruff prek Models on Hugging Face License MIT

Docling IBM models

AI modules to support the Docling PDF document conversion project.

  • TableFormer is an AI module that recognizes the structure of a table and the bounding boxes of the table content.

Install

The package provides two variants which allow to seemlessly switch between opencv-python and opencv-python-headless.

# Option 1: with opencv-python-headless
pip install "docling-ibm-models[opencv-python-headless]"

# Option 2: with opencv-python
pip install "docling-ibm-models[opencv-python]"

Pipeline Overview

Architecture

Datasets

Below we list datasets used with their description, source, and "TableFormer Format". The TableFormer Format is our processed version of the version of the original format to work with the dataloader out of the box, and to augment the dataset when necassary to add missing groundtruth (bounding boxes for empty cells).

Name Description URL
PubTabNet PubTabNet contains heterogeneous tables in both image and HTML format, 516k+ tables in the PubMed Central Open Access Subset PubTabNet
FinTabNet A dataset for Financial Report Tables with corresponding ground truth location and structure. 112k+ tables included. FinTabNet
TableBank TableBank is a new image-based table detection and recognition dataset built with novel weak supervision from Word and Latex documents on the internet, contains 417K high-quality labeled tables. TableBank

Models

TableModel04:

TableModel04 TableModel04rs (OTSL) is our SOTA method that using transformers in order to predict table structure and bounding box.

Configuration file

Example configuration can be found inside test tests/test_tf_predictor.py These are the main sections of the configuration file:

  • dataset: The directory for prepared data and the parameters used during the data loading.
  • model: The type, name and hyperparameters of the model. Also the directory to save/load the trained checkpoint files.
  • train: Parameters for the training of the model.
  • predict: Parameters for the evaluation of the model.
  • dataset_wordmap: Very important part that contains token maps.

Model weights

You can download the model weights and config files from the links:

Inference Tests

You can run the inference tests for the models with:

python -m pytest tests/

This will also generate prediction and matching visualizations that can be found here: tests\test_data\viz\

Visualization outlines:

  • Light Pink: border of recognized table
  • Grey: OCR cells
  • Green: prediction bboxes
  • Red: OCR cells matched with prediction
  • Blue: Post processed, match
  • Bold Blue: column header
  • Bold Magenta: row header
  • Bold Brown: section row (if table have one)