You can get the ブラックジャックによろしく manga here.
Unzip them and use the utils/pdf_to_imgs.py
script to get images (you need to install dependencies for that).
On arch you can use:
sudo pacman -S tesseract python-pytesseract tesseract-data-jpn
This will install tesseract and the basic Japanese data.
However it will not install the vertical trained data. You can get it (and install it) with one of the two following commands. I'm currently using the second one.
sudo wget https://github.com/tesseract-ocr/tessdata/raw/main/jpn_vert.traineddata -P /usr/share/tessdata/
sudo wget https://github.com/tesseract-ocr/tessdata_best/raw/main/jpn_vert.traineddata -P /usr/share/tessdata/
python manga_ocr.py <path to input image> -o <path to output image>
Example:
python manga_ocr.py data/manga_page_hd.jpeg -o data/ocr_result.png
Result:
Input | Output |
---|---|
![]() |
![]() |
- Try to use tesseract directly instead of pytesseract ? Since given options to pytesseract doesn't seem to do anything. Maybe take inspiration from here.
- The RLSA implementation follows the paper, but the paper was made for horizontal text.
Took some ideas/code from:
- https://github.com/Kocarus/Manga-Translator-TesseractOCR/blob/master/locate_bubbles.py
- https://github.com/johnoneil/MangaTextDetection
Not yet but maybe later: