han2ids v0.4
Read an IDS from a Mincho/ๅฎไฝ glyph image. v0.4 continues v0.3 on the corrected Noto/IPAmj/Jigmo em-box set. v0.1 is not used: 89.9% of the current test characters were in its training split.
Results
8,730 test rows, disjoint from training.
| exact | same tree | valid | |
|---|---|---|---|
| overall | 84.54% | 87.79% | 100% |
| Noto Serif CJK JP | 93.32% | ||
| IPAmj Mincho | 84.63% | ||
| Jigmo | 81.80% |
v0.3 was 82.88% exact.
Architecture
35.2M parameters: ViT-S/16 encoder, four 384-wide decoder layers, 224px, 10,423-token character
vocabulary, IDS operand-stack mask. Greedy decoding by default; --top-k returns ranked beam
candidates.
Usage
pip install git+https://github.com/mkpoli/han2ids
huggingface-cli download mkpoli/han2ids-v0.4 han2ids-v0.4.pt --local-dir models
han2ids glyph.png --checkpoint models/han2ids-v0.4.pt
Training data
- 159,521 images over 95,927 Han characters: Noto Serif CJK JP, IPAmj Mincho 006.01, Jigmo.
- Common em-box renderer, font-aware gold from
data/IDS.TXT,data/label-overrides.tsvanddata/font-label-overrides.tsv. - Six epochs from v0.3; AdamW encoder 5e-5, decoder 2.5e-4, batch 32, bf16.
Limits
Clean em-box renders; crops, scans, Kai and sans are out of scope. IVD and regional variants are
merged by default; strict classification is available in han2ids.status.classify.
Terms
Code MIT. Fonts and labels keep their own terms; see NOTICE.md and LICENSE.
- Downloads last month
- 33