davanstrien HF Staff commited on
Commit
364d61b
·
verified ·
1 Parent(s): d1b1a48

Add pp-doclayout.py to README (layout detection, separate from OCR)

Browse files
Files changed (1) hide show
  1. README.md +17 -1
README.md CHANGED
@@ -7,7 +7,7 @@ tags: [uv-script, ocr, vision-language-model, document-processing, hf-jobs]
7
 
8
  > Part of [uv-scripts](https://huggingface.co/uv-scripts) - ready-to-run ML tools powered by UV and HuggingFace Jobs.
9
 
10
- 20 OCR scripts covering models from 0.3B to 8B parameters. Pick a model, point at your dataset, get markdown — no setup required.
11
 
12
  ## 🚀 Quick Start
13
 
@@ -56,6 +56,22 @@ That's it! The script will:
56
 
57
  </details>
58
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  ## Common Options
60
 
61
  All scripts accept the same core flags. Model-specific defaults (batch size, context length, temperature) are tuned per model based on model card recommendations and can be overridden.
 
7
 
8
  > Part of [uv-scripts](https://huggingface.co/uv-scripts) - ready-to-run ML tools powered by UV and HuggingFace Jobs.
9
 
10
+ 20 OCR scripts (text extraction) + 1 layout-detection script. Pick a model, point at your dataset, get markdown — no setup required. Layout-detection runs separately when you need bboxes for regions (text/title/table/figure/...) rather than the text itself.
11
 
12
  ## 🚀 Quick Start
13
 
 
56
 
57
  </details>
58
 
59
+ ## Layout detection (not OCR)
60
+
61
+ `pp-doclayout.py` runs PaddleOCR's [PP-DocLayout-L](https://huggingface.co/PaddlePaddle/PP-DocLayout-L) (or M / S / plus-L) and emits per-image **bounding boxes + region classes** (text, title, table, figure, formula, list, header, footer, ...) — it does NOT extract text. Useful for filtering pages, cropping regions for downstream OCR, dataset analysis, and training-data prep.
62
+
63
+ | Script | Model | Size | Backend | Notes |
64
+ |--------|-------|------|---------|-------|
65
+ | `pp-doclayout.py` | [PP-DocLayout-L](https://huggingface.co/PaddlePaddle/PP-DocLayout-L) | 123M | paddleocr | Layout bboxes (no text). Bucket support: incremental parquet shards, resumable. |
66
+
67
+ ```bash
68
+ hf jobs uv run --flavor l4x1 -s HF_TOKEN \
69
+ https://huggingface.co/datasets/uv-scripts/ocr/raw/main/pp-doclayout.py \
70
+ your-dataset your-layout-output --max-samples 10
71
+ ```
72
+
73
+ Source/sink can be either an HF dataset repo OR an `hf://buckets/...` URL (auto-detected). Bucket output writes incremental zstd parquet shards via the buckets API — resumable across runs (snapshot-backed source listing) and no git/commit overhead. See the script's `--help` for all flags.
74
+
75
  ## Common Options
76
 
77
  All scripts accept the same core flags. Model-specific defaults (batch size, context length, temperature) are tuned per model based on model card recommendations and can be overridden.