han2ids v0.1
Read an ideographic description sequence (IDS) from a Mincho / ๅฎไฝ glyph image. This is the first checkpoint; v0.2 is the current model.
Scope is Mincho and Song serif faces only. Kai, handwriting and sans faces are out of scope.
Results
| test | exact IDS | valid IDS |
|---|---|---|
| 4,839 serif characters | 80.10% | 99.98% |
| 8,730 mixed-font rows | 74.27% | 100% |
By font on the mixed-font rows: Noto 92.15%, IPAmj 84.32%, Jigmo 63.47%.
Architecture
- 35.2M parameters, ViT-S/16 encoder and four transformer decoder layers.
- Character-level vocabulary of 10,402 tokens, maximum length 48.
- Greedy decoding with the IDS operand-stack mask.
han2ids-v0.1.pt is a state dict with itos and args; load it with
han2ids.infer.Han2IDS.
Usage
pip install git+https://github.com/mkpoli/han2ids
huggingface-cli download mkpoli/han2ids-v0.1 han2ids-v0.1.pt --local-dir models
han2ids glyph.png --checkpoint models/han2ids-v0.1.pt
Training data
85,776 images from the serif compose export (Noto Serif CJK JP and Jigmo), eight epochs. See the han2ids repository for the training pipeline.
Limits
Clean em-box renders; tight crops, scans, Kai and sans faces are outside the training distribution. v0.1 is weaker than v0.2 on Jigmo; use v0.2 unless you need the earlier baseline.
Terms
Code MIT. Fonts and labels keep their own terms; see NOTICE.md and LICENSE. The checkpoint is
derived from Noto Serif CJK JP (SIL OFL 1.1) and Jigmo (CC0 1.0).
- Downloads last month
- -
