mokuro
Read Japanese manga with selectable text inside a browser.
See demo: https://kha-white.github.io/manga-demo
mokuro_demo.mp4
Demo contains excerpt from Manga109-s dataset. うちの猫’ず日記 © がぁさん
mokuro is aimed towards Japanese learners, who want to read manga in Japanese with a pop-up dictionary like Yomichan. It works like this:
- Perform text detection and OCR for each page.
- After processing a whole volume, generate a HTML file, which you can open in a browser.
- All processing is done offline (before reading). You can transfer the resulting HTML file together with manga images to another device (e.g. your mobile phone) and read there.
mokuro uses comic-text-detector for text detection and manga-ocr for OCR.
Try running on your manga in Colab:
For a comprehensive guide on setting up a reading and mining workflow with manga-ocr/mokuro, check out Xelieu's guide.
Installation
You need Python 3.6, 3.7, 3.8 or 3.9. Unfortunately, PyTorch does not support Python 3.10 yet.
Some users have reported problems with Python installed from Microsoft Store. If you see an error: ImportError: DLL load failed while importing fugashi: The specified module could not be found.
, try installing Python from the official site.
If you want to run with GPU, install PyTorch as described here, otherwise this step can be skipped.
Run in command line:
pip3 install mokuro
Usage
Run on one volume
mokuro /path/to/manga/vol1
This will generate /path/to/manga/vol1.html
file, which you can open in a browser.
Run on multiple volumes
mokuro /path/to/manga/vol1 /path/to/manga/vol2 /path/to/manga/vol3
For each volume, a separate HTML file will be generated.
Run on a directory containing multiple volumes
If your directory structure looks somewhat like this:
manga_title/
├─vol1/
├─vol2/
├─vol3/
└─vol4/
You can process all volumes by running:
mokuro --parent_dir manga_title/
Other options
--force_cpu - disable GPU
--as_one_file - generate separate css and js files instead of embedding everything in html
--disable_confirmation - run without asking for confirmation
Contact
For any inquiries, please feel free to contact me at [email protected]