Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCR does nothing, it seems #135

Open
Juiin opened this issue Nov 21, 2022 · 6 comments
Open

OCR does nothing, it seems #135

Juiin opened this issue Nov 21, 2022 · 6 comments
Labels
bug Something isn't working windows This only occurs on Windows

Comments

@Juiin
Copy link

Juiin commented Nov 21, 2022

I tried to build the new OCR Support Version, it seems to have build correctly. But when i try to scan something an empty Search Window appears to the right and thats it. I assume this feature is for scanning Image-based subtitle files like .sup, but i also tried to scan Characters in the actual Video. Since i am not sure about what is supposed to happen, i can't exactly tell what is not working.

I'm on Windows 10

@ripose-jp
Copy link
Owner

Launch memento_debug.exe and post the output.

@Juiin
Copy link
Author

Juiin commented Nov 21, 2022

Surprisingly, it seems to work fine with memento_debug.exe The ocr scans correctly now and a dictionary entry is shown. Still the same issue with memento.exe though.

QCoreApplication::applicationDirPath: Please instantiate the QApplication object first
2022-11-21 16:11:50.254 | INFO     | manga_ocr.ocr:__init__:13 - Loading OCR model from kha-white/manga-ocr-base
2022-11-21 16:11:55.745 | INFO     | manga_ocr.ocr:__init__:22 - Using CPU
C:\Users\Tobi\AppData\Local\Programs\Python\Python39\lib\site-packages\transformers\generation_utils.py:1227: UserWarning: Neither `max_length` nor `max_new_tokens` has been set, `max_length` will default to 300 (`self.config.max_length`). Controlling `max_length` via the config is deprecated and `max_length` will be removed from the config in v5 of Transformers -- we recommend using `max_new_tokens` to control the maximum length of the generation.
  warnings.warn(
2022-11-21 16:11:56.550 | INFO     | manga_ocr.ocr:__init__:29 - OCR ready
Resuming playback. This behavior can be disabled with --no-resume-playback.
 (+) Video --vid=1 (*) 'SOFCJ' (h264 1920x1080 23.976fps)
 (+) Audio --aid=1 --alang=jpn (*) 'BDMV' (opus 6ch 48000Hz)
     Subs  --sid=1 --slang=eng (*) 'Full Subs [Black Tea]' (ass)
File tags:
 Title: 名探偵コナン ハロウィンの花嫁
AO: [wasapi] 48000Hz stereo 2ch float
VO: [libmpv] 1920x1080 yuv420p10
(Paused) AV: 00:00:49 / 01:50:27 (1%) A-V:  0.000
Track added:
 (+) Video --vid=1 (*) 'SOFCJ' (h264 1920x1080 23.976fps)
 (+) Audio --aid=1 --alang=jpn (*) 'BDMV' (opus 6ch 48000Hz)
     Subs  --sid=1 --slang=eng (*) 'Full Subs [Black Tea]' (ass)
 (+) Subs  --sid=2 'Detective Conan Movie The Bride of Halloween - 25.sup' (hdmv_pgs_subtitle) (external)
(Paused) AV: 00:00:50 / 01:50:27 (1%) A-V:  0.000

@ripose-jp
Copy link
Owner

Bizzare. The only difference between the two versions is the one that doesn't work uses WinMain. The fact that a search opens when OCR is triggered means it returns something. I'll have to try to reproduce it later. Due to the holidays I won't have access to a computer running Windows for about a week. Sorry I can't get to this sooner.

@ripose-jp ripose-jp added bug Something isn't working windows This only occurs on Windows labels Nov 21, 2022
@ripose-jp
Copy link
Owner

I'm going to need your help. I tested OCR on Windows as far as being certain it would work if you managed to get manga-ocr installed. I wasn't able to actually get manga-ocr installed since I couldn't get pytorch to install via pip. Can you give me instructions on what you did to get it working on Windows?

@Juiin
Copy link
Author

Juiin commented Dec 4, 2022

Hmm, it has been a while so i don't remember exactly what i did. But i remember already having had installed Manga-ocr through https://github.com/kha-white/mokuro this, so i didn't need to install it again for Memento.

I don't remember having any problems with pytorch, but i'm not 100% sure. Sorry, that i can't be of more help.

@ripose-jp
Copy link
Owner

No problem. I might have to wait until PyTorch supports Python 3.10 on Windows before I can fix this though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows This only occurs on Windows
Projects
None yet
Development

No branches or pull requests

2 participants