Soxavin commited on
Commit
10fb0eb
·
verified ·
1 Parent(s): c6ad176

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +95 -47
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- license: mit
3
  task_categories:
4
  - object-detection
5
  language:
@@ -8,60 +8,108 @@ tags:
8
  - document-layout
9
  - khmer
10
  - coco
11
- pretty_name: ARDB Daily Bulletin Layout (COCO) v1
 
 
 
 
 
 
 
 
 
 
 
 
12
  ---
13
 
14
- # ARDB Daily Bulletin Layout Detection — v1 (COCO format)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
- Document-layout detection dataset built from **ARDB (Agricultural and Rural Development Bank
17
- of Cambodia) daily market-price bulletins** — born-digital Khmer PDFs with one price table per
18
- page. Purpose: fine-tune a layout detector (YOLO-class) for a Khmer financial-document OCR
19
- pipeline at GDDE/MEF.
20
 
21
- ## Contents
 
 
 
 
 
 
22
 
23
- | Split | Pages | Boxes | Documents |
24
- |---|---|---|---|
25
- | train | 73 | 341 | 24 bulletins |
26
- | valid | 9 | 42 | 3 bulletins |
27
- | test | 9 | 42 | 3 bulletins |
28
 
29
- The dataset is stored as self-contained Parquet shards under `data/` (one per split): page
30
- images (JPG, rendered at 200 DPI) are embedded, so the Data Viewer shows one tabular row per
31
- page — the image beside its annotations.
 
 
 
 
 
 
32
 
33
  ```python
34
  from datasets import load_dataset
35
- ds = load_dataset("<repo_id>") # splits: train / validation / test
 
 
 
 
 
36
  ```
37
 
38
- **Columns:** `image` (embedded page image) · `image_id` · `file_name` · `doc_id` ·
39
- `source` (originating bulletin PDF — provenance) · `width` · `height` · `objects`, a struct
40
- of per-box lists carrying the full COCO fields: `id`, `bbox` (`[x, y, width, height]` in
41
- pixels), `category_id`, `category` (readable label), `area`, `iscrowd`, `score`
42
- (pseudo-label confidence; 1.0 after human correction).
43
-
44
- **Classes (5), category id order:** 0 `Table`, 1 `Text`, 2 `Section-Header`,
45
- 3 `Page-Furniture` (page headers/footers), 4 `Picture` (logos/stamps).
46
- Exactly one `Table` box per page, covering the full table **including header row and label
47
- columns** (a deliberate rule: off-the-shelf detectors clipping label columns was a measured
48
- failure mode).
49
-
50
- ## Provenance & method
51
-
52
- 1. Source PDFs: publicly published ARDB daily bulletins (June–July 2026), rendered at 200 DPI.
53
- 2. **Pseudo-labels** generated by Surya layout detection (`surya-ocr` 2.x), mapped to the
54
- 5-class set, confidence-filtered at 0.5.
55
- 3. **Human correction pass** in Roboflow (model-assisted labeling): fragmented table boxes
56
- merged to one per page, box edges tightened, labels fixed, junk boxes removed.
57
- 4. Split is **by document** (no bulletin's pages straddle splits) to prevent
58
- near-duplicate-page leakage; assignment is deterministic (seed 0).
59
-
60
- ## Caveats
61
-
62
- - **Single-template corpus:** all 30 bulletins share one layout. valid/test measure
63
- label quality, not cross-template generalization evaluate generalization on held-out
64
- document types (budget/TOFE reports, gas-price bulletins) via the downstream pipeline harness.
65
- - Pseudo-labels originate from Surya (weights under a modified OpenRAIL-M licence); this
66
- dataset is intended for **private/internal training use** pending a licence review for any
67
- public redistribution.
 
1
  ---
2
+ license: cc-by-nc-4.0
3
  task_categories:
4
  - object-detection
5
  language:
 
8
  - document-layout
9
  - khmer
10
  - coco
11
+ - object-detection
12
+ pretty_name: ARDB Daily Bulletin Layout (COCO)
13
+ size_categories:
14
+ - n<1K
15
+ configs:
16
+ - config_name: default
17
+ data_files:
18
+ - split: train
19
+ path: data/train-*
20
+ - split: validation
21
+ path: data/validation-*
22
+ - split: test
23
+ path: data/test-*
24
  ---
25
 
26
+ # ARDB Daily Bulletin Layout Detection (COCO)
27
+
28
+ A document-layout **object-detection** dataset built from **ARDB (Agricultural and Rural
29
+ Development Bank of Cambodia) daily market-price bulletins** — born-digital Khmer-language PDFs,
30
+ one price table per page. Every page is annotated with bounding boxes for five layout regions
31
+ (table, text, section header, page furniture, picture).
32
+
33
+ Each row is a full page image rendered at **200 DPI (2000 × 2000 px, JPG)** with its box
34
+ annotations embedded, so the Dataset Viewer shows the image beside its labels.
35
+
36
+ ## Dataset structure
37
+
38
+ | Split | Pages | Boxes | Source documents |
39
+ |------------|------:|------:|-----------------:|
40
+ | train | 73 | 341 | 24 bulletins |
41
+ | validation | 9 | 42 | 3 bulletins |
42
+ | test | 9 | 42 | 3 bulletins |
43
+ | **total** | **91**| **425**| **30 bulletins** |
44
+
45
+ ### Fields
46
+
47
+ | Column | Type | Description |
48
+ |-------------|-----------------|-------------|
49
+ | `image` | image | Embedded page image (JPG, 2000 × 2000). |
50
+ | `image_id` | int64 | Row index within the split. |
51
+ | `file_name` | string | Source image file name. |
52
+ | `doc_id` | string | Identifier of the originating bulletin. |
53
+ | `source` | string | Originating PDF (provenance). |
54
+ | `width` | int64 | Image width in pixels. |
55
+ | `height` | int64 | Image height in pixels. |
56
+ | `objects` | struct of lists | Per-box annotations (see below). |
57
 
58
+ `objects` is a struct of parallel lists carrying the full COCO annotation fields:
 
 
 
59
 
60
+ - `id` — annotation id
61
+ - `bbox` — `[x, y, width, height]` in pixels (COCO convention)
62
+ - `category_id` — class index (0–4, see below)
63
+ - `category` — human-readable class name
64
+ - `area` — box area in px²
65
+ - `iscrowd` — always `0`
66
+ - `score` — annotation confidence (`1.0`, human-verified)
67
 
68
+ ### Classes
 
 
 
 
69
 
70
+ | id | name | Boxes | Notes |
71
+ |----|------------------|------:|-----------------------------------------|
72
+ | 0 | `Table` | 91 | The price table exactly one per page, covering the full table including header row and label columns. |
73
+ | 1 | `Text` | 30 | Body / paragraph text. |
74
+ | 2 | `Section-Header` | 31 | Headings and titles. |
75
+ | 3 | `Page-Furniture` | 182 | Page headers and footers. |
76
+ | 4 | `Picture` | 91 | Logos and stamps. |
77
+
78
+ ## Usage
79
 
80
  ```python
81
  from datasets import load_dataset
82
+
83
+ ds = load_dataset("Soxavin/ardb-layout-coco-v2") # splits: train / validation / test
84
+ row = ds["train"][0]
85
+ row["image"] # PIL image
86
+ row["objects"]["bbox"] # list of [x, y, w, h]
87
+ row["objects"]["category"] # list of class names
88
  ```
89
 
90
+ ## Data collection & annotation
91
+
92
+ 1. **Source.** Publicly published ARDB daily market-price bulletins, rendered page-by-page at
93
+ 200 DPI.
94
+ 2. **Pre-annotation.** Candidate boxes were generated automatically with a document-layout
95
+ detector and confidence-filtered, then mapped to the five-class set above.
96
+ 3. **Human correction.** Every page was reviewed and corrected in Roboflow: fragmented table
97
+ regions merged to one box per page, box edges tightened, mislabels fixed, and spurious boxes
98
+ removed. All final annotations carry `score = 1.0`.
99
+ 4. **Splitting.** Splits are assigned **by document** (no bulletin's pages appear in more than
100
+ one split) to prevent near-duplicate-page leakage. Assignment is deterministic.
101
+
102
+ ## Limitations
103
+
104
+ - **Single template.** All bulletins share one recurring page layout, so the validation and test
105
+ splits measure annotation quality rather than generalization across document designs.
106
+ - **Small scale.** 91 pages / 30 documents; suitable for fine-tuning and evaluation on this
107
+ document family, not as a general-purpose layout corpus.
108
+
109
+ ## License
110
+
111
+ The **annotations** in this dataset (bounding boxes, class labels, and metadata) are released
112
+ under **CC BY-NC 4.0** — free to use for non-commercial research with attribution. The **page
113
+ images** are reproductions of bulletins published by ARDB; they are included for research use
114
+ only, and users are responsible for complying with the source documents' terms. This dataset is
115
+ not affiliated with or endorsed by ARDB.