Skip to content

WalidHadri-Iron/awesome-table-detection-2026

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Awesome Table Detection

Tables from different domains: documents, photos, screenshots

A practical guide to table detection — finding where tables are in documents and images.

Whether you're building a document processing pipeline, extracting data from PDFs, or working with photos of tables, this repo helps you understand the landscape and pick the right tools.


What is table detection?

Table detection answers one question: "Where are the tables on this page?"

Input Output
A document page (PDF, scan, photo) Bounding boxes or polygons around each table

That's it. Table detection finds the regions — it doesn't extract the data inside (that's table structure recognition + OCR, which comes after).

Why it matters

Tables are everywhere: invoices, reports, scientific papers, forms, receipts. Before you can extract data from a table, you need to know where it is. Good detection is the foundation of any table extraction pipeline.

The two worlds of tables

Document tables Tables in the wild
PDFs, scans, reports, papers Photos, screenshots, whiteboards
Usually axis-aligned Often rotated, curved, perspective-distorted
Consistent layouts Varied lighting, occlusions, noise
Easier to detect Harder to detect

Quick start: Which solution should I use?

flowchart TD
    A[What's your input?] --> B{PDF with<br>selectable text?}
    B -->|Yes| C[Try heuristic tools first]
    C --> C1[Tabula / Camelot]
    C1 --> C2{Works well?}
    C2 -->|Yes| DONE[Done!]
    C2 -->|No| D

    B -->|No| D{Scans or<br>document images?}
    D -->|Yes| E{Want to train<br>your own?}

    E -->|No| E1[Use pretrained models]
    E1 --> E1a[Table Transformer]
    E1 --> E1b[Docling]
    E1 --> E1c[Surya]

    E -->|Yes| E2[Train custom detector]
    E2 --> E2a[YOLO + DocLayNet/PubTables]
    E2 --> E2b[Detectron2 / MMDetection]
    E2 --> E2c[Fine-tune TATR]

    D -->|No| F{Photos or<br>screenshots?}
    F -->|Yes| G[Use wild-trained models]
    G --> G1[Fine-tune on TabRecSet/WTW]
    G --> G2[Consider polygon detectors]

    A --> H{No labeled<br>data?}
    H -->|Yes| I[Bootstrap with VLMs]
    I --> I1[Grounding DINO]
    I --> I2[Florence-2 Table Detection]
    I --> I3[Then train a dedicated detector]
Loading
Your situation Recommended approach Tools
Clean PDFs (selectable text) Heuristic extraction Tabula, Camelot
Scans / images (use pretrained) Ready-to-use models Table Transformer, Docling, Surya
Scans / images (train your own) Custom training YOLO, Detectron2, MMDetection
Photos / wild tables Domain-specific models Train on TabRecSet or WTW
No labeled data VLM bootstrapping Grounding DINO, Florence-2

For detailed guidance, see Choosing a solution


Key datasets

Document tables

Dataset Size Best for Link
PubTables-1M 575k pages Scientific PDFs HuggingFace
DocLayNet 80k pages Business documents GitHub
PubLayNet 360k pages Layout detection GitHub
TableBank 417k tables Pretraining GitHub

Wild / camera tables

Dataset Size Best for Link
TabRecSet 32k images Real-world scans GitHub
WTW 14k images Distortions, occlusions GitHub

Diverse document tables

Dataset Size Best for Link
STDW 7k images Diverse document layouts GitHub

Full dataset catalog: Datasets documentation


Popular models

Model Type Speed Best for Link
Table Transformer (TATR) DETR Medium Document tables HuggingFace
YOLO fine-tunes One-stage Fast Production, high volume Ultralytics
CascadeTabNet Mask R-CNN Slower High accuracy GitHub
Grounding DINO Open-vocab Medium Zero-shot, weak labeling GitHub

Full model guide: Model families


Document processing pipelines

If you want a complete solution (not just detection):

Tool What it does Link
Docling PDF → structured data (tables, text, figures) GitHub
Unstructured Document ETL for LLMs GitHub
Marker PDF → Markdown GitHub
deepdoctection Configurable DocAI pipelines GitHub

Repo structure

docs/                      # Start here — narrative guides
├── 00-scope-and-definitions.md   # What is table detection?
├── 01-history-timeline.md        # How we got here
├── 02-problem-decomposition.md   # Breaking down the problem
├── 03-datasets.md                # All the datasets
├── 04-model-families.md          # Types of detectors
├── 05-evaluation-and-benchmarks.md  # How to measure success
├── 06-open-source-solutions.md   # Free tools
├── 07-commercial-solutions.md    # Cloud APIs
├── 08-vlms-and-weak-labeling.md  # Using VLMs for detection
└── 09-choosing-a-solution.md     # Decision guide

model-zoo/                 # Curated model cards
├── document-layout-detectors.md
├── table-only-detectors.md
├── vlm-grounded-detectors.md
└── yolo-recipes.md

datasets/                  # Dataset quick-reference
├── documents.md           # PDF/scan datasets
└── in-the-wild.md         # Photo/camera datasets

evaluation/                # Metrics and protocols
├── metrics.md             # AP, IoU, F1 explained
└── protocols.md           # Standardized evaluation

resources/                 # Links and references
├── papers-and-surveys.md  # Key papers
├── github-and-hf-links.md # Quick links
└── communities.md         # Where to get help

How to navigate this repo

If you want to... Go to...
Understand the basics Scope and definitions
Pick a solution quickly Choosing a solution
Find a dataset Datasets
Compare models Model families
Evaluate fairly Evaluation
Use VLMs for labeling VLMs and weak labeling
Find papers Papers and surveys
Get quick links GitHub and HF links

Key takeaways

  1. Table detection ≠ table extraction — detection finds regions, extraction gets the data
  2. Domain matters more than architecture — a model trained on your document type beats a "better" model trained on different data
  3. Start simple — heuristic tools work great on clean PDFs; don't over-engineer
  4. Preprocessing is critical — PDF rasterization DPI, resize policy, and augmentations often matter more than model choice
  5. VLMs are enablers, not replacements — use them to bootstrap labels, not as your production detector

Contributing

Found a missing dataset? Know a better model? See CONTRIBUTING.md.


License

See LICENSE.

About

A compact, curated overview of table detection (localizing table regions) across documents and in-the-wild images.

Topics

Resources

License

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors