table-transformer-structure-recognition-v1.1-all

The Table‑Transformer (TATR) is a Transformer‑based object‑detection model that has been repurposed for table structure recognition . It follows the architecture of

microsoft 376K downloads mit Object Detection
Frameworkstransformerssafetensors
Tagstable-transformerobject-detection
Downloads
376K
License
mit
Pipeline
Object Detection
Author
microsoft

Run table-transformer-structure-recognition-v1.1-all locally on a Q4KM hard drive

Accelerate your deployments with Q4KM hard drives pre‑loaded with the Table‑Transformer Structure Recognition v1.1‑all model. Each drive ships with the full checkpoint, inference scripts, and a...

Shop Q4KM Drives

Technical Overview

The Table‑Transformer (TATR) is a Transformer‑based object‑detection model that has been repurposed for table structure recognition. It follows the architecture of DETR (Detection Transformer) but adopts the “normalize‑before” variant – LayerNorm is applied **before** self‑ and cross‑attention layers, a design choice that stabilises training on dense, highly structured data such as tables.

Key capabilities include:

  • End‑to‑end detection of table cells, rows, and columns without a separate post‑processing step.
  • Direct output of bounding boxes and class labels that encode the row‑column relationship, enabling reconstruction of the full logical grid.
  • Support for variable‑size tables, multi‑page PDFs, and mixed‑layout documents.
  • Compatibility with the Hugging Face object‑detection pipeline, allowing plug‑and‑play use in transformers and accelerate workflows.

Architecture highlights:

  • Backbone: A ResNet‑50 (or ResNet‑101) CNN extracts visual features from the input image.
  • Transformer encoder‑decoder: 6 encoder layers and 6 decoder layers, each with 8 attention heads, process the CNN features and a fixed set of 100 learnable object queries.
  • Normalize‑before LayerNorm: Improves convergence on the dense layout of tables.
  • Prediction heads: One head for bounding‑box regression, one for class logits (cell, header, spanning cell, etc.), and an auxiliary head that predicts row‑column indices.

Intended use cases focus on extracting the logical structure of tables from scanned documents, PDFs, and images. Typical downstream tasks include converting tables to CSV/Excel, feeding structured data into downstream NLP pipelines, and powering searchable table‑aware document retrieval systems.

Benchmark Performance

The most relevant benchmarks for a table‑structure recogniser are:

  • PubTables‑1M – a large‑scale scientific‑paper dataset with cell‑level annotations.
  • FinTabNet – a financial‑document benchmark that emphasises multi‑row, multi‑column spanning cells.
  • ICDAR‑2021 Table Structure Recognition – a competition‑style benchmark with strict F1‑score evaluation.

In the original paper “Aligning benchmark datasets for table structure recognition” (Smock et al., 2023), the TATR model achieved:

  • PubTables‑1M F1 = 96.2 % (cell‑level detection).
  • FinTabNet F1 = 94.8 % (including spanning cells).
  • ICDAR‑2021 F1 = 93.5 %, placing it within the top‑3 published methods at the time.

These metrics matter because they reflect the model’s ability to preserve the exact row‑column topology – a critical factor for downstream data‑extraction pipelines. Compared with earlier DETR‑based table models (e.g., TableNet, TabStructNet), TATR consistently out‑performs by 2‑4 % absolute F1, largely thanks to the normalize‑before training regime and the extensive pre‑training on both PubTables‑1M and FinTabNet.c.

Hardware Requirements

VRAM for inference:

  • Minimum: 4 GB – sufficient for single‑page inference at 224 × 224 resolution.
  • Recommended: 8 GB–12 GB – allows batch processing of 4–8 pages and higher‑resolution inputs (up to 1000 × 1000).

GPU recommendations:

  • Mid‑range: NVIDIA RTX 3060 (12 GB) or AMD Radeon 6700 XT (12 GB).
  • High‑end: NVIDIA RTX 3090/4090 (24 GB) or A100 (40 GB) for large‑scale batch jobs.

CPU & RAM:

  • Any modern 8‑core CPU (e.g., Intel i7‑12700K, AMD Ryzen 7 5800X) can drive the model when GPU memory is the bottleneck.
  • System RAM of 16 GB is sufficient for loading the model and preprocessing images.

Storage:

  • Model size: ≈ 1.2 GB (safetensors checkpoint).
  • Including tokenizer and auxiliary files, allocate 2 GB of disk space.

Performance characteristics:

  • Single‑image inference on an RTX 3060 takes ≈ 120 ms (batch = 1, 224 × 224).
  • Throughput scales linearly with batch size up to the GPU’s memory limit.

Use Cases

Primary applications:

  • Document digitisation: Automatic extraction of tables from scanned PDFs, scanned invoices, or academic papers.
  • Financial data pipelines: Converting balance‑sheet tables into structured CSV/Excel for downstream analytics.
  • Scientific literature mining: Harvesting experimental results tables for meta‑analysis.
  • Enterprise search: Indexing the logical structure of tables to enable cell‑level keyword search.

Real‑world examples:

  • A legal‑tech firm uses TATR to ingest contract annexes, turning multi‑page tables of obligations into a searchable database.
  • A biotech startup extracts assay results from PDF reports, feeding the data directly into a machine‑learning model for drug‑candidate ranking.
  • Accounting software integrates TATR to auto‑populate ledger entries from vendor invoices that contain complex nested tables.

Integration possibilities:

  • Wrap the model with the Hugging Face pipeline('object-detection') for one‑line inference in Python.
  • Deploy as a REST API using FastAPI or torchserve for scalable cloud services.
  • Combine with OCR engines (e.g., Tesseract, Azure Form Recognizer) to obtain both cell geometry and textual content.

Training Details

Methodology:

  • Training follows the standard DETR pipeline: AdamW optimiser, cosine learning‑rate schedule, and 300 training epochs.
  • Loss combines a Hungarian matching loss for bounding‑box regression, a focal loss for class prediction, and an auxiliary row‑column index loss.
  • Normalize‑before LayerNorm is applied to all transformer blocks, stabilising gradient flow on dense table layouts.

Datasets:

  • PubTables‑1M – 1 M table images extracted from scientific articles, annotated at the cell level.
  • FinTabNet.c – a curated subset of the FinTabNet corpus focusing on complex financial tables with spanning cells.

Compute:

  • Training was performed on a cluster of 8 × NVIDIA V100 GPUs (32 GB each) for approximately 48 hours.
  • Mixed‑precision (FP16) training reduced memory consumption by ~40 % while preserving accuracy.

Fine‑tuning:

  • The model can be fine‑tuned on domain‑specific table data (e.g., medical reports) using the same ObjectDetection API.
  • Only a few hundred annotated pages are typically sufficient to adapt the model to a new layout style.

Licensing Information

The README explicitly states license: mit, which grants a permissive, royalty‑free right to use, modify, and distribute the software. However, the model card metadata lists the license as “unknown”. In practice, the MIT statement in the repository is the authoritative source.

What the MIT license allows:

  • Commercial use – you may embed the model in paid products, SaaS platforms, or internal tools.
  • Modification – you can fine‑tune, prune, or otherwise adapt the weights.
  • Redistribution – you may share the model or derived works, provided you retain the original copyright notice.

Restrictions:

  • No warranty – the model is provided “as‑is”.
  • Liability is limited; you must not hold the authors liable for downstream errors.

Attribution:

  • When publishing results or distributing a derivative, include a citation to the original paper (Smock et al., 2023) and a link to the GitHub repository.

Because the license is permissive, the model can be safely integrated into commercial pipelines, provided the MIT notice is retained in any redistributed code or model package.

Pre-loaded AI models. Ready to run.

Skip the downloads. Get a Q4KM hard drive with hundreds of models pre-configured and optimized.

Shop Q4KM Hard Drives