Why build it small
Reading manga lines usually means processing a page at a time, in bulk. The cost per image starts to matter. So instead of stacking a huge general-purpose model, I built a small one aimed at the narrow input of a single bubble. The seeing is handled by a pre-trained DINOv2, reused as-is; only the decoder that writes the characters is trained from scratch. Borrow the eyes, grow just the hands. With that split, 115M is enough to hit the accuracy I needed.
The result: on the Japanese benchmark it beats the teacher model it was distilled from, and on English and Chinese it stays even with models 8× its size at the bubble level. Training took about three days on a single A100. Evaluation was on labels the model never saw during training.
How it works
A bubble is cropped to 224×224 and run through the frozen DINOv2-ViT-B/14. The 256 vision tokens that come out are projected to 512 dimensions by a small MLP and handed to a 6-layer decoder, which predicts one character at a time. The vocabulary is character-level, 14,630 entries — kanji, kana and the Latin alphabet for all three languages folded into one table. Training happens in two stages: first the decoder alone, then the whole thing is unfrozen for fine-tuning.
- Vision encoder
- DINOv2-ViT-B/14 (86M, frozen, reused)
- Decoder
- 6-layer GQA (8q / 2kv) · ~26M · trained from scratch
- Decoder details
- hidden 512 · FFN 1536 · RoPE · SwiGLU · tied embeddings
- Vocabulary
- 14,630 (character-level)
- Languages
- Japanese / Chinese / English
- Formats
- PyTorch / ONNX (121MB · 242MB)
- Quantization
- fp16 / int8 / int4
- License
- Apache-2.0
Accuracy
| Language | Baberu 115M | PaddleOCR-VL 0.9B | For-Manga 0.9B | manga-ocr 110M |
|---|---|---|---|---|
| Japanese | 3.5 | 3.7 | — | 4.2 |
| English | 6.2 | 8.1 | 19.2 | 39.2 |
| Chinese | 5.2 | 7.7 | 8.8 | 37.1 |
Bubble-level lenient CER (%, lower is better). Evaluated on Manga109-v2026 (JA, n=2000) and a hand-annotated hold-out (EN n=237, ZH n=246). Note that on char-weighted CER for long sentences, PaddleOCR-VL leads on English and Chinese. For-Manga is excluded from the Japanese comparison because it was trained on Manga109.
Where it struggles
- It expects a single bubble as input. It isn't meant for handing over a whole page (do the detection in a separate step).
- It occasionally confuses dakuten and handakuten.
- It's weak on fonts outside its training data, like older Western comics.