Skip to content
ModelListedExternal
Download

Tibetan Modern Book Layout Detection RFDETR

Permissive (Apache-2.0) alternative in TiBLA (Tibetan Book Layout Analysis) — a lighter, PyTorch-native RF-DETR-L detector for the page layout of modern Tibetan books (headers, text area, footers, footnotes).

KindOtherVersionRevision 74d2991Cgrade

Model source

Kind
Other
File size
132 MB
Version
vRevision 74d2991
Updated
Oct 10, 2026
Downloads
0
Source
Hugging Face

Source description

TiBLA-RFDETR

Permissive (Apache-2.0) alternative in TiBLA (Tibetan Book Layout Analysis) — a lighter, PyTorch-native RF-DETR-L detector for the page layout of modern Tibetan books (headers, text area, footers, footnotes).

Task

A 4-class detector — header, text-area, footer, footnote — kept as four classes at training time. Evaluation folds them into a 3-class canonical scheme: header+footer are combined into one header-footer class (matched individually, merged losslessly afterwards), text-area is merged to a single page/column envelope as a post-processing step (two boxes only on genuine two-column pages), and footnote is left as-is. All numbers below are in that canonical space, on the leak-free TiBLAD v4 833-page test set, unified scorer (pycocotools bbox mAP 0.50:0.05:0.95; F1 by greedy IoU≥0.5 at the best-mean-F1 operating point).

Inference

# pip install rfdetr
from rfdetr import RFDETRLarge

model = RFDETRLarge.from_checkpoint("rfdetr_tibetan_book_layout.pth")
det = model.predict("page.jpg", threshold=0.47, shape=(1024, 1024))
# checkpoint class ids are offset by 1 (id 0 = background):
#   1 header, 2 text-area, 3 footnote, 4 footer

A ready-made infer.py (batch, YOLO-format output, per-class thresholds) is included in this repo. Recommended global operating confidence: 0.47 (the validation-selected best-mean-F1 point); the bundled infer.py also ships per-class max-F1 thresholds (header 0.46, text-area 0.32, footnote 0.26, footer 0.52).

Evaluation (TiBLAD v4, 833-page test)

metricTiBLA-RTDETRTiBLA-PP-DocLayout-LTiBLA-RFDETR
licenseAGPL-3.0Apache-2.0Apache-2.0
base modelRT-DETR-l (Ultralytics)PP-DocLayout-L (PaddleOCR, RT-DETR-L)RF-DETR-L (Roboflow)
mean F1 (canonical 3-class)0.9520.9550.921
header-footer F10.9540.9530.947
text-area F10.9990.9980.996
footnote F10.9020.9140.821
mean [email protected]0.9740.9590.925
mean AP@[0.50:0.95]0.7860.7810.667
shared-class mAP@[.50:.95] (DocLayNet-aligned)0.6500.6410.604
Hidden Trespass — header/footer0.0090.0040.021
Hidden Trespass — footnote0.0430.0370.178
COTe (Trespass)0.975 (0.001)0.978 (0.000)0.974 (0.002)
operating confidence0.640.610.47

"operating confidence" is the single global best-mean-F1 confidence, selected on the leak-free validation split and frozen for test (no test-set tuning). COCO AP rows are threshold-free (all detections above the fixed 0.05 floor).

Hidden Trespass = peripheral (header/footer/footnote) ground-truth area that survives in the actual OCR body crop C = E \ P, where E is the predicted text-area envelope and P is the union of the predicted peripheral boxes the pipeline subtracts; area-based, micro-averaged over the test set. Lower is better (less peripheral text bled into the OCR region). Formal definition in the paper.

Which checkpoint to pick

checkpointlicensemean F1shared mAPfootnote HT
TiBLA-RTDETR (primary)AGPL-3.00.9520.6500.043
TiBLA-PP-DocLayout-LApache-2.00.9550.6410.037
TiBLA-RFDETRApache-2.00.9210.6040.178

RT-DETR-l leads on mAP, shared-class mAP and the 5-seed mean F1 (0.961 ± 0.009), but its weights are AGPL-3.0 (Ultralytics). If you need a permissive license, PP-DocLayout-L is an Apache-2.0 match (statistically on par on F1); RF-DETR is a lighter PyTorch-native Apache-2.0 option.

Citation

@misc{tibla2026,
  title        = {TiBLA: Tibetan Book Layout Analysis},
  author       = {Buddhist Digital Resource Center (BDRC)},
  year         = {2026},
  howpublished = {\url{https://github.com/buda-base/tibla}},
  note         = {arXiv link forthcoming}
}

Sources

1 source
Hugging FacePrimaryVersion 74d29917ab519dcc651c09a4628fcde197e1d278
huggingface.co/BDRC/TiBLA-RFDETR/tree/74d29917ab519dcc651c09a4628fcde197e1d278

Verified Oct 10

Model artifacts

1 artifact

rfdetr_tibetan_book_layout.pth

pth · 132 MB · SHA-256 4ef818620f9f…52a1 · Hugging Face

Download file

Source excerpts

3 excerpts

--- license: apache-2.0 tags: - object-detection - document-layout-analysis - tibetan - rf-detr - tibla pipeline_tag: object-detection datasets: - BDRC/TiBLAD --- # TiBLA-RFDETR **Permissive (Apache-2.0) alternative in TiBLA (Tibetan Book Layout Analysis)** — a lighter, PyTorch-native RF-DETR-L detector for the page layout of modern Tibetan books (headers, text area, footers, footnotes). - **Base model / provenance:** [RF-DETR-L](https://github.com/roboflow/rf-detr) (Roboflow, DINOv2 backbone), fine-tuned on the leak-free **v4** `tam2col` split of TiBLAD. - **License:** Apache-2.0. - **Dataset:** [BDRC/TiBLAD](https://huggingface.co/datasets/BDRC/TiBLAD) - **Paper:** [buda-base/papers](https://github.com/buda-base/papers) (`papers/2026-tibetan-book-layout`) — *arXiv link forthcoming* - **Code:** [github.com/buda-base/tibla](https://github.com/buda-base/tibla) ## Task A **4-class** detector — `header`, `text-area`, `footer`, `footnote` — kept as four classes at training time. Evaluation folds them into a **3-class canonical scheme**: `header`+`footer` are combined into one `header-footer` class (matched individually, merged losslessly afterwards), `text-area` is merged to a single page/column envelope as a post-processing step (two boxes only on genuine two-column pages), and `footnote` is left as-is. All numbers below are in that canonical space, on the leak-free TiBLAD **v4** 833-page test set, unified scorer (pycocotools bbox mAP 0.50:0.05:0.95; F1 by greedy IoU≥0.5 at the best-mean-F1 operating point). ## Inference ```python # pip install rfdetr from rfdetr import RFDETRLarge model = RFDETRLarge.from_checkpoint("rfdetr_tibetan_book_layout.pth") det = model.predict("page.jpg", threshold=0.47, shape=(1024, 1024)) # checkpoint class ids are offset by 1 (id 0 = background): # 1 header, 2 text-area, 3 footnote, 4 footer ``` A ready-made `infer.py` (batch, YOLO-format output, per-class thresholds) is included in this repo. Recommended global operating confidence: **0.47** (the validation-selected best-mean-F1 point); the bundled `infer.py` also ships per-class max-F1 thresholds (`header` 0.46, `text-area` 0.32, `footnote` 0.26, `footer` 0.52). ## Evaluation (TiBLAD v4, 833-page test) | metric | TiBLA-RTDETR | TiBLA-PP-DocLayout-L | **TiBLA-RFDETR** | |---|---|---|---| | license | AGPL-3.0 | Apache-2.0 | **Apache-2.0** | | base model | RT-D...

--- license: apache-2.0 library_name: rfdetr pipeline_tag: object-detection language: - bo tags: - tibetan - document-layout-analysis - rf-detr - rfdetr - object-detection - bounding-box - BDRC datasets: - BDRC/TDLA-Training-Dataset-v2 metrics: - name: canonical mean AP50 (test) type: mAP value: 0.960 model-index: - name: Tibetan-Modern-Book-Layout-Detection-RFDETR results: - task: type: object-detection dataset: name: TDLA-Training-Dataset-v2 (test) type: BDRC/TDLA-Training-Dataset-v2 metrics: - type: mAP name: [email protected] (native, test) value: 0.996 - type: mAP name: [email protected]:0.95 (native, test) value: 0.813 --- # Tibetan Modern Book Layout Detection (RF-DETR-L) An **RF-DETR-L** ([Roboflow](https://github.com/roboflow/rf-detr), DINOv2 backbone) object detector that locates the four structural regions of a **modern Tibetan book** page — **header**, **text-area**, **footnote**, **footer** — as a preprocessing step for OCR and etext production. - **Training code, recipes & write-up:** [buda-base/tibetan-book-layout-analysis](https://github.com/buda-base/tibetan-book-layout-analysis) - **Dataset:** [BDRC/TDLA-Training-Dataset-v2](https://huggingface.co/datasets/BDRC/TDLA-Training-Dataset-v2) (gated, fair-use) > This is one of several architectures BDRC fine-tuned on the same labels and > recipe to test how much the choice of architecture matters (see the > [blog post](https://github.com/buda-base/tibetan-book-layout-analysis/blob/main/BLOGPOST.md)). > The primary, production release is the RT-DETR-l fine-tune at > [BDRC/Tibetan-Modern-Book-Layout-Detection-RTDETR](https://huggingface.co/BDRC/Tibetan-Modern-Book-Layout-Detection-RTDETR). > This RF-DETR-L checkpoint matches it almost exactly on every metric, and is > published as a **permissively-licensed (Apache-2.0) alternative** for anyone > who can't use the RT-DETR-l release's AGPL-derived training stack. ## Model description This is an RF-DETR-L fine-tuned with the **`tam2col`** labelling scheme: text-area boxes merged into one envelope per page, except on genuine two-column pages, where it keeps one box per column. Header and footer are kept as separate classes (they can be combined losslessly downstream). | Property | Value | | --- | --- | | Architecture | RF-DETR-L (via [`rfdetr`](https://github.com/roboflow/rf-detr), DINOv2-small windowed backbone) | | Task | Object detection | | Ba...

Source context: 0 downloads · 0 likes · Pipeline object-detection · Library rfdetr · Repo BDRC/Tibetan-Modern-Book-Layout-Detection-RFDETR