dmMaze / BallonsTranslator

深度学习辅助漫画翻译工具, 支持一键机翻和简单的图像/文本编辑 | Yet another computer-aided comic/manga translation tool powered by deeplearning
GNU General Public License v3.0
2.5k stars 172 forks source link

A couple of questions #18

Closed bropines closed 2 years ago

bropines commented 2 years ago

The program when performs all translations, painting over even what is not needed. Like I don't want any cloud to be painted over and translated, with text, but it can't be undone. There is no paint layer as such. I would like to be able to remove probably painted and translated pieces

If you don't understand anything, I can attach a video)

dmMaze commented 2 years ago

Did you mean manually perform/correct text removal(i.e., inpainting)? Actually there is a inpainted layer, it just doesn't show explicitly in the ui. And there is a mask layer to show which part are inpainted. To 'erase' unwanted inpainted results, use the inpainted tool or rect tool with your right button pressed, please refer to the following gifs and notice the keystrokes are shown on the top left corner:

https://github.com/dmMaze/BallonsTranslator/blob/master/doc/src/imgedit_inpaint.gif https://github.com/dmMaze/BallonsTranslator/blob/master/doc/src/rect_tool.gif

bropines commented 2 years ago

It worked, thanks Does the project have its own discord/telegram to throw off bugs and error reports? Github allows it, but often bugs are simply associated with the departure of python modules.

dmMaze commented 2 years ago

Does the project have its own discord/telegram to throw off bugs and error reports?

Nope.

Github allows it, but often bugs are simply associated with the departure of python modules

I'll add some instructions to readme for running the source code.

bropines commented 2 years ago

One more question before closing the issue. Can you add a config to translate to another language? I would like to translate the program settings into my language, but I don't really want to get into the code.

dmMaze commented 2 years ago

This program can be translated using linguist.exe, which should be installed with pyqt.

image

If you are comfortable with it, edit ballontranslator/data/translate/template.ts in linguist and export to ballontranslator/data/translate/[LANGUAGE].qm

You can print QLocale.system().name() in the main function of ballontranslator/__main__.py to determine the [LANGUAGE] of your system:

Please notice the template.ts is a bit out of date, I'll update it after I merge the textlayout branch, perhaps later this week.

dmMaze commented 2 years ago

edit ballontranslator/data/translate/template.ts

Update: run python ballontranslator\scripts\update_translation.py to generate or update [LANGUAGE].ts

bropines commented 2 years ago

edit ballontranslator/data/translate/template.ts

Update: run python ballontranslator\scripts\update_translation.py to generate or update [LANGUAGE].ts

Thanks

bropines commented 2 years ago

A couple more questions.

  1. Is it possible to add support for yandex translate?
  2. Is it possible to translate individual clouds as in this project (https://github.com/AntonRls/Manga-Translator)?
  3. In new versions of the code (if you just run it with all python modules), the GPU does not work. Just trying to poke at the video card (and I have as many as 2 of them from AMD and Nvidia), nothing happens
dmMaze commented 2 years ago

A couple more questions.

  1. I don't have an access key required by yandex, however, if you're familar with python and know how to use yandex's api, it would be easy to add it to the program, you can refer to https://github.com/dmMaze/BallonsTranslator/blob/master/doc/%E5%8A%A0%E5%88%AB%E7%9A%84%E7%BF%BB%E8%AF%91%E5%99%A8.md and this pr
  2. You mean ocr&translate single textblock created by user? No, I'll consider adding it to the right-click menu in the future. By the way, all translated texts are interactly editable.
  3. try pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116, AMD GPU would not work on windows.
bropines commented 2 years ago

image When you click once on a spot with the text-coloring tool, it gives an error. Just right-click on the spot

bropines commented 2 years ago

And let's say. I accidentally deleted a block.

  1. I did not understand how to make mine with text.
  2. Is it possible to apply OCR and all operations to only one page?
bropines commented 2 years ago

And I still don't have cuda support. I have two video cards. One is built-in, the second is discrete. Maybe because of this, cuda does not work? image

Snowad14 commented 2 years ago

Use your nvidia card, go to your terminal, type "python" then "import torch" and "torch.cuda.is_available()" and make sure it returns True otherwise your installation of pytorch is not well installed or you do not have install cuda on your system " nvcc --version" to see if you have installed cuda well. Also, why not use the compiled version you won't have any problem I think

dmMaze commented 2 years ago

When you click once on a spot with the text-coloring tool, it gives an error. Just right-click on the spot

fixed d55a1a054b2734dac46e9af8c9bdb138a467143f

  1. I did not understand how to make mine with text

Activate text editing mode and the rectangle button next to it:

image

then drag mouse on the canvas with right button pressed, see following gif, it's after delete operation

2. Is it possible to apply OCR and all operations to only one page?

No

bropines commented 2 years ago

Now I think my friend and I will make a couple of variants of the logo (icon). I'll send the options here.