manga ocr base
Overview
Highlights
- Optimized for vertical Japanese text and stylized fonts
- Ideal for automated manga translation and archival pipelines
- Apache-2.0 license ensures flexible commercial integration
- High precision in high-noise comic panel environments
Usage
# Install Hugging Face transformers
pip install transformers torch
# Load model with transformers
from transformers import AutoModel, AutoTokenizer
model = AutoModel.from_pretrained("kha-white/manga-ocr-base")
tokenizer = AutoTokenizer.from_pretrained("kha-white/manga-ocr-base")
Hugging Face Download
We recommend downloading the model via the Hugging Face CLI or Hub SDK.
Guidance:Before downloading, install huggingface_hub with:
pip install -U huggingface_hub
CLI Download
Download the full repository
huggingface-cli download kha-white/manga-ocr-base
Download a single file to a local folder (e.g. config.json into ./dir)
huggingface-cli download kha-white/manga-ocr-base config.json --local-dir ./dir
See the official docs for more CLI options
SDK Download
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('kha-white/manga-ocr-base')
Git Download
Make sure git-lfs is installed first
git lfs install
git clone https://huggingface.co/kha-white/manga-ocr-base
To skip LFS large-file downloads, use:
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/kha-white/manga-ocr-base
Model files are hosted on the Hugging Face Hub — download directly via HF CLI / SDK / Git, not through this site.
PyTorch / Transformers Usage
Install Transformers
pip install -U transformers torch
Load the model and run inference
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained('kha-white/manga-ocr-base')
tokenizer = AutoTokenizer.from_pretrained('kha-white/manga-ocr-base')
Full Documentation
---
language: ja
tags:
- image-to-text
license: apache-2.0
datasets:
- manga109s
---
Manga OCR
Optical character recognition for Japanese text, with the main focus being Japanese manga.
It uses Vision Encoder Decoder framework.
Manga OCR can be used as a general purpose printed Japanese OCR, but its main goal was to provide a high quality
text recognition, robust against various scenarios specific to manga:
- both vertical and horizontal text
- text with furigana
- text overlaid on images
- wide variety of fonts and font styles
- low quality images
Code is available here.