Downloads · 30 days
227
64% of all-time downloads
kimchireader/manga-ocr-onnx-q8
manga-ocr-onnx-q8 is a image-to-text model from kimchireader. Use it when you need a caption or text from an image. It is set up for transformers.js. The card lists the license as apache-2.0.
This reads Japanese text out of a manga panel. It is kha-white's manga-ocr, converted to ONNX and shrunk so it can be downloaded and run inside a web browser.
Downloads · 30 days
227
64% of all-time downloads
All-time downloads
354
Public
Repo size
577 MB
Likes
0
Public
Click a slice to open those files.
.onnx725 MB · 100%
From the Hugging Face model README
This reads Japanese text out of a manga panel. It is kha-white's manga-ocr, converted to ONNX and shrunk so it can be downloaded and run inside a web browser.
It is 117 MB instead of 204 MB. Nothing else about it is new.
Everything that makes this work was made by other people.
Two steps, both mechanical:
Existing ONNX versions of manga-ocr only quantize the first half, so they are around 204 MB. This one quantizes both, which is where the saving comes from.
The accuracy has not been measured. Quantizing the second half is the new part here, and nobody has compared this against the full-size version on real pages yet. If you need certainty, use the full-precision files — they are in this repository too.
There is no speed improvement. A faster version would need something called
a key-value cache. The conversion tool refuses to produce one for this model's
architecture, which is why no manga-ocr export anywhere has it. The file named
decoder_model_merged.onnx is the plain decoder under the name the browser
library expects — the same thing every other manga-ocr export does, and the
only way to make one load.
Japanese only, and it reads a cropped bubble rather than a whole page. Find the text first, then hand it over.
| File | Size | |
|---|---|---|
onnx/encoder_model_quantized.onnx | 87 MB | use this |
onnx/decoder_model_merged_quantized.onnx | 30 MB | use this |
onnx/encoder_model.onnx | 343 MB | full precision |
onnx/decoder_model_merged.onnx | 117 MB | full precision |
The full-precision files are kept so you can choose, and so this can be compared against them.
import { pipeline } from '@huggingface/transformers';
const read = await pipeline('image-to-text', 'kimchireader/manga-ocr-onnx-q8', {
dtype: { model: 'q8', decoder_model_merged: 'q8' },
});
Made for a manga reader that runs entirely in the browser — your pages are never uploaded anywhere.