karma689 commited on
Commit
47b73b3
·
verified ·
1 Parent(s): eab89d0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +53 -81
README.md CHANGED
@@ -1,77 +1,63 @@
1
  ---
2
  language:
3
- - bo
4
  license: apache-2.0
5
  tags:
6
- - image-classification
7
- - tibetan
8
- - uchen
9
- - ume
10
- - script-classification
11
- - dinov3
12
- - fine-tuned
13
  library_name: transformers
14
  pipeline_tag: image-classification
15
  base_model: facebook/dinov3-vits16-pretrain-lvd1689m
16
  datasets:
17
- - openpecha/uchen-ume-classification-benchmark
18
  metrics:
19
- - f1
20
- - accuracy
21
  model-index:
22
- - name: Uchen-Ume Classifier (DINOv3 ViT-S) — center crop
23
- results:
24
- - task:
25
- type: image-classification
26
- name: Tibetan Script Classification (center-crop whole page)
27
- dataset:
28
- name: openpecha/uchen-ume-classification-benchmark
29
- type: openpecha/uchen-ume-classification-benchmark
30
- split: test
31
- metrics:
32
- - name: Macro F1 (center crop)
33
- type: f1
34
- value: 0.983
35
- - name: Accuracy (center crop)
36
- type: accuracy
37
- value: 0.993
38
- - name: Uchen-Ume Classifier (DINOv3 ViT-S) — full page
39
- results:
40
- - task:
41
- type: image-classification
42
- name: Tibetan Script Classification (full page)
43
- dataset:
44
- name: openpecha/uchen-ume-classification-benchmark
45
- type: openpecha/uchen-ume-classification-benchmark
46
- split: test
47
- metrics:
48
- - name: Macro F1 (full page)
49
- type: f1
50
- value: 0.708
51
- - name: Accuracy (full page)
52
- type: accuracy
53
- value: 0.807
54
- - task:
55
- type: image-classification
56
- name: Held-out benchmark (full page)
57
- dataset:
58
- name: openpecha/uchen-ume-classification-benchmark
59
- type: openpecha/uchen-ume-classification-benchmark
60
- split: benchmark
61
- metrics:
62
- - name: Macro F1 (full page)
63
- type: f1
64
- value: 0.848
65
- - name: Accuracy (full page)
66
- type: accuracy
67
- value: 0.850
68
  ---
69
 
70
  # Uchen vs Umê Classifier (DINOv3 ViT-S)
71
 
72
  Binary Tibetan script classifier: **Uchen** (དབུ་ཅན།, headed/printed script) vs **Umê** (དབུ་མེད།, headless/cursive script). Fine-tuned from [DINOv3 ViT-S](https://huggingface.co/facebook/dinov3-vits16-pretrain-lvd1689m) on ~10,000 manuscript scans from the [Buddhist Digital Resource Center](https://www.bdrc.io) (BDRC).
73
 
74
- **Dataset:** [openpecha/uchen-ume-classification-benchmark](https://huggingface.co/datasets/openpecha/uchen-ume-classification-benchmark)
75
 
76
  ## Which checkpoint to use
77
 
@@ -86,7 +72,7 @@ Pick the variant that matches **how you preprocess at inference**:
86
 
87
  ## Best results
88
 
89
- Hub split: 9,110 train / 1,000 val / 851 test (work-stratified). Benchmark holdout: 60 pages.
90
 
91
  | Variant | Train | Val | Test @ eval | Test acc | Test macro-F1 | Val macro-F1 (best) |
92
  |---------|-------|-----|-------------|:--------:|:-------------:|:-------------------:|
@@ -94,15 +80,6 @@ Hub split: 9,110 train / 1,000 val / 851 test (work-stratified). Benchmark holdo
94
  | **`without_preprocess/`** | none | none | none (full page) | **80.7%** | **0.708** | 0.771 |
95
  | `with_preprocess/` (legacy) | center crop | center crop | full page | 56.1% | 0.506 | 0.994 |
96
 
97
- ### Full-page benchmark (60 pages, `preprocess none`)
98
-
99
- | Variant | Benchmark acc | Benchmark macro-F1 |
100
- |---------|:-------------:|:------------------:|
101
- | `without_preprocess/` | **85.0%** | **0.848** |
102
- | `with_preprocess/` | 68.3% | 0.648 |
103
-
104
- Run benchmark eval for `center_crop_all/` with `--preprocess center_crop_whole_page` to match training.
105
-
106
  ### Test confusion matrices (851 pages)
107
 
108
  | Variant | uchen→uchen | uchen→ume | ume→uchen | ume→ume |
@@ -165,8 +142,6 @@ path = hf_hub_download(
165
 
166
  ```bash
167
  python inference_uchen_ume.py \
168
- --benchmark-json benchmark/benchmark_holdout.json \
169
- --fetch-urls \
170
  --weights without_preprocess/final_model.pt \
171
  --preprocess none
172
  ```
@@ -180,15 +155,12 @@ center_crop_all/ ← center_crop_whole_page at inference (~99% test)
180
  results.json ← includes confusion_matrix
181
  confusion_matrix.json
182
  confusion_matrix.png
183
- without_preprocess/ ← full pages (~81% test, ~85% benchmark)
184
  final_model.pt
185
  model_card.json
186
  results.json
187
  confusion_matrix.json
188
  confusion_matrix.png
189
- benchmark_eval_results.json ← benchmark CM in JSON
190
- with_preprocess/ ← legacy mismatch — do not use
191
- ...
192
  ```
193
 
194
  ## Limitations
@@ -201,15 +173,15 @@ with_preprocess/ ← legacy mismatch — do not use
201
 
202
  ```bibtex
203
  @misc{karma2026uchenume,
204
- title = {Uchen-Ume Classifier: Binary Tibetan Script Classification with DINOv3},
205
- author = {Karma Tashi and Elie Roux},
206
- year = {2026},
207
- url = {https://huggingface.co/openpecha/uchen-ume-classifier},
208
- note = {Fine-tuned on openpecha/uchen-ume-classification-benchmark.
209
- Funded by Khyentse Foundation. Images from BDRC.}
210
  }
211
  ```
212
 
213
  ## Acknowledgements
214
 
215
- Developed by **Dharmaduta** for the **[Buddhist Digital Resource Center](https://www.bdrc.io)** (BDRC) Etext Corpus project, with funding from the **Khyentse Foundation**. Annotation guidelines by **Pentsok Rtsang**.
 
1
  ---
2
  language:
3
+ - bo
4
  license: apache-2.0
5
  tags:
6
+ - image-classification
7
+ - tibetan
8
+ - uchen
9
+ - ume
10
+ - script-classification
11
+ - dinov3
12
+ - fine-tuned
13
  library_name: transformers
14
  pipeline_tag: image-classification
15
  base_model: facebook/dinov3-vits16-pretrain-lvd1689m
16
  datasets:
17
+ - openpecha/uchen_ume_classification_dataset
18
  metrics:
19
+ - f1
20
+ - accuracy
21
  model-index:
22
+ - name: Uchen-Ume Classifier (DINOv3 ViT-S) — center crop
23
+ results:
24
+ - task:
25
+ type: image-classification
26
+ name: Tibetan Script Classification (center-crop whole page)
27
+ dataset:
28
+ name: openpecha/uchen-ume-classification-benchmark
29
+ type: openpecha/uchen-ume-classification-benchmark
30
+ split: test
31
+ metrics:
32
+ - name: Macro F1 (center crop)
33
+ type: f1
34
+ value: 0.983
35
+ - name: Accuracy (center crop)
36
+ type: accuracy
37
+ value: 0.993
38
+ - name: Uchen-Ume Classifier (DINOv3 ViT-S) — full page
39
+ results:
40
+ - task:
41
+ type: image-classification
42
+ name: Tibetan Script Classification (full page)
43
+ dataset:
44
+ name: openpecha/uchen-ume-classification-benchmark
45
+ type: openpecha/uchen-ume-classification-benchmark
46
+ split: test
47
+ metrics:
48
+ - name: Macro F1 (full page)
49
+ type: f1
50
+ value: 0.708
51
+ - name: Accuracy (full page)
52
+ type: accuracy
53
+ value: 0.807
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  ---
55
 
56
  # Uchen vs Umê Classifier (DINOv3 ViT-S)
57
 
58
  Binary Tibetan script classifier: **Uchen** (དབུ་ཅན།, headed/printed script) vs **Umê** (དབུ་མེད།, headless/cursive script). Fine-tuned from [DINOv3 ViT-S](https://huggingface.co/facebook/dinov3-vits16-pretrain-lvd1689m) on ~10,000 manuscript scans from the [Buddhist Digital Resource Center](https://www.bdrc.io) (BDRC).
59
 
60
+ **Dataset:** [openpecha/uchen-ume-classification-dataset](https://huggingface.co/datasets/openpecha/uchen-ume-classification-dataset)
61
 
62
  ## Which checkpoint to use
63
 
 
72
 
73
  ## Best results
74
 
75
+ Hub split: 9,110 train / 1,000 val / 851 test (work-stratified).
76
 
77
  | Variant | Train | Val | Test @ eval | Test acc | Test macro-F1 | Val macro-F1 (best) |
78
  |---------|-------|-----|-------------|:--------:|:-------------:|:-------------------:|
 
80
  | **`without_preprocess/`** | none | none | none (full page) | **80.7%** | **0.708** | 0.771 |
81
  | `with_preprocess/` (legacy) | center crop | center crop | full page | 56.1% | 0.506 | 0.994 |
82
 
 
 
 
 
 
 
 
 
 
83
  ### Test confusion matrices (851 pages)
84
 
85
  | Variant | uchen→uchen | uchen→ume | ume→uchen | ume→ume |
 
142
 
143
  ```bash
144
  python inference_uchen_ume.py \
 
 
145
  --weights without_preprocess/final_model.pt \
146
  --preprocess none
147
  ```
 
155
  results.json ← includes confusion_matrix
156
  confusion_matrix.json
157
  confusion_matrix.png
158
+ without_preprocess/ ← full pages (~81% test)
159
  final_model.pt
160
  model_card.json
161
  results.json
162
  confusion_matrix.json
163
  confusion_matrix.png
 
 
 
164
  ```
165
 
166
  ## Limitations
 
173
 
174
  ```bibtex
175
  @misc{karma2026uchenume,
176
+ title = {Uchen-Ume Classifier: Binary Tibetan Script Classification with DINOv3},
177
+ author = {Karma Tashi and Elie Roux},
178
+ year = {2026},
179
+ publisher = {HuggingFace},
180
+ url = {https://huggingface.co/openpecha/uchen-ume-classifier},
181
+ note = {Funded by Khyentse Foundation. Images sourced from the Buddhist Digital Resource Center (BDRC).}
182
  }
183
  ```
184
 
185
  ## Acknowledgements
186
 
187
+ Developed by **Dharmaduta** for the **[Buddhist Digital Resource Center](https://www.bdrc.io)** (BDRC) Etext Corpus project, with funding from the **Khyentse Foundation**. Annotation guidelines by **Pentsok Rtsang**.