Image Classification
Transformers
Tibetan
tibetan
script-classification
dinov3
multiclass
balanced

You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

6-Way Tibetan Script Classifier (DINOv3 ViT-S)

Fine-tuned DINOv3 ViT-S for six Tibetan script families:

Danyig, Druma, Gyuyig, Pedri, Tsugdri, Uchen

Experiment: dinov3_6way_script_classifier (6_way_script_classification)
Pooling: Global average pooling over patch tokens (skips CLS + register tokens)
Weights: final_model.pt (best validation macro-F1 across stages A/B)

Data

Preprocessing

Split Mode Notes
train center_crop_affine center crop 448 + affine (±8.0°, translate 0.04, scale [0.96, 1.04])
val center_crop center crop
test center_crop center crop (benchmark)

Processor size: 448 px. Inference default: --preprocess center_crop --preprocess-size 448.

Benchmark test metrics (n=540)

Metric All BDRC (360) Synthetic (180)
Accuracy 78.1% 69.4% 95.6%
Macro F1 0.769 0.647 0.954

Best val checkpoint: best_stage_b_last_blocks.pt epoch 16 macro-F1 0.755

Training hyperparameters

Parameter Value
lr_head_a 5e-05
lr_backbone_b 1e-06
lr_head_b 1e-05
epochs_a 10
epochs_b 25
unfreeze_blocks_b 4
scheduler cosine
warmup_epochs_a 0
warmup_epochs_b 0
warmup_start_factor 1.0
min_lr_ratio 0.01
early_stop_patience 8
class_weight_mode balanced
label_smoothing 0.1
dropout 0.5
weight_decay 0.1
grad_clip_norm 1.0

Per-class (benchmark test)

precision    recall  f1-score   support

      Danyig       0.76      0.62      0.68        90
       Druma       0.88      0.91      0.90        90
      Gyuyig       0.65      0.94      0.77        90
       Pedri       0.65      0.86      0.74        90
     Tsugdri       0.97      0.37      0.53        90
       Uchen       1.00      0.99      0.99        90

    accuracy                           0.78       540
   macro avg       0.82      0.78      0.77       540
weighted avg       0.82      0.78      0.77       540

Files

File Description
final_model.pt Best val-F1 weights + label maps + test metrics
results.json Full metrics, history, resolved config
config.yaml Training config used for this run
model_card.json Summary metadata
confusion_matrix.json / .png Benchmark test CM
training_history.png Stage loss / val F1 curves
inference.py Classify image paths
requirements-inference.txt Pip deps

Inference

pip install -r requirements-inference.txt
python inference.py --checkpoint final_model.pt --image path/to/page.jpg --preprocess center_crop --preprocess-size 448

Reproduce training

python scripts/download_hf_6class_datasets.py
python experiments/synthetic_data/train.py

Model repo: BDRC/6-way-balanced-script-classifier

License

The fine-tuned model weights are derivative works of DINOv3 and are distributed under the DINOv3 License. The original inference code in this repository is available under the Apache License 2.0.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for BDRC/6-way-balanced-script-classifier