Datasets:
image imagewidth (px) 16 1.8k | text stringlengths 1 20 | vertical bool 2
classes | style stringclasses 3
values |
|---|---|---|---|
のみんも | false | clean | |
おおきい とり | false | hand | |
るがうのにんそあたさついよせのしと | false | clean | |
つびねね | false | clean | |
めであ | true | clean | |
ばしよういちつき | true | clean | |
いくたいよう | true | brush | |
すーぱー | false | clean | |
ひこうきやくそくほし | false | hand | |
こころ | false | hand | |
ほうこくしよ | false | clean | |
あるくいりぐちうしろ | false | clean | |
めーる しんぶん きるあ ぽいんと | true | hand | |
よとさははい | false | hand | |
はんたーはんたーらいせんす | false | hand | |
がつこうれべる | false | hand | |
びよういん ぱすわーど | false | clean | |
ひりり | false | clean | |
わこ する | true | clean | |
め ぎちお | true | hand | |
どへあでぼぢ | false | brush | |
しであばぜび とほべゆい | false | clean | |
まぎい まぜにす | false | clean | |
せねごずほぢどせちぢえだでせ | false | clean | |
こーひー | false | clean | |
ごん へや | false | hand | |
きく ぐりーどあいらんど | false | clean | |
だのかりかぷれ | false | hand | |
はんたーらいせんす | false | clean | |
すこゔぽわ | false | brush | |
とぢろるおじんすこやんく | false | brush | |
れつりあばすぐぐげごる | true | clean | |
とうをくかも | false | hand | |
り でろじりぜゔ | false | brush | |
しんぶん | true | hand | |
ろ | false | hand | |
みどりにひだりあした | false | brush | |
なうはさづべざべ | true | hand | |
のをしこむ じ | false | clean | |
にまけぜつゔぶきり | true | brush | |
ちすのういー | false | hand | |
なまえ ようこそ しよくどう | true | brush | |
てろめめむぽ | false | brush | |
りゆうろく | true | hand | |
たかとごさたるおぞしにくでにのれせだかか | true | clean | |
のへでやそとほ | true | brush | |
たのはみちて | false | hand | |
したばー | true | hand | |
めなどれう | false | hand | |
ぼのれのふ | false | hand | |
にゆぜでじけいな | false | brush | |
たのしいへやふらんくりん | true | brush | |
たとむーんししくい | false | hand | |
きくどうぶつえん | false | hand | |
まんまち | true | brush | |
とほか がていおと | false | brush | |
よん まもる りゆう ひだり しけん | false | hand | |
いるみもらう | false | clean | |
げとぺぜのずち | false | hand | |
よら | false | brush | |
んくとぞ もごい | false | hand | |
てつのだり | true | brush | |
ひそか | false | clean | |
ぴういぽぶが | true | hand | |
したん | false | hand | |
う | true | brush | |
ふるいくろ | false | brush | |
あたらしい のむ | true | brush | |
とびらこむぎありがとう | false | clean | |
のにやりゆれの | false | hand | |
かなしい | false | brush | |
うみしうさあたしこはて | false | hand | |
は | false | hand | |
ん | false | hand | |
をきつんをら | false | hand | |
かいとどうぶつえん | false | clean | |
ばえぱく とうど | false | clean | |
こうえんくろろげーむけん | true | brush | |
れすとらん すき | true | clean | |
ぜだけ | false | hand | |
くにせんりつ | false | hand | |
なるぐん | false | clean | |
したらと | false | hand | |
のずでどこつぶろるにどぱひお | false | hand | |
にいぐ | false | hand | |
ともす | true | brush | |
のにだたちくかち | false | hand | |
のこ よれにねし | false | hand | |
るーる ふたつ まち かなしい つち | false | brush | |
くにしゆぎよう | true | hand | |
ぎゆわ | true | clean | |
ねてろぜのひやく | true | brush | |
はんたーしけんてれびへやでーた | false | clean | |
でんしや | false | clean | |
まぼどきなだみぶぶぴめだる | false | clean | |
すがとしこあ | false | clean | |
ぞりでのさた | false | hand | |
かー | false | hand | |
ふりすぢや | true | brush | |
ねん | false | hand |
HxH OCR: synthetic text lines
Generated images of single lines of the Hunter × Hunter alphabet (ハンター文字), each labelled
with its kana. These are the training sets of the line readers of
HxH OCR, to our knowledge the first OCR for the
script. Models: KokkakNiphon/hxh-ocr.
Demo: https://hxh-ocr.kokkakniphon.workers.dev
Every image is drawn by the project's generators from a vector tracing of the alphabet. None comes from the manga, the anime or any other publication.
Configurations
| config | made for | lines (train + validation) | what is in it |
|---|---|---|---|
synth_v4 (default) |
every reader (v4, and the model family together with v5) |
500,000 + 10,000 | single lines on procedural backgrounds, 30% vertical, kana, ー and spaces only |
v5 |
the model family readers (tiny, base) |
102,312 + 7,444 | lines cut out of generated photo-style pages exactly the way the browser cuts them, 8% vertical, digits and ! ? : / . - inline, 2.7% negative crops with an empty label |
v6 |
readers v6 (numbers in the lettering) | 181,408 + 5,866 | as v5, with digits and ! ? : / . - drawn in the glyphs' own strokes or in display faces matched to them in a third of the horizontal lines, kana reading guides above lines, sticker lettering and a merchandise-promo scene |
v6m |
readers v6, second stage | 72,129 + 2,898 | the v6 recipe with small dakuten dots in 60% of the text styles |
v6_digits |
testing | validation only: 8,902 | held-out v6 lines with numbers or marks in 9 of 10 horizontal Hunter lines |
v7 |
readers v7 (the demo's readers) | 104,971 + 5,421 | the v6 recipe plus the cross × of the anime's episode titles ("A×と×B") in 12% of the horizontal lines, and an episode title-card scene |
v7x |
readers v7, second stage | 42,382 + 1,421 | the v7 recipe with more title cards and crosses (in 37% of the lines) |
v7_cross |
testing | validation only: 7,905 | held-out v7 lines: 3,499 crosses in 2,185 of the 7,018 horizontal lines |
from datasets import load_dataset
ds = load_dataset("KokkakNiphon/hxh-ocr-lines", "synth_v4", split="validation")
ex = ds[0]
ex["image"] # PIL image, grayscale, 64 px thick
ex["text"] # "しみばり" (full-size hiragana, ー and spaces)
ex["vertical"] # False: a horizontal line; True: a vertical column, top to bottom
v5 = load_dataset("KokkakNiphon/hxh-ocr-lines", "v5", split="validation")
v5[0]["style"] # "manga": the layout of the page the line was cut from ("+photo": photographed)
v7 = load_dataset("KokkakNiphon/hxh-ocr-lines", "v7_cross", split="validation")
# labels such as "なしま×と×どにし": the cross is the 91st token of the v7 readers' vocab
Fields
| field | type | meaning |
|---|---|---|
image |
image (JPEG, grayscale) | one line. synth_v4: horizontal lines are 64 px tall, vertical columns 64 px wide. v5: the rectified crop at the page's resolution (median 32 px thick, 12-150 px), with the margins the browser adds. Vertical columns are stored upright and read top to bottom. |
text |
string | the label: full-size hiragana, the long-vowel mark ー and spaces; from v5 on also 0-9 ! ? : / . -, and from v7 on the cross × (U+00D7). Katakana and small kana (ゃ, っ, ...) are folded into full-size hiragana because they share glyphs. Empty in v5 to v7 for a negative crop (ordinary writing or an icon), which a reader should read as nothing. |
vertical |
bool | orientation of the line. The project's vertical readers turn columns 90° counter-clockwise before reading them. |
style |
string | synth_v4: the rendering style, clean (font-like), hand (wobble, stroke and scale jitter) or brush (pressure-tapered strokes). v5 to v7: the layout of the source page (manga, frame, doc, web, card, lyric, tv; promo from v6, title from v7; with +photo when the page was composed as a phone photo of a screen), or neg-<script> for a negative crop (neg-latin, neg-japanese, neg-icon, neg-kana, neg-digits, ...). |
The image's path keeps the file name the generator wrote, so rows map back to the
generator's labels.tsv.
Splits
| config | split | lines | vertical | negatives | size |
|---|---|---|---|---|---|
synth_v4 |
train | 500,000 | 150,576 | 0 | 3.2 GB, 9 shards |
synth_v4 |
validation | 10,000 | 3,030 | 0 | 64 MB, 1 shard |
v5 |
train | 102,312 | 8,699 | 2,745 | 214 MB, 1 shard |
v5 |
validation | 7,444 | 658 | 205 | 16 MB, 1 shard |
v6 |
train | 181,408 | 15,002 | 4,814 | 467 MB, 2 shards |
v6 |
validation | 5,866 | 477 | 170 | 16 MB, 1 shard |
v6m |
train | 72,129 | 5,866 | 1,936 | 185 MB, 1 shard |
v6m |
validation | 2,898 | 249 | 75 | 8 MB, 1 shard |
v6_digits |
validation | 8,902 | 828 | 226 | 24 MB, 1 shard |
v7 |
train | 104,971 | 8,709 | 2,738 | 276 MB, 1 shard |
v7 |
validation | 5,421 | 422 | 145 | 14 MB, 1 shard |
v7x |
train | 42,382 | 3,440 | 1,151 | 127 MB, 1 shard |
v7x |
validation | 1,421 | 132 | 35 | 4 MB, 1 shard |
v7_cross |
validation | 7,905 | 678 | 223 | 22 MB, 1 shard |
Published reader scores: int8 CER on 512 held-out lines of the synth_v4 validation split,
fp32 CER on the whole v5 validation split and on the first 3,000 synth_v4 validation lines
(see the model card).
How it was made
synth_v4
Generator v4 of the Python line generator in the GitHub repository (hxh_ocr/synth.py,
render.py, glyphs.py, text.py):
python scripts/generate.py --out data/synth_v4 --train 500000 --val 10000 --seed 3 --gray
Settings: seed 3, line thickness 64 px, at most 20 characters, 30% vertical, grayscale JPEG
quality 90, no real background images, no external text corpus and no fonts: every glyph is
drawn from the traced strokes. Each sample is seeded from (seed, split, index), so the set
can be regenerated or extended; JPEG bytes can differ with other OpenCV or Pillow versions.
- Glyphs. All 47 base glyphs traced by hand from the Hunterpedia chart and cross-checked against Omniglot's chart and two official charts (the 2011 anime and a printed guidebook). Variants: ま mostly left-pointing as in the official charts (85%), せ narrow or wide, も with a ring or a dot. Dakuten is a small dot and handakuten a small ring at the lower right, with a varied gap.
- Text. Uniform and frequency-weighted kana, words and names, small kana, word spaces.
- Rendering. Clean, hand and brush styles, stroke width up to 0.30 em, proportional or monospaced, italic shear and curved baselines, small kana drawn smaller.
- Backgrounds and effects. Flat, gradient, noise, paper, screentone, hatching, shapes; outlines, drop shadows, patchy ink; non-text "character art" beside the line ends on 25% of lines; slivers of neighbouring lines at the crop edges.
- Degradations. Blur, motion blur, down/up-scaling, uneven light, contrast and gamma, noise, binarisation (only when the text survives), JPEG.
v5
hxh-synth lines (the Rust page generator, version 5) composes a page exactly as for the
v5 config of KokkakNiphon/hxh-ocr-pages
(other seed) and cuts every labelled line out the way the browser does: the quad jittered like
a detector box (corners ±4% of the line height, a little fatter and longer), grown by
0.15-0.45 / 0.1-0.3 line heights, then rectified. A quarter of the pages also give one negative
crop of non-Hunter writing or an icon, labelled with an empty string. Crops whose grey spread
(5th-95th percentile) is under 28 levels are left out as illegible.
hxh-synth lines --out data/lines_v5b --train 14000 --val 1000 --seed 6 --threads 6 \
--font-dir fonts/open --v5 1 --mode-p 0.25,0.12,0.08,0.1,0.15,0.15,0.15 --ui-neg-prob 0.5 \
--photo-prob 0.35 --caption-prob 0.3 --inline-prob 0.15 --empty-prob 0.03
The pages behind the lines add, over earlier versions: name-card, lyric-video and
anime-screen scenes; 35% of pages photographed off a screen (keystone, bezel, moiré, glare,
vignetting, defocus or shake, sensor noise, JPEG 35-92); glyphs with wide letter spacing,
square or serif stroke ends, a wavy warp, glow, soft outer strokes, bevel and hollow fills; a
narrow form of ー; digits and ! ? : / . - set inline in Hunter lines (--inline-prob 0.15;
9% of the validation lines carry some); Japanese and
Latin captions right next to Hunter lines; avatars, round icon buttons and toolbars. The
ordinary writing (captions, negatives, inline digits) is rasterised only from openly licensed
fonts (see Licence).
The journal (docs/research/JOURNAL.md) explains why each of these exists; most answer a
failure seen in an earlier version.
v6, v6m, v6_digits
Generator v6 (--v6 1) writes numbers as part of the lettering: in about a third of the
horizontal lines, digits and ! ? : / . - are drawn with the same strokes, weight and ends as
the glyphs (touching digit pairs, italic ! and ?), or set in bold and condensed display
faces matched to the stroke weight, in realistic content (model numbers, dates, times, !!).
It adds small kana reading guides above lines (unlabelled), sticker lettering with thick
outlines and a merchandise-promo scene. v6m adds small dakuten dots; v6_digits is a
held-out test with numbers in 9 of 10 horizontal lines (scripts/launch_v6.sh data).
v7, v7x, v7_cross
Generator v7 (--v7 1) adds the cross × that separates the words of the 2011 anime's episode
titles: two strokes in the line's own weight (or a display face's ×), in title content such
as A×と×B, A×B×C and counts like A×3, often right after ー or め, the two glyphs that
look like it. A title-card scene sets a big katakana title (unlabelled) over or under the Hunter
line. v7x has more title cards and crosses; v7_cross is the held-out cross test
(scripts/launch_v7.sh data).
Limits
- Synthetic only. How well models trained on it do on real scans, photos and anime frames is not measured on a published real test set.
- Labels cannot distinguish katakana from hiragana or small kana from full-size ones, because the script does not.
synth_v4has no punctuation, digits or other scripts in the lines.- The glyph forms follow fan and official charts; other fan renditions of the alphabet may differ.
v5tov7have no handwriting-style or mincho (serif Japanese) ordinary text: no openly licensed face of either kind was available.- In
v7, a title line that does not fit its place falls back to an ordinary line, so fewer lines carry crosses than the generator settings ask for.
Licence
CC BY 4.0. Credit: "HxH OCR synthetic datasets by KokkakNiphon, https://github.com/KokkakNiphon/hxh-ocr". The generator code is Apache-2.0.
synth_v4 uses no fonts. The ordinary writing in v5 to v7 (and the display-font digits and
crosses) was rasterised from openly licensed
fonts only (SIL OFL 1.1: Noto Sans, Noto Sans JP / KR / TC / CJK SC, Noto Sans Symbols 2, Noto
Emoji, Go Noto Kurrent, Lato, Inter, Inter Tight, Font Awesome 4.3; Apache-2.0: Roboto, Roboto
Slab, Roboto Mono, Open Sans, GenEi Gothic Pro, Droid Sans Fallback). The files, versions and
SHA-256 hashes are listed in rust/hxh-synth/fonts.lock.json in the GitHub repository; no font
files are distributed here.
Fan project. Hunter × Hunter and its alphabet are © Yoshihiro Togashi / Shueisha. This is an unofficial fan project, not affiliated with or endorsed by them, and the licence grants no rights in their work.
Citation
@software{hxh_ocr_2026,
author = {KokkakNiphon},
title = {{HxH OCR}: an optical character recogniser for the Hunter x Hunter alphabet},
year = {2026},
url = {https://github.com/KokkakNiphon/hxh-ocr}
}
- Downloads last month
- 80