matt-m-o / YomiNinja

Open-source OCR and dictionary tool.
GNU General Public License v3.0
275 stars 6 forks source link

Integrate Manga-OCR and Scanning with browser popup dictionary #6

Open jp-man25 opened 11 months ago

jp-man25 commented 11 months ago

It would be very nice to also have manga-ocr as it can be used with vertical text and manga, and it works better for pixelated retro text than PaddleOCR.

Something else that would be nice though not sure if possible, would be to be able to scan the text with browser popup dictionaries as if it were part of the browser, not with a different built in dictionary.

Really appreciate your work!

matt-m-o commented 11 months ago

Thank you for the suggestion. Integrating Manga-OCR is indeed in my plans for the future. I'm currently wondering if Google Lens/Cloud Vision should come first. Google, while not available offline and having some usage quotas, offers robust OCR capabilities and could be quicker to implement.

Regarding scanning from web browsers, it is possible, but has some drawbacks. Browsers don't support transparent windows, so the extracted text might be displayed over a static image or real-time video capture, potentially introducing some overhead depending on the setup. Currently, it can be achieved using texthookers like Texthooker UI.

I'd appreciate hearing your thoughts on these options. Thank you.

jp-man25 commented 11 months ago

I've used Google's OCR and it's quite amazing even for pixelated retro text, manga-ocr is still a bit lacking in that regard. Google's was able to tell this blob was 卿 image

It'd be very nice to have it and have some hotkey to change between Cloud Vision and PaddleOCR and/or have different hotkeys for each one, so as to avoid exhausting the usage of Cloud Vision.

And yeah, I was indeed thinking about scanning text from a transparent window, oh well.

I've been trying the app some more and for some reason now it crashes whenever I try to copy the OCRd text. It works if I close my browser, but I was able to use it just fine a few days ago... I reinstalled it and even tried with the new version but same thing. I only have 8GBs of Ram and oldish CPU, but I'm able to play modern games for the most part, so idk... Is there some setting I could change to perhaps make it lighter to use?

madmalkav commented 11 months ago

Maybe an option to get debug logs would be interesting for these reports.El 18 nov 2023, a las 7:37, jp-man25 @.***> escribió: I've used Google's OCR and it's quite amazing even for pixelated retro text, manga-ocr is still a bit lacking in that regard. Google's was able to tell this blob was 卿

It'd be very nice to have it and have some hotkey to change between Cloud Vision and PaddleOCR and/or have different hotkeys for each one, so as to avoid exhausting the usage of Cloud Vision. And yeah, I was indeed thinking about scanning text from a transparent window, oh well. I've been trying the app some more and for some reason now it crashes whenever I try to copy the OCRd text. It works if I close my browser, but I was able to use it just fine a few days ago... I reinstalled it and even tried with the new version but same thing. I only have 8GBs of Ram and oldish CPU, but I'm able to play modern games for the most part, so idk... Is there some setting I could change to perhaps make it lighter to use?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

matt-m-o commented 11 months ago

That's impressive, I'm curious if native speakers can read it.

A hotkey to switch OCRs sounds good, and configurable usage limits could also prevent overuse.

Regarding the crashes, I encountered a similar issue once, and it was resolved after a machine restart. It's interesting that closing the browser works for you. I don't think it's a RAM issue, as I experienced it with 32GB of RAM and didn't encounter it with 4GB even with the browser running in the background.

To make it lighter, try lowering the 'Maximum image width' setting.

I'll implement automated debugging logs in the future. For now, you can display logs by following these steps:

  1. Make sure Yomi Ninja is not running.
  2. In a folder of your choice, create a text file.
  3. Paste the following:
%localappdata%\Programs\yomininja-e\YomiNinja.exe
pause
  1. Save and rename the file to "run-yomininja-debug.bat".
  2. Double-click the "run-yomininja-debug.bat" file. You should see a command line window.

Try reproducing the crash, create a new issue, and share the CMD window content. Thanks.

matt-m-o commented 3 months ago

Update: MangaOCR was added in v0.7, but it currently lacks the Comic Text Detector (coming soon in v0.8). I'm working on the option to read from a browser, and it will be ready soon.

TingTingin commented 3 months ago

Update: MangaOCR was added in v0.7, but it currently lacks the Comic Text Detector (coming soon in v0.8). I'm working on the option to read from a browser, and it will be ready soon.

I tested and it seemily runs on cpu and is very slow is this intended

TingTingin commented 3 months ago

maybe a better question is if its possible to run manga_ocr on gpu with yomininja?