Morocco BO Region Proposal β PP-DocLayout-L Fine-tuned
Fine-tuned PP-DocLayout-L (RT-DETR-L, ~31M params / ~124 MB) on Moroccan Bulletin Officiel layout annotations for class-aware region proposal.
Run tag: 24_07_new_method (24 Jul 2026)
Demo Space: morocco-bo-region-proposal-demo
Training summary
| Metric | Value |
|---|---|
| Base model | PP-DocLayout-L |
| Run tag | 24_07_new_method |
| Dataset | BO export (BO_export_last), 30 docs / 1,625 pages |
| Train samples (after rare-class oversampling) | 1,847 |
| Val samples | 174 |
| Classes | Official 23-class PP-DocLayout taxonomy |
| Best val mAP | 0.701 (epoch 38) |
| Early stopped | True (patience 15) |
| Model size | ~123 MB inference weights |
Evaluation (val + test, IoU 0.5, class-agnostic)
| Metric | Fine-tuned | Pretrained baseline |
|---|---|---|
| Precision | 0.8952 | 0.1206 |
| Recall | 0.7100 | 0.4085 |
| F1 | 0.7919 | 0.1863 |
Usage (PaddleOCR)
from huggingface_hub import snapshot_download
from paddleocr import LayoutDetection
model_dir = snapshot_download(
"AvoCahDoe/region-proposal-pp-doclayout-l-bo",
allow_patterns=["inference/*"],
) + "/inference"
det = LayoutDetection(
model_dir=model_dir,
model_name="PP-DocLayout-L",
enable_mkldnn=False,
)
output = det.predict("page.png", layout_nms=True, threshold=0.5)
for res in output:
data = res.json if hasattr(res, "json") else {}
for box in data.get("res", data).get("boxes", []):
print(box.get("label"), box.get("score"), box.get("coordinate"))
Repository layout
inference/ # Exported Paddle inference model
metadata/ # training config, logs, evaluation JSON
metrics/ # mirrored early_stop / metrics / eval JSON
plots/ # training + comparison plots
evaluation/plots/ # before/after overlays and training curves
Classes
23 PP-DocLayout labels including text, doc_title, paragraph_title, table, header, footer, reference, image, and more. See inference/inference.yml and metadata/config/pp_doclayout_categories.yaml.
Model tree for AvoCahDoe/region-proposal-pp-doclayout-l-bo
Base model
PaddlePaddle/PP-DocLayout-L