This page is being translated by your browser

Translation can break parts of Roboflow. If something stops working, turn translation off and reload the page.

Detection · Document AI & OCR

Document layout detection: Datasets & Models

Document layout detection locates and classifies structural regions in a page image, text blocks, tables, figures, and headers, so downstream OCR and parsing can process each element correctly.

Document layout detection example
1M+
developers
16k
organizations
50B
inferences

Document layout detection

This document layout detection workflow processes document page images and identifies the structural regions on each page, returning bounding boxes with class labels for text blocks, titles, tables, figures, captions, headers, and lists. It accepts page images from PDFs, scans, or photos as input, giving downstream OCR and parsing systems the region boundaries they need to process each element separately.

Try it out

Powered by general detection model

Run on custom image

Drop an image here or click to upload

Detecting classes:

Why automate document layout detection

Manually annotating or hard-coding rules for document structure breaks down fast: forms, invoices, research papers, and financial reports all use different layouts, and rule-based parsers fail whenever a table shifts or a column count changes. Automating layout detection with a vision model means the system identifies tables, figures, and text blocks directly from the pixels, regardless of template, so OCR reads content in the correct reading order and tables aren't flattened into garbled text. For Document AI and OCR teams, this removes the brittle preprocessing step that otherwise dominates engineering time and error rates.

Key benefits

Detecting layout regions before extraction dramatically improves downstream OCR accuracy and preserves reading order, table integrity, and figure boundaries. The models run on standard page-image inputs and slot into existing document ingestion pipelines without new capture hardware. Because detection generalizes across templates, a single model scales to millions of pages spanning many document types.

How to use it

  1. Upload an image: Drop any photo into the widget above to try document layout detection for free, right on this page.
  2. Preview instant results: The model detects text block, table, figure, title, list within seconds and returns an annotated image with structured predictions, so you can immediately see how well it works. Adjust the detection classes and re-run until the results fit your scenario.
  3. Like what you see?: With a free Roboflow account, you can deploy this workflow with the Serverless Cloud API, customize it in your workspace, or train RF-DETR on your own images for production accuracy.
  4. Get started for free: No code or training data required to begin: upload, review the results, and make it part of your stack in a single click.
Recommended model

Recommended model for document layout detection

RF-DETR is state of the art for real-time object detection, instance segmentation, and keypoint detection, with higher accuracy and lower latency than comparable models, and it's Apache 2.0 licensed. When you're ready to build a production model for document layout detection, fine-tune it on your own labeled images, then deploy to a Serverless Cloud API endpoint.

Train your own model
Roboflow Agent

Not sure where to start?

Describe your Document Layout Detection project to Roboflow Agent.

Agent