karma689 commited on
Commit
6b03d3b
·
verified ·
1 Parent(s): 8055223

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +142 -0
README.md ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ task_categories:
4
+ - image-classification
5
+ tags:
6
+ - tibetan
7
+ - manuscript
8
+ - script-classification
9
+ - bdrc
10
+ - danyig
11
+ - pedri
12
+ - binary
13
+ pretty_name: Danyig vs Pedri Binary Script Classification
14
+ size_categories:
15
+ - 1K<n<10K
16
+ dataset_info:
17
+ features:
18
+ - name: id
19
+ dtype: string
20
+ - name: image_bytes
21
+ dtype: image
22
+ - name: script
23
+ dtype:
24
+ class_label:
25
+ names:
26
+ '0': Danyig
27
+ '1': Pedri
28
+ - name: script_type
29
+ dtype: string
30
+ splits:
31
+ - name: train
32
+ num_bytes: 530900000
33
+ num_examples: 960
34
+ - name: validation
35
+ num_bytes: 59500000
36
+ num_examples: 120
37
+ - name: test
38
+ num_bytes: 79900000
39
+ num_examples: 120
40
+ download_size: 670300000
41
+ dataset_size: 670300000
42
+ configs:
43
+ - config_name: default
44
+ data_files:
45
+ - split: train
46
+ path: "train-*-of-*.parquet"
47
+ - split: validation
48
+ path: "val-*-of-*.parquet"
49
+ - split: test
50
+ path: "test-*-of-*.parquet"
51
+ ---
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.