Ir para o conteúdo
ModelListadosExterno
Baixar

Surya Layout2

A lightweight document layout detection model used by Surya. It detects layout regions (text, tables, figures, headers, captions, equations, etc.) on a page image and runs on CPU or GPU.

TipoOtherVersãoRevision 0aee81dBnota

Fonte do modelo

Tipo
Other
Tamanho do arquivo
6,74–129 MB
Versão
vRevision 0aee81d
Atualizado
21 de out. de 2026
Downloads
15 mil
Fonte
Hugging Face

Descrição da fonte

Surya Layout (fast)

A lightweight document layout detection model used by Surya. It detects layout regions (text, tables, figures, headers, captions, equations, etc.) on a page image and runs on CPU or GPU.

This is the "fast" layout detector — a compact object detector that serves as a drop-in alternative to Surya's VLM-based layout model.

➡️ Documentation, installation, and everything else lives in the Surya repository.

Usage

Install Surya:

pip install surya-ocr

Point the fast layout predictor at this checkpoint:

from PIL import Image
from surya.fast_layout import FastLayoutPredictor

predictor = FastLayoutPredictor(checkpoint="hf://datalab-to/surya_layout2")
layout = predictor([Image.open("page.png")])

for box in layout[0].bboxes:
    print(box.label, box.bbox, box.position)  # region label, [x0,y0,x1,y1], reading-order index

Or make it the default so the CLI and library use it without an explicit path:

export FAST_LAYOUT_MODEL_CHECKPOINT="hf://datalab-to/surya_layout2"

License

Released under the AI Pubs OpenRAIL-M license (see LICENSE) — the same license as the surya-ocr-2 model weights.

Fontes

1 fonte
Hugging FacePrimárioVersão 0aee81d5fd9275c0582e545bf3a56944b1e75679
huggingface.co/datalab-to/surya_layout2/tree/0aee81d5fd9275c0582e545bf3a56944b1e75679

Verificado 21 de out.

Artefatos de modelo

2 artefatos

order/order_ar.pt

pt · 6,74 MB · SHA-256 f381c3854801…3ad8 · Hugging Face

Baixar

rfdetr_layout.pth

pth · 129 MB · SHA-256 e01b79f85877…9fe7 · Hugging Face

Baixar

Trechos de fonte

3 trechos

--- license: openrail license_link: LICENSE tags: - object-detection - document-layout-analysis - ocr library_name: surya --- # Surya Layout (fast) A lightweight document **layout detection** model used by [Surya](https://github.com/datalab-to/surya). It detects layout regions (text, tables, figures, headers, captions, equations, etc.) on a page image and runs on CPU or GPU. This is the "fast" layout detector — a compact object detector that serves as a drop-in alternative to Surya's VLM-based layout model. ➡️ **Documentation, installation, and everything else lives in the [Surya repository](https://github.com/datalab-to/surya).** ## Usage Install Surya: ```shell pip install surya-ocr ``` Point the fast layout predictor at this checkpoint: ```python from PIL import Image from surya.fast_layout import FastLayoutPredictor predictor = FastLayoutPredictor(checkpoint="hf://datalab-to/surya_layout2") layout = predictor([Image.open("page.png")]) for box in layout[0].bboxes: print(box.label, box.bbox, box.position) # region label, [x0,y0,x1,y1], reading-order index ``` Or make it the default so the CLI and library use it without an explicit path: ```shell export FAST_LAYOUT_MODEL_CHECKPOINT="hf://datalab-to/surya_layout2" ``` ## License Released under the AI Pubs OpenRAIL-M license (see `LICENSE`) — the same license as the [surya-ocr-2](https://huggingface.co/datalab-to/surya-ocr-2) model weights.

Source context: 14963 downloads · 8 likes · Pipeline object-detection · Library surya · Repo datalab-to/surya_layout2

Source context: 9529 downloads · 4 likes · Pipeline object-detection · Library surya · Repo datalab-to/surya_layout2