karma689 commited on
Commit
858be20
·
verified ·
1 Parent(s): fae1879

Update README: correct structure with citation, license, acknowledgements

Browse files
Files changed (1) hide show
  1. README.md +56 -71
README.md CHANGED
@@ -52,91 +52,76 @@ configs:
52
 
53
  # Danyig vs Pedri Binary Script Classification Dataset
54
 
55
- Stage-2 binary classifier dataset for distinguishing **Danyig** (དབྱངས་ཡིག) from **Pedri** (དཔེ་འབྲི) Tibetan manuscript scripts. This dataset is used after a stage-1 model merges the two into a single `danyig_pedri` class, recovering the finer distinction.
56
-
57
- 1,200 real page images: **960 train / 120 val / 120 test** — all human-reviewed, no synthetics.
58
-
59
- ## Class and split counts
60
-
61
- | Split | Danyig | Pedri | Total |
62
- |-------|-------:|------:|------:|
63
- | train | 480 | 480 | 960 |
64
- | val | 60 | 60 | 120 |
65
- | test | 60 | 60 | 120 |
66
- | **Total** | **600** | **600** | **1,200** |
67
-
68
- ## Subscript distribution
69
-
70
- Danyig has 5 subscripts (DraDring, DraRing, Drathung, Gongshabma, Tsegdrig).
71
- Pedri has 2 subscripts (Peri, Petsuk).
72
- Train and val proportions are balanced per subscript using Hamilton-remainder rounding.
73
-
74
- ### Train (960 images)
75
-
76
- | Subscript | Parent | Count |
77
- |-----------|--------|------:|
78
- | DraDring | Danyig | 13 |
79
- | DraRing | Danyig | 20 |
80
- | Drathung | Danyig | 113 |
81
- | Gongshabma | Danyig | 1 |
82
- | Tsegdrig | Danyig | 333 |
83
- | Peri | Pedri | 115 |
84
- | Petsuk | Pedri | 365 |
85
-
86
- ### Val (120 images)
87
-
88
- | Subscript | Parent | Count |
89
- |-----------|--------|------:|
90
- | DraDring | Danyig | 2 |
91
- | DraRing | Danyig | 2 |
92
- | Drathung | Danyig | 14 |
93
- | Gongshabma | Danyig | 1 |
94
- | Tsegdrig | Danyig | 41 |
95
- | Peri | Pedri | 14 |
96
- | Petsuk | Pedri | 46 |
97
-
98
- ### Test (120 images — benchmark holdout)
99
-
100
- | Subscript | Parent | Count |
101
- |-----------|--------|------:|
102
- | DraDring | Danyig | 25 |
103
- | DraRing | Danyig | 9 |
104
- | Drathung | Danyig | 17 |
105
- | Gongshabma | Danyig | 3 |
106
- | Tsegdrig | Danyig | 6 |
107
- | Peri | Pedri | 44 |
108
- | Petsuk | Pedri | 16 |
109
-
110
- ## Sampling methodology
111
-
112
- - **Seed**: 42 (fully deterministic)
113
- - **Work-level isolation**: the leakage unit is `work_id` (a BDRC manuscript work). All pages of a physical work land in exactly one split — no pages of the same manuscript appear in both train and val/test.
114
- - **Val-first greedy assignment**: works are assigned to val before train, largest-first within each subscript, to satisfy Hamilton-proportional targets.
115
- - **Test set**: drawn directly from the fixed benchmark holdout. Test counts match the benchmark reference exactly (no rounding).
116
- - **Shuffle**: train and val arrays are shuffled after assembly to prevent class/subscript clustering during training.
117
- - **Human review**: all train/val images were reviewed by a human annotator. Bad images (orientation errors, damaged pages, illegible script) were flagged and excluded. Substitutes were drawn on the fly from the same subscript to maintain quota.
118
 
119
  ## Parquet schema
120
 
121
  | Column | Type | Description |
122
  |--------|------|-------------|
123
- | `id` | string | BDRC page ID (e.g. `W3CN502-I3CN212840005`) |
124
- | `image_bytes` | image | Raw page image (TIF/JPG) |
125
  | `script` | string | `Danyig` or `Pedri` |
126
  | `script_type` | string | Subscript name (e.g. `Tsegdrig`, `Petsuk`) |
127
 
 
 
128
  ## Load in Python
129
 
130
  ```python
131
  from datasets import load_dataset
132
 
133
  ds = load_dataset("BDRC/danyig-pedri-binary-script-classifier")
134
- train = ds["train"]
135
- val = ds["validation"]
136
- test = ds["test"]
137
- print(len(train), len(val), len(test)) # 960 120 120
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  ```
139
 
140
- ## Source
 
 
 
 
141
 
142
- All images sourced from the [Buddhist Digital Resource Center (BDRC)](https://bdrc.io) manuscript archive. License: MIT.
 
52
 
53
  # Danyig vs Pedri Binary Script Classification Dataset
54
 
55
+ Stage-2 binary classifier for distinguishing **Danyig** (5 subscripts: DraDring, DraRing, Drathung, Gongshabma, Tsegdrig) from **Pedri** (2 subscripts: Peri, Petsuk). Real-only, all images human-reviewed.
56
+
57
+ ## Images per class
58
+
59
+ | Class | train | val | test | **All** |
60
+ |-------|------:|----:|-----:|--------:|
61
+ | Danyig | 480 | 60 | 60 | 600 |
62
+ | Pedri | 480 | 60 | 60 | 600 |
63
+ | **Total** | **960** | **120** | **120** | **1,200** |
64
+
65
+ ## Splits
66
+
67
+ Manuscript-stratified split — each manuscript work appears in exactly one of train / val / test (no data leakage across splits).
68
+
69
+ | Split | Images | Works |
70
+ |-------|-------:|------:|
71
+ | train | 960 | 555 |
72
+ | validation | 120 | 12 |
73
+ | test | 120 | 116 |
74
+ | **Total** | **1,200** | |
75
+
76
+ Page-level split manifest: [`splits/pedri-danyig_combined.json`](splits/pedri-danyig_combined.json).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
 
78
  ## Parquet schema
79
 
80
  | Column | Type | Description |
81
  |--------|------|-------------|
82
+ | `id` | string | BDRC page id (e.g. `W3CN502-I3CN212840005`) |
83
+ | `image_bytes` | binary | JPEG/PNG/TIF page image |
84
  | `script` | string | `Danyig` or `Pedri` |
85
  | `script_type` | string | Subscript name (e.g. `Tsegdrig`, `Petsuk`) |
86
 
87
+ See [`split_stats.json`](split_stats.json) and [`split_stats.md`](split_stats.md) for row-level counts.
88
+
89
  ## Load in Python
90
 
91
  ```python
92
  from datasets import load_dataset
93
 
94
  ds = load_dataset("BDRC/danyig-pedri-binary-script-classifier")
95
+ train = ds["train"] # 960
96
+ val = ds["validation"] # 120
97
+ test = ds["test"] # 120
98
+ ```
99
+
100
+ ```python
101
+ from io import BytesIO
102
+ from PIL import Image
103
+
104
+ row = train[0]
105
+ img = Image.open(BytesIO(row["image_bytes"])).convert("RGB")
106
+ print(row["id"], row["script"])
107
+ ```
108
+
109
+ ## Citation
110
+
111
+ ```bibtex
112
+ @misc{bdrc_danyig_pedri_binary,
113
+ title = {Danyig vs Pedri Binary Script Classification Dataset},
114
+ author = {Buddhist Digital Resource Center and OpenPecha},
115
+ year = {2026},
116
+ url = {https://huggingface.co/datasets/BDRC/danyig-pedri-binary-script-classifier},
117
+ note = {Images from BDRC}
118
+ }
119
  ```
120
 
121
+ ## License
122
+
123
+ Images taken from the open access collection of the Buddhist Digital Resource Center. Not all images are in the public domain, some are from recent publications possibly under copyright. We provide the images under the Fair Use copyright exception, but any reuse of this dataset will have to be based on a copyright analysis. We provide the classification data under the CC0 1.0 Universal (Public Domain Dedication).
124
+
125
+ ## Acknowledgements
126
 
127
+ All images are provided by the Buddhist Digital Resource Center (BDRC). This dataset was developed by Dharmaduta from specifications provided by BDRC for the project "The BDRC Etext Corpus", with funding from the Khyentse Foundation. **[Buddhist Digital Resource Center](https://www.bdrc.io)** (BDRC). Developed by Dharmaduta / OpenPecha.