Datasets:
Upload folder using huggingface_hub
Browse files- README.md +55 -63
- benchmark.parquet +3 -0
- test.parquet +3 -0
- train.parquet +3 -0
- validation.parquet +3 -0
README.md
CHANGED
|
@@ -1,83 +1,75 @@
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
-
- bo
|
| 4 |
license: cc0-1.0
|
| 5 |
-
size_categories:
|
| 6 |
-
- 1k<n<10k
|
| 7 |
task_categories:
|
| 8 |
-
- image-classification
|
| 9 |
tags:
|
| 10 |
-
- tibetan
|
| 11 |
-
-
|
| 12 |
-
-
|
| 13 |
-
-
|
| 14 |
-
|
| 15 |
-
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
dtype: string
|
| 28 |
-
splits:
|
| 29 |
-
- name: train
|
| 30 |
-
num_examples: 3048
|
| 31 |
-
- name: validation
|
| 32 |
-
num_examples: 762
|
| 33 |
-
- name: test
|
| 34 |
-
num_examples: 762
|
| 35 |
---
|
| 36 |
|
| 37 |
-
# Uchen
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
-
|
|
|
|
| 40 |
|
| 41 |
-
|
| 42 |
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
* `patches_clahe`: Same 10% overlap patch layout, but with **Contrast Limited Adaptive Histogram Equalization (CLAHE)** applied to improve stroke visibility in low-contrast scans.
|
| 50 |
-
* **`benchmark/`**: A "Gold Standard" evaluation set containing exactly **5 images per class** across 18 script types. These images were selected after a strict taxonomical cleanup and were **never seen** by the model during the training, validation, or testing phases.
|
| 51 |
|
| 52 |
-
##
|
| 53 |
-
- **Project:** The BDRC Etext Corpus
|
| 54 |
-
- **Developed by:** Dharmaduta in collaboration with BDRC
|
| 55 |
-
- **Source of Images:** [Buddhist Digital Resource Center (BDRC)](https://www.bdrc.io)
|
| 56 |
-
- **Funding:** Khyentse Foundation
|
| 57 |
-
- **License:** CC0 (Public Domain)
|
| 58 |
|
| 59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
|
| 61 |
-
|
| 62 |
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
- **Total Samples:** 4,572
|
| 67 |
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
|
| 72 |
-
##
|
| 73 |
|
| 74 |
-
|
| 75 |
-
|
|
|
|
|
|
|
| 76 |
|
| 77 |
-
##
|
| 78 |
-
Tagging was performed using a custom-developed script classification tool developed by **Dharmaduta** and **BDRC**.
|
| 79 |
-
- **Expert Review:** A team of expert Tibetan paleographers reviewed every scan to assign ground-truth labels.
|
| 80 |
-
- **Taxonomical Cleanup:** The `benchmark` folder specifically reflects a cleaned taxonomy, ensuring that the 18 sub-classes are correctly represented for the most rigorous model testing possible.
|
| 81 |
|
| 82 |
-
|
| 83 |
-
We thank the **Buddhist Digital Resource Center** for their archive and the **Khyentse Foundation** for funding **The BDRC Etext Corpus** project.
|
|
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
+
- bo
|
| 4 |
license: cc0-1.0
|
|
|
|
|
|
|
| 5 |
task_categories:
|
| 6 |
+
- image-classification
|
| 7 |
tags:
|
| 8 |
+
- tibetan
|
| 9 |
+
- uchen
|
| 10 |
+
- ume
|
| 11 |
+
- manuscript
|
| 12 |
+
size_categories:
|
| 13 |
+
- 10K<n<100K
|
| 14 |
+
configs:
|
| 15 |
+
- config_name: default
|
| 16 |
+
data_files:
|
| 17 |
+
- split: train
|
| 18 |
+
path: train.parquet
|
| 19 |
+
- split: validation
|
| 20 |
+
path: validation.parquet
|
| 21 |
+
- split: test
|
| 22 |
+
path: test.parquet
|
| 23 |
+
- split: benchmark
|
| 24 |
+
path: benchmark.parquet
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
---
|
| 26 |
|
| 27 |
+
# Uchen vs Umê classification (Parquet)
|
| 28 |
+
|
| 29 |
+
Binary Tibetan script labels: **uchen** / **ume**.
|
| 30 |
+
|
| 31 |
+
## Load with ``datasets``
|
| 32 |
|
| 33 |
+
```python
|
| 34 |
+
from datasets import load_dataset
|
| 35 |
|
| 36 |
+
repo = "openpecha/uchen-ume-classification-benchmark" # replace after upload
|
| 37 |
|
| 38 |
+
train = load_dataset(repo, split="train")
|
| 39 |
+
val = load_dataset(repo, split="validation")
|
| 40 |
+
test = load_dataset(repo, split="test")
|
| 41 |
+
bench = load_dataset(repo, split="benchmark")
|
| 42 |
|
| 43 |
+
# Or all splits at once:
|
| 44 |
+
ds = load_dataset(repo)
|
| 45 |
+
# ds["train"], ds["validation"], ds["test"], ds["benchmark"]
|
| 46 |
+
```
|
|
|
|
|
|
|
| 47 |
|
| 48 |
+
## Columns
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
+
| Column | Type | Description |
|
| 51 |
+
|--------|------|-------------|
|
| 52 |
+
| `id` | string | BDRC page id (filename stem) |
|
| 53 |
+
| `image_bytes` | binary | Raw image file bytes (JPEG/PNG, …) |
|
| 54 |
+
| `script` | string | `uchen` or `ume` |
|
| 55 |
|
| 56 |
+
Decode an image:
|
| 57 |
|
| 58 |
+
```python
|
| 59 |
+
from io import BytesIO
|
| 60 |
+
from PIL import Image
|
|
|
|
| 61 |
|
| 62 |
+
row = train[0]
|
| 63 |
+
img = Image.open(BytesIO(row["image_bytes"])).convert("RGB")
|
| 64 |
+
```
|
| 65 |
|
| 66 |
+
## Splits
|
| 67 |
|
| 68 |
+
| Split | Source |
|
| 69 |
+
|-------|--------|
|
| 70 |
+
| `train` / `validation` / `test` | Work-stratified split from training corpus (benchmark pages excluded) |
|
| 71 |
+
| `benchmark` | Held-out diverse pages (`select_benchmark.py`) — **not** in train/val/test |
|
| 72 |
|
| 73 |
+
## Training exclusion
|
|
|
|
|
|
|
|
|
|
| 74 |
|
| 75 |
+
Pages in ``benchmark`` are excluded from train/val/test via ``benchmark_page_ids.json`` when building splits.
|
|
|
benchmark.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4bd950edb423259afd414a7815d444f8c3a025bbd82fb4d5b5db2a6fc853a6df
|
| 3 |
+
size 40931078
|
test.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:94176eac9f6ec887eb7995c5fee886b32e9c888f186a1bb73affd1f3dbf53b23
|
| 3 |
+
size 556902632
|
train.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4b48881cbabdf7f50132c363a7e146b175069c84488e7d23e760730ab7495095
|
| 3 |
+
size 5506315731
|
validation.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5e82c22321ff25170779682a1bc8b46171db2c0234ef5ac0c28a399f8463712c
|
| 3 |
+
size 630217530
|