Read an ideographic description sequence
(IDS) from a Mincho / 宋体 glyph image. Input is one glyph image; output is a sequence such as
⿰𠤕⿱龴疋. Mincho and Song serif faces only; Kai, handwriting and sans are out of scope.
The test split is 8,730 images over 4,752 characters, mixed across Noto Serif CJK JP, IPAmj Mincho and the Jigmo family.
| exact IDS | same tree | valid IDS | |
|---|---|---|---|
| overall | 82.93% | 86.48% | 100% |
| Noto Serif CJK JP | 92.43% | ||
| IPAmj Mincho | 83.60% | ||
| Jigmo family | 79.67% |
v0.2 reaches 80.24% exact on the same em-box renders.
vit_small_patch16_224.augreg_in21k_ft_in1k), 224×224 grayscale repeated to RGB.han2ids-v0.3.pt is a state dict with itos and args; load it with
han2ids.infer.Han2IDS.
pip install git+https://github.com/mkpoli/han2ids
huggingface-cli download mkpoli/han2ids-v0.3 han2ids-v0.3.pt --local-dir models
han2ids glyph.png --checkpoint models/han2ids-v0.3.pt
Beam alternatives:
han2ids glyph.png --checkpoint models/han2ids-v0.3.pt --top-k 3 --json
⿰舟㕣, 勇 ⿱龴男, 屄 ⿸尸宂.崢 stays a reviewed miss against ⿰山爭 while the 争/爭 review is open. The
label audit lists all 79 characters.
Trained on clean em-box renders. Tight crops, scans, unusual weights and Kai or sans faces are outside the training distribution. Variant components without an IDS code point cannot be named.
Code MIT. Fonts and labels keep their own terms; see NOTICE.md and LICENSE. The checkpoint is
derived from renders of Noto Serif CJK JP (SIL OFL 1.1), IPAmj Mincho (IPA Font License 1.0) and Jigmo
(CC0 1.0).