kha-white / mokuro Goto Github PK
View Code? Open in Web Editor NEWRead Japanese manga inside browser with selectable text.
License: GNU General Public License v3.0
Read Japanese manga inside browser with selectable text.
License: GNU General Public License v3.0
This appeared both before and after installing Python 3.9. It occasionally shows up and occasionally doesn't.
C:\Users\OWNER>pip3 install mokuro
Collecting mokuro
Using cached mokuro-0.1.6-py3-none-any.whl (116 kB)
Collecting loguru
Using cached loguru-0.6.0-py3-none-any.whl (58 kB)
Collecting torchsummary
Using cached torchsummary-1.5.1-py3-none-any.whl (2.8 kB)
Collecting opencv-python>=4.1.2
Using cached opencv_python-4.7.0.68-cp37-abi3-win32.whl (28.2 MB)
Collecting mokuro
Using cached mokuro-0.1.5-py3-none-any.whl (116 kB)
Using cached mokuro-0.1.4-py3-none-any.whl (116 kB)
Using cached mokuro-0.1.3-py3-none-any.whl (114 kB)
Using cached mokuro-0.1.2-py3-none-any.whl (114 kB)
Using cached mokuro-0.1.1-py3-none-any.whl (114 kB)
Using cached mokuro-0.1.0-py3-none-any.whl (114 kB)
ERROR: Cannot install mokuro==0.1.0, mokuro==0.1.1, mokuro==0.1.2, mokuro==0.1.3, mokuro==0.1.4, mokuro==0.1.5 and mokuro==0.1.6 because these package versions have conflicting dependencies.
The conflict is caused by:
mokuro 0.1.6 depends on torchvision>=0.8.1
mokuro 0.1.5 depends on torchvision>=0.8.1
mokuro 0.1.4 depends on torchvision>=0.8.1
mokuro 0.1.3 depends on torchvision>=0.8.1
mokuro 0.1.2 depends on torchvision>=0.8.1
mokuro 0.1.1 depends on torchvision>=0.8.1
mokuro 0.1.0 depends on torchvision>=0.8.1
To fix this you could try to:
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
I don't really know much about it, but I could invest the time if you say I can.
I have an AMD GPU and I use Windows.
or maybe automatic rotation, would be very useful for tablets and cell phones.
.
.
.
versus
⋮
Is more like a suggestion than an issue, but would be cleaner to make the code replace 3 dots in vertical with the Vertical Ellipsis “⋮” character or to read them together already. Using the dots separated ocupe too much space and makes the column all messy.
Can look dumb, but an separated suggestion is to describe what kinda of files the Mokuro is compatible with in the read me, took me some time to realize it was jpg instead of pdf. Maybe in the future integrate an auto turn pdf into jpg feature into Mokuro! Anyways thanks, awesome job!
Using Yomichan im able to get pop ups on the html, its working every else but this. Not entirely sure why its not working on the html file.
But also would be cool if you also shared the text format you're using for the OCR for that pop up.
Edit: I was stupid and never enabled URL in the yomichan settings
Hey there, thanks for your work. This is very useful. Though the installation instructions (both the readme and the guide provided) were a little difficult to follow for those unfamiliar with github, python and this type of installation. I made a simple guide that I tried to make as simple as possible for people who would like to use this but have had some trouble.
Please let me know if there is anything I misunderstood, got wrong or if something else can be better simplified. Feel free to use this guide as you wish.
Hi, I love the project, but I can't find a decent reading flow from one page to the next.
If I maintain zoom, pressing Page Down
will show the end of the next page, not the beginning.
Is there a way for the beginning of the next page to show up in that case?
Alternatively, being able to scroll down infinitely maintaining zoom would be even better.
C:\Users\Seven7>mokuro "C:\A\Summertime renderer v01"
Paths to process:
C:\A\Summertime renderer v01
Each of the paths above will be treated as one volume. Continue? [yes/no]
yes
2022-05-05 13:18:13.152 | INFO | mokuro.run:run:40 - Processing 1/1: C:\A\Summertime renderer v01
Processing pages...: 0%| | 0/294 [00:00<?, ?it/s]2022-05-05 13:18:13.170 | INFO | mokuro.manga_page_ocr:__init__:30 - Initializing text detector
2022-05-05 13:18:13.614 | INFO | manga_ocr.ocr:__init__:13 - Loading OCR model from kha-white/manga-ocr-base
Processing pages...: 0%| | 0/294 [00:06<?, ?it/s]
2022-05-05 13:18:19.524 | ERROR | mokuro.run:run:44 - Error while processing C:\A\Summertime renderer v01
Traceback (most recent call last):
File "c:\program files\python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
│ │ └ {'__name__': '__main__', '__doc__': None, '__package__': '', '__loader__': <zipimporter object "C:\Users\Seven7\AppData\...
│ └ <code object <module> at 0x000002AF10CFFF50, file "C:\Users\Seven7\AppData\Roaming\Python\Python39\Scripts\mokuro.exe\__...
└ <function _run_code at 0x000002AF104DECA0>
File "c:\program files\python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
│ └ {'__name__': '__main__', '__doc__': None, '__package__': '', '__loader__': <zipimporter object "C:\Users\Seven7\AppData\...
└ <code object <module> at 0x000002AF10CFFF50, file "C:\Users\Seven7\AppData\Roaming\Python\Python39\Scripts\mokuro.exe\__...
File "C:\Users\Seven7\AppData\Roaming\Python\Python39\Scripts\mokuro.exe\__main__.py", line 7, in <module>
sys.exit(main())
│ │ └ <function main at 0x000002AF10CEC280>
│ └ <built-in function exit>
└ <module 'sys' (built-in)>
File "C:\Users\Seven7\AppData\Roaming\Python\Python39\site-packages\mokuro\__main__.py", line 7, in main
fire.Fire(run)
│ │ └ <function run at 0x000002AF36438CA0>
│ └ <function Fire at 0x000002AF36438F70>
└ <module 'fire' from 'C:\\Users\\Seven7\\AppData\\Roaming\\Python\\Python39\\site-packages\\fire\\__init__.py'>
File "C:\Users\Seven7\AppData\Roaming\Python\Python39\site-packages\fire\core.py", line 141, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
│ │ │ │ │ └ 'mokuro'
│ │ │ │ └ {}
│ │ │ └ Namespace(verbose=False, interactive=False, separator='-', completion=None, help=False, trace=False)
│ │ └ ['C:\\A\\Summertime renderer v01']
│ └ <function run at 0x000002AF36438CA0>
└ <function _Fire at 0x000002AF364C0F70>
File "C:\Users\Seven7\AppData\Roaming\Python\Python39\site-packages\fire\core.py", line 466, in _Fire
component, remaining_args = _CallAndUpdateTrace(
│ └ <function _CallAndUpdateTrace at 0x000002AF364C20D0>
└ <function run at 0x000002AF36438CA0>
File "C:\Users\Seven7\AppData\Roaming\Python\Python39\site-packages\fire\core.py", line 681, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
│ │ └ {}
│ └ ['C:\\A\\Summertime renderer v01']
└ <function run at 0x000002AF36438CA0>
> File "C:\Users\Seven7\AppData\Roaming\Python\Python39\site-packages\mokuro\run.py", line 42, in run
ovg.process_dir(path, as_one_file=as_one_file)
│ │ │ └ True
│ │ └ WindowsPath('C:/A/Summertime renderer v01')
│ └ <function OverlayGenerator.process_dir at 0x000002AF36438790>
└ <mokuro.overlay_generator.OverlayGenerator object at 0x000002AF364AE490>
File "C:\Users\Seven7\AppData\Roaming\Python\Python39\site-packages\mokuro\overlay_generator.py", line 82, in process_dir
self.init_models()
│ └ <function OverlayGenerator.init_models at 0x000002AF36438700>
└ <mokuro.overlay_generator.OverlayGenerator object at 0x000002AF364AE490>
File "C:\Users\Seven7\AppData\Roaming\Python\Python39\site-packages\mokuro\overlay_generator.py", line 55, in init_models
self.mpocr = MangaPageOcr(self.pretrained_model_name_or_path, self.force_cpu, **self.kwargs)
│ │ │ │ │ │ │ │ └ {}
│ │ │ │ │ │ │ └ <mokuro.overlay_generator.OverlayGenerator object at 0x000002AF364AE490>
│ │ │ │ │ │ └ False
│ │ │ │ │ └ <mokuro.overlay_generator.OverlayGenerator object at 0x000002AF364AE490>
│ │ │ │ └ 'kha-white/manga-ocr-base'
│ │ │ └ <mokuro.overlay_generator.OverlayGenerator object at 0x000002AF364AE490>
│ │ └ <class 'mokuro.manga_page_ocr.MangaPageOcr'>
│ └ None
└ <mokuro.overlay_generator.OverlayGenerator object at 0x000002AF364AE490>
File "C:\Users\Seven7\AppData\Roaming\Python\Python39\site-packages\mokuro\manga_page_ocr.py", line 34, in __init__
self.mocr = MangaOcr(pretrained_model_name_or_path, force_cpu)
│ │ │ └ False
│ │ └ 'kha-white/manga-ocr-base'
│ └ <class 'manga_ocr.ocr.MangaOcr'>
└ <mokuro.manga_page_ocr.MangaPageOcr object at 0x000002AF36512BE0>
File "C:\Users\Seven7\AppData\Roaming\Python\Python39\site-packages\manga_ocr\ocr.py", line 15, in __init__
self.tokenizer = AutoTokenizer.from_pretrained(pretrained_model_name_or_path)
│ │ │ └ 'kha-white/manga-ocr-base'
│ │ └ <classmethod object at 0x000002AF36322BB0>
│ └ <class 'transformers.models.auto.tokenization_auto.AutoTokenizer'>
└ <manga_ocr.ocr.MangaOcr object at 0x000002AF36512BB0>
File "C:\Users\Seven7\AppData\Roaming\Python\Python39\site-packages\transformers\models\auto\tokenization_auto.py", line 528, in from_pretrained
return tokenizer_class.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)
│ │ │ │ └ {'_from_auto': True}
│ │ │ └ ()
│ │ └ 'kha-white/manga-ocr-base'
│ └ <classmethod object at 0x000002AF362883D0>
└ <class 'transformers.models.bert_japanese.tokenization_bert_japanese.BertJapaneseTokenizer'>
File "C:\Users\Seven7\AppData\Roaming\Python\Python39\site-packages\transformers\tokenization_utils_base.py", line 1780, in from_pretrained
return cls._from_pretrained(
│ └ <classmethod object at 0x000002AF36288490>
└ <class 'transformers.models.bert_japanese.tokenization_bert_japanese.BertJapaneseTokenizer'>
File "C:\Users\Seven7\AppData\Roaming\Python\Python39\site-packages\transformers\tokenization_utils_base.py", line 1915, in _from_pretrained
tokenizer = cls(*init_inputs, **init_kwargs)
│ │ └ {'unk_token': '[UNK]', 'sep_token': '[SEP]', 'pad_token': '[PAD]', 'cls_token': '[CLS]', 'mask_token': '[MASK]', 'do_lower_ca...
│ └ ()
└ <class 'transformers.models.bert_japanese.tokenization_bert_japanese.BertJapaneseTokenizer'>
File "C:\Users\Seven7\AppData\Roaming\Python\Python39\site-packages\transformers\models\bert_japanese\tokenization_bert_japanese.py", line 151, in __init__
self.word_tokenizer = MecabTokenizer(
│ └ <class 'transformers.models.bert_japanese.tokenization_bert_japanese.MecabTokenizer'>
└ PreTrainedTokenizer(name_or_path='kha-white/manga-ocr-base', vocab_size=6144, model_max_len=1000000000000000019884624838656, ...
File "C:\Users\Seven7\AppData\Roaming\Python\Python39\site-packages\transformers\models\bert_japanese\tokenization_bert_japanese.py", line 231, in __init__
import fugashi
File "C:\Users\Seven7\AppData\Roaming\Python\Python39\site-packages\fugashi\__init__.py", line 1, in <module>
from .fugashi import *
ImportError: DLL load failed while importing fugashi: The specified module could not be found.
2022-05-05 13:18:19.552 | INFO | mokuro.run:run:48 - Processed successfully: 0/1
AssertionError: /Users/_/Downloads/Manga/ジョジョリオン 27.cbz must be a directory
| INFO | mokuro.run:run:48 - Processed successfully: 0/1
Device: M1 Macbook Pro Monterey 12.1
No HTML file is made if a file is directly path to
Whenever I try the "mokuro directory" command, it gives me this error:
RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory
It would be great if Mokuro worked in Kiwi Browser, as this is the only way to use Yomichan on Android.
Mokuro working in Kiwi Browser means reading manga on an Android tablet with Yomichan.
I couldn't make it work in Kiwi Browser installed on my Motorola phone, neither on my Lenovo tablet. It looks like it's a Kiwi Browser issue.
I am getting this error both on google colab and on PC.
RuntimeError: Failed to import transformers.models.bert_japanese.tokenization_bert_japanese because of the following error (look up to see its traceback):
No module named 'sentencepiece'
Mine looks different to the video
Instead of like the demo video on github giving the full translation and meaning with the japanese I only get an exact english word translation when i hover the mouse over the japanese text. And I had to turn google translate on for this.
Also, when I go 'right click', 'inspect', 'console' i get three translation errors for coding
This is what the error says
Failed to load resource: net::ERR_FILE_NOT_FOUND
file://translate.google.com/gen204?sl=auto&tl=en&textlen=119&ttt=540&ttl=256&ttf=598&sr=1&nca=te_time&client=te_lib&logld=vTE_20221207
Did anyone get something similar?
Apparently yomichan is also good but I really ceebs learning to code another html text translator again https://rentry.co/lazyXel#mangaocr-or-manga-with-yomichan
It seems like this error is from mokuro's end
I am stuck in this command:
Downloading (…)"pytorch_model.bin";: 47%|███▎ | 210M/444M [05:31<06:10, 633kB/s]
because of bad connection here.
I could maybe download it with wget
or aria2
but where should I put it?
I copied the ocr folder and the html file but when I tried to open it on another machine it didn't work. Is there a solution to make the process manga portable not including turning it into a pdf
I think there was a breaking change in numpy 1.24.
File "/usr/local/lib/python3.10/dist-packages/comic_text_detector/utils/db_utils.py", line 200, in box_score_fast
xmin = np.clip(np.floor(box[:, 0].min()).astype(np.int), 0, w - 1)
│ │ │ │ │ │ └ 1024
│ │ │ │ │ └ <module 'numpy' from '/usr/local/lib/python3.10/dist-packages/numpy/__init__.py'>
│ │ │ │ └ array([[ 752, 999],
│ │ │ │ [ 753, 999],
│ │ │ │ [ 754, 1000],
│ │ │ │ [ 755, 1000],
│ │ │ │ [ 756, 1001],
│ │ │ │ [ 755, 1000],...
│ │ │ └ <ufunc 'floor'>
│ │ └ <module 'numpy' from '/usr/local/lib/python3.10/dist-packages/numpy/__init__.py'>
│ └ <function clip at 0x7fbe149ea8c0>
└ <module 'numpy' from '/usr/local/lib/python3.10/dist-packages/numpy/__init__.py'>
File "/usr/local/lib/python3.10/dist-packages/numpy/__init__.py", line 284, in __getattr__
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'int'
Installing version 1.23.0 instead of 1.24.0 of numpy works instead.
Hello, I would like to translate the detected ocr text into English before inserting them into HTML textbox, how would I first go about doing that. Thank You
It seems like CBZ/CBR files aren't currently supported, if you pass one of these file formats into mokuro
you get a gnarly error.
To get around it, I just unzip the files and then run it on the directory, which works great. It's not a huge hassle so I will keep doing that for now, but I would love to see this feature in the future!
Much like some people like to track the number of characters read when reading a VN (e.g. via a texthooker page with a character counter), it'd be cool to have something similar here in the top part of the UI that tracks the number of characters as you read.
AFAIK there's nothing like that out there for manga, so that'd be a unique feature that this tool would enable.
This is an issue I see more with manga with larger file sizes but it still happens on small files as well. The page just stops working when I try to hover over text, or even turn the page. I don't know why it happens, so I was wondering if there's anything I could do. Also, browser doesn't matter whether it be a fresh chrome account, one with extensions or even another browser like Vivaldi.
Some mobile tools (namely 10ten on iOS) require you to move a secondary cursor on the screen to the words to use its pop up dictionary. However after clicking on the OCR text box to get the text to appear, trying to drag the pop up dictionary cursor closes the text box. It would be nice if there was a setting to toggle the text boxes on touch/mouse click so they will stay open until you click off so that you can use the pop up dictionaries correctly.
How to use mokuro HTML on android?
I'm using kiwi browser and don't see any images. Maybe there is smarter way (convert to other format)?
Hello, I recently followed Xelieu's guide on using Mokuro. I finished creating the HTML and OCR files for 18 volumes of Karakai Takagi-san but none of the HTML works. Done through google collab.
I get this error when trying to run it
Traceback (most recent call last):
File "C:\Users\xelak\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\xelak\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\xelak\AppData\Local\Programs\Python\Python39\Scripts\mokuro.exe\__main__.py", line 4, in <module>
File "C:\Users\xelak\AppData\Local\Programs\Python\Python39\lib\site-packages\mokuro\__init__.py", line 3, in <module>
from mokuro.manga_page_ocr import MangaPageOcr
File "C:\Users\xelak\AppData\Local\Programs\Python\Python39\lib\site-packages\mokuro\manga_page_ocr.py", line 8, in <module>
from manga_ocr import MangaOcr
File "C:\Users\xelak\AppData\Local\Programs\Python\Python39\lib\site-packages\manga_ocr\__init__.py", line 3, in <module>
from manga_ocr.ocr import MangaOcr
File "C:\Users\xelak\AppData\Local\Programs\Python\Python39\lib\site-packages\manga_ocr\ocr.py", line 8, in <module>
from transformers import AutoFeatureExtractor, AutoTokenizer, VisionEncoderDecoderModel
File "C:\Users\xelak\AppData\Local\Programs\Python\Python39\lib\site-packages\transformers\__init__.py", line 30, in <module>
from . import dependency_versions_check
File "C:\Users\xelak\AppData\Local\Programs\Python\Python39\lib\site-packages\transformers\dependency_versions_check.py", line 17, in <module>
from .utils.versions import require_version, require_version_core
File "C:\Users\xelak\AppData\Local\Programs\Python\Python39\lib\site-packages\transformers\utils\__init__.py", line 34, in <module>
from .generic import (
File "C:\Users\xelak\AppData\Local\Programs\Python\Python39\lib\site-packages\transformers\utils\generic.py", line 33, in <module>
import tensorflow as tf
File "C:\Users\xelak\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\__init__.py", line 469, in <module>
_keras._load()
File "C:\Users\xelak\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\util\lazy_loader.py", line 41, in _load
module = importlib.import_module(self.__name__)
File "C:\Users\xelak\AppData\Local\Programs\Python\Python39\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\xelak\AppData\Local\Programs\Python\Python39\lib\site-packages\keras\__init__.py", line 21, in <module>
from keras import models
File "C:\Users\xelak\AppData\Local\Programs\Python\Python39\lib\site-packages\keras\models\__init__.py", line 18, in <module>
from keras.engine.functional import Functional
File "C:\Users\xelak\AppData\Local\Programs\Python\Python39\lib\site-packages\keras\engine\functional.py", line 34, in <module>
from keras.engine import training as training_lib
File "C:\Users\xelak\AppData\Local\Programs\Python\Python39\lib\site-packages\keras\engine\training.py", line 45, in <module>
from keras.saving.legacy import save
File "C:\Users\xelak\AppData\Local\Programs\Python\Python39\lib\site-packages\keras\saving\legacy\save.py", line 24, in <module>
from keras.saving.legacy.saved_model import load_context
File "C:\Users\xelak\AppData\Local\Programs\Python\Python39\lib\site-packages\keras\saving\legacy\saved_model\load_context.py", line 68, in <module>
tf.__internal__.register_load_context_function(in_load_context)
AttributeError: module 'tensorflow.compat.v2.__internal__' has no attribute 'register_load_context_function'
My main OS is NixOS, but I was having some issues getting the Python dependencies packaged, so I wanted to give mokuro a shot on Windows 10 first.
I have Python 3.9.13 installed (I checked and apparently PyTorch supports 3.10 now despite what the README says; I had the same issue in 3.10), and I have gone through the setup instructions. I have an Nvidia RTX 2060 SUPER, so I installed PyTorch with CUDA 11.7 per the instructions on PyTorch's website with pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
.
When I entered the directory with my scan image files and ran mokuro .
, I got this error:
OSError: Unable to load weights from pytorch checkpoint file for 'C:\Users\elnu/.cache\huggingface\hub\models--kha-white--manga-ocr-base\snapshots\aa6573bd10b0d446cbf622e29c3e084914df9741\pytorch_model.bin' at 'C:\Users\elnu/.cache\huggingface\hub\models--kha-white--manga-ocr-base\snapshots\aa6573bd10b0d446cbf622e29c3e084914df9741\pytorch_model.bin'. If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.
2023-04-18 13:13:24.868 | INFO | mokuro.run:run:51 - Processed successfully: 0/1
Full output here.
Any ideas what's gone wrong? Have I missed something? Thanks in advance.
Update: Just wanted to add that I was reading through Xelieu's guide and they mentioned that there sometimes is a problem where torch.cuda.is_available()
may return False
. I checked and for me this was the case, and even after reinstalling torch and verifying that it started detecting CUDA as available, I still ran into the same issue.
During pip install:
Downloading mokuro-0.1.1-py3-none-any.whl (114 kB)
---------------------------------------- 114.3/114.3 KB 3.4 MB/s eta 0:00:00
Downloading mokuro-0.1.0-py3-none-any.whl (114 kB)
---------------------------------------- 114.3/114.3 KB 3.4 MB/s eta 0:00:00
ERROR: Cannot install mokuro because these package versions have conflicting dependencies.
The conflict is caused by:
onnx-simplifier 0.3.8 depends on onnxoptimizer>=0.2.6
onnx-simplifier 0.3.7 depends on onnxoptimizer>=0.2.5
onnx-simplifier 0.3.6 depends on onnxoptimizer>=0.2.5
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
Unable to use the repo on my older desktop I decided to try the Colab. Unfortunately, this does not seem to work as when I use the command !mokuro 'this/path' the program prompt me with: continue? (yes/no). As only Google Colab pro users can have access to the terminal I cannot answer this prompt and the program is stuck.
Perhaps I am missing an easy fix here so please let me know if that is the case!
Thanks again for your hard work.
I've encountered this issue a few times across 3 or so volumes of One Piece. When one bubble is above another, the text will get slightly jumbled, and the outputted text will alternate between the first box and second rather than showing each line of text in sequential order.
There are so many light novels you can easily find scanned on certain websites, but you can't really find them as ebooks that easily without having to buy them. Would it be possible? I know this was created thinking about manga, but it'd be cool if it worked for light novels too.
I tried running mokuro on light novels too, but it doesn't seem catch text pages, only pages with ilustrations and some text within all pages. Also if someone mentioned it before I'll delete this request asap.
manga/
. upload this Test folder.!mokuro --parent_dir "/content/drive/MyDrive/manga/Test"
Something weird is going on with Unicode parsing, particularly with the ず and ば characters. Both characters get transformed into another identical-looking but different character in the HTML file.
Hi, i used the following command to install the requirements but mokuro still uses CPU only: pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116
Python location (version 3.9.12):
\AppData\Local\Programs\Python\Python39\python.exe
\AppData\Local\Microsoft\WindowsApps\python.exe
Mokuro location:
\AppData\Local\Programs\Python\Python39\Scripts\mokuro.exe
OS: Windows 10
If the file extensions are uppercase (I've witnessed this a few times from downloaded manga) then the program will fail to find any of them.
I can see there was a pull request (#11) for this, but it haven't been pushed to pip because it still fails with uppercase extensions.
Installation with
pip3 install mokuro
I downloaded Yomichan on chrome but I cant get it to show up with mokuro using html.
The mouse and shift keys to get yomichan to pop up does not work but it works on a web url
So I think there's something wrong with my mokuro or how I set it up. But I downloaded Mokuro the basic way with python and pip and linked it to the path 100%. Didn't use pytorch or anaconda those exctra steps so im surprised its not working
If anyone had a similar issue and knows how to fix it, it'd be greatly appreciated :))
Hiya, I'm trying to run the project on python 3.9.13
and am getting the following error:
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [8 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/private/var/folders/rz/d266t0dn1md992kgv7z8tp480000gn/T/pip-install-mxoysvv8/fugashi_621defc0e8774e36a8d22bd2f46c3d4a/setup.py", line 15, in <module>
output, data_files = check_libmecab()
File "/private/var/folders/rz/d266t0dn1md992kgv7z8tp480000gn/T/pip-install-mxoysvv8/fugashi_621defc0e8774e36a8d22bd2f46c3d4a/fugashi_util.py", line 58, in check_libmecab
raise RuntimeError("Could not configure working env. Have you installed MeCab?")
RuntimeError: Could not configure working env. Have you installed MeCab?
[end of output]
I am not sure what exactly happened, this was working before but now im only seeing one page or none at all.
I had my tablet set up and working, it was reading everything correctly not sure if something messed up with kiwi browser but before it was working flawlessly but now im only seeing some pages, some are cut up and some are just completely missing.
Getting an error while running mokuro. This is being thrown from line 38 in manga_page_ocr.py
AttributeError: 'NoneType' object has no attribute 'shape'
2022-11-23 22:34:43.023 | INFO | mokuro.run:run:51 - Processed successfully: 0/1
>>> import torch
>>> x = torch.rand(5, 3)
>>> print(x)
tensor([[0.1846, 0.9418, 0.0773],
[0.6418, 0.2262, 0.2997],
[0.9134, 0.2455, 0.6753],
[0.0256, 0.5766, 0.5302],
[0.8522, 0.2849, 0.8297]])
>>> torch.cuda.is_available()
True
C:\WINDOWS\system32>mokuro "C:\A\ummertime renderer v01"
Paths to process:
C:\A\ummertime renderer v01
Each of the paths above will be treated as one volume. Continue? [yes/no]
y
2022-05-05 16:07:48.040 | INFO | mokuro.run:run:40 - Processing 1/1: C:\A\ummertime renderer v01
Processing pages...: 0%| | 0/215 [00:00<?, ?it/s]2022-05-05 16:07:48.058 | INFO | mokuro.manga_page_ocr:__init__:30 - Initializing text detector
2022-05-05 16:07:48.499 | INFO | manga_ocr.ocr:__init__:13 - Loading OCR model from kha-white/manga-ocr-base
2022-05-05 16:07:58.152 | INFO | manga_ocr.ocr:__init__:22 - Using CPU
2022-05-05 16:07:58.822 | INFO | manga_ocr.ocr:__init__:29 - OCR ready
Processing pages...: 1%|▌ | 2/215 [00:18<29:45, 8.38s/it]
Went to process a manga that had volumes with and without leading zeroes on the page, the ones without got completely out of order (going 1 10-19 100 and so on instead)
Using a program to batch rename them fixed the issue, but I figured would be worth reporting if it's a fixable problem in the program itself
Hey there, love the application. I will be using it daily from now on.
One thing I noticed while using it today was that using the arrow keys moves the orientation of the page and doesn't change to a new page as I would expect.
Would this kind of functionality be welcomed?
Installed mokuro using pip but I get this error when i try to run mokuro "path/vol1".
Are there any plans to support avif image files in mokuro ? By looking at the code it seems that only jpg, jpeg and png are supported at the moment.
C:\Users\OWNER>pip3 install mokuro
Collecting mokuro
Using cached mokuro-0.1.6-py3-none-any.whl (116 kB)
Collecting loguru
Using cached loguru-0.6.0-py3-none-any.whl (58 kB)
Collecting pyclipper
Using cached pyclipper-1.3.0.post4-cp37-cp37m-win32.whl (85 kB)
Collecting mokuro
Using cached mokuro-0.1.5-py3-none-any.whl (116 kB)
Using cached mokuro-0.1.4-py3-none-any.whl (116 kB)
Using cached mokuro-0.1.3-py3-none-any.whl (114 kB)
Using cached mokuro-0.1.2-py3-none-any.whl (114 kB)
Collecting onnx-simplifier>=0.3.6
Using cached onnx-simplifier-0.4.13.tar.gz (18.1 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Traceback (most recent call last):
File "", line 36, in
File "", line 34, in
File "C:\Users\OWNER\AppData\Local\Temp\pip-install-jxl36kkh\onnx-simplifier_80104d44712b436a94ebb1f96f86acef\setup.py", line 65, in
assert CMAKE, 'Could not find "cmake" executable!'
AssertionError: Could not find "cmake" executable!
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.