GithubHelp home page GithubHelp logo

doytsujin / mokuro Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kha-white/mokuro

0.0 1.0 0.0 2.84 MB

Read Japanese manga inside browser with selectable text.

License: GNU General Public License v3.0

JavaScript 13.15% Python 18.65% CSS 4.29% HTML 62.99% Jupyter Notebook 0.91%

mokuro's Introduction

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:

  1. Perform text detection and OCR for each page.
  2. After processing a whole volume, generate a HTML file, which you can open in a browser.
  3. 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: Open In Colab

See also:

  • Mokuro2Pdf, cli Ruby script to generate pdf files with selectable text from Mokuro's html overlay
  • Xelieu's guide, a comprehensive guide on setting up a reading and mining workflow with manga-ocr/mokuro (and many other useful tips)

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.

If your path contains spaces, enclose it in double quotes, like this:

mokuro "/path/to/manga/volume 1"

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]

Acknowledgments

mokuro's People

Contributors

dylan-brackett avatar justremember avatar kha-white avatar neggedah avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.