Image Classification
Transformers
Tibetan
dinov3
tibetan
script-classification
paleography
fine-tuned
document-analysis
Eval Results (legacy)
Instructions to use openpecha/tibetan-script-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openpecha/tibetan-script-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="openpecha/tibetan-script-classifier") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("openpecha/tibetan-script-classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -40,14 +40,14 @@ model-index:
|
|
| 40 |
|
| 41 |
This repository contains fine-tuned checkpoints for identifying 18 distinct categories of Tibetan manuscript scripts. This research was conducted to develop automated paleographic identification tools for historical archives.
|
| 42 |
|
| 43 |
-
##
|
| 44 |
- **Project Name:** The BDRC Etext Corpus
|
| 45 |
- **Developed by:** Dharmaduta
|
| 46 |
- **Specifications provided by:** [Buddhist Digital Resource Center (BDRC)](https://www.bdrc.io)
|
| 47 |
- **Funded by:** Khyentse Foundation
|
| 48 |
- **Core Model:** DINOv3 ViT-S/16 (`facebook/dinov3-vits16-pretrain-lvd1689m`)
|
| 49 |
|
| 50 |
-
##
|
| 51 |
|
| 52 |
| Experiment | Evaluation Level | Macro F1 | Accuracy |
|
| 53 |
| :--- | :--- | :---: | :---: |
|
|
@@ -57,16 +57,16 @@ This repository contains fine-tuned checkpoints for identifying 18 distinct cate
|
|
| 57 |
|
| 58 |
*Note: The **whole_page** model is recommended for general use due to its balanced performance and simpler inference pipeline.*
|
| 59 |
|
| 60 |
-
##
|
| 61 |
The model is trained to recognize the following scripts:
|
| 62 |
`dhumri`, `difficult`, `drathung`, `drudring`, `druring`, `druthung`, `khyuyig`, `multi_scripts`, `non_tibetan`, `peri`, `petsuk`, `trinyig`, `tsegdrig`, `tsugchung`, `tsumachug`, `uchen_sugdring`, `uchen_sugthung`, `yigchung`.
|
| 63 |
|
| 64 |
-
##
|
| 65 |
- **whole_page**: Short-edge resize to 224px followed by a 224×224 center crop.
|
| 66 |
- **patches_color**: Sliding-window 224×224 patches with 25% overlap.
|
| 67 |
- **patches_clahe**: Same patch layout as above, but with **Contrast Limited Adaptive Histogram Equalization (CLAHE)** applied to grayscale inputs to enhance script visibility.
|
| 68 |
|
| 69 |
-
##
|
| 70 |
Training was executed via a 3-stage progressive unfreezing strategy:
|
| 71 |
1. **Stage A (Head Only):** 20 epochs, backbone frozen (LR: 1e-3).
|
| 72 |
2. **Stage B (Partial):** 10 epochs, unfreezing the last 2 Transformer blocks (Backbone LR: 1e-5).
|
|
@@ -74,7 +74,7 @@ Training was executed via a 3-stage progressive unfreezing strategy:
|
|
| 74 |
|
| 75 |
Class-weighted cross-entropy loss was utilized to mitigate high dataset imbalance across script types.
|
| 76 |
|
| 77 |
-
##
|
| 78 |
|
| 79 |
### Loading the Model
|
| 80 |
```python
|
|
|
|
| 40 |
|
| 41 |
This repository contains fine-tuned checkpoints for identifying 18 distinct categories of Tibetan manuscript scripts. This research was conducted to develop automated paleographic identification tools for historical archives.
|
| 42 |
|
| 43 |
+
## Project Information
|
| 44 |
- **Project Name:** The BDRC Etext Corpus
|
| 45 |
- **Developed by:** Dharmaduta
|
| 46 |
- **Specifications provided by:** [Buddhist Digital Resource Center (BDRC)](https://www.bdrc.io)
|
| 47 |
- **Funded by:** Khyentse Foundation
|
| 48 |
- **Core Model:** DINOv3 ViT-S/16 (`facebook/dinov3-vits16-pretrain-lvd1689m`)
|
| 49 |
|
| 50 |
+
## Evaluation Results
|
| 51 |
|
| 52 |
| Experiment | Evaluation Level | Macro F1 | Accuracy |
|
| 53 |
| :--- | :--- | :---: | :---: |
|
|
|
|
| 57 |
|
| 58 |
*Note: The **whole_page** model is recommended for general use due to its balanced performance and simpler inference pipeline.*
|
| 59 |
|
| 60 |
+
## Label Set (18 Classes)
|
| 61 |
The model is trained to recognize the following scripts:
|
| 62 |
`dhumri`, `difficult`, `drathung`, `drudring`, `druring`, `druthung`, `khyuyig`, `multi_scripts`, `non_tibetan`, `peri`, `petsuk`, `trinyig`, `tsegdrig`, `tsugchung`, `tsumachug`, `uchen_sugdring`, `uchen_sugthung`, `yigchung`.
|
| 63 |
|
| 64 |
+
## Preprocessing Variants
|
| 65 |
- **whole_page**: Short-edge resize to 224px followed by a 224×224 center crop.
|
| 66 |
- **patches_color**: Sliding-window 224×224 patches with 25% overlap.
|
| 67 |
- **patches_clahe**: Same patch layout as above, but with **Contrast Limited Adaptive Histogram Equalization (CLAHE)** applied to grayscale inputs to enhance script visibility.
|
| 68 |
|
| 69 |
+
## Training Recipe
|
| 70 |
Training was executed via a 3-stage progressive unfreezing strategy:
|
| 71 |
1. **Stage A (Head Only):** 20 epochs, backbone frozen (LR: 1e-3).
|
| 72 |
2. **Stage B (Partial):** 10 epochs, unfreezing the last 2 Transformer blocks (Backbone LR: 1e-5).
|
|
|
|
| 74 |
|
| 75 |
Class-weighted cross-entropy loss was utilized to mitigate high dataset imbalance across script types.
|
| 76 |
|
| 77 |
+
## How to Use
|
| 78 |
|
| 79 |
### Loading the Model
|
| 80 |
```python
|