dmMaze / BallonsTranslator

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

是否有不启动GUI的运行方式?Could BallonsTranslator run without GUI? #413

Closed aqssxlzc closed 5 months ago

aqssxlzc commented 5 months ago

我现在在没有独立显卡的电脑上工作,希望能在Colab或者类似的远程GPU服务器上运行ctd, OCR和inpaint。然后下载回本地,校对之后再汉化。是否有这样的工作模式。预先感谢!

I current using PC without Nvidia card. Is there anyway run BallonsTranslator headless (without GUI) in cli ? I could upload the code model and manga images, do the ctd, ocr and inpaint pipeline remotely . Then download the result. Thanks in advance.

bropines commented 5 months ago

I current using PC without Nvidia card. Is there anyway run BallonsTranslator headless (without GUI) in cli ? I could upload the code model and manga images, do the ctd, ocr and inpaint pipeline remotely . Then download the result. Thanks in advance.

In fact, all the functions that are in our program are available here. Here you can even create a service for yourself and work from another device.

https://github.com/VoileLabs/cotrans https://github.com/zyddnys/manga-image-translator

aqssxlzc commented 5 months ago

I current using PC without Nvidia card. Is there anyway run BallonsTranslator headless (without GUI) in cli ? I could upload the code model and manga images, do the ctd, ocr and inpaint pipeline remotely . Then download the result. Thanks in advance.

In fact, all the functions that are in our program are available here. Here you can even create a service for yourself and work from another device.

https://github.com/VoileLabs/cotrans https://github.com/zyddnys/manga-image-translator

Thank you. I have tried manga-image-translator. But I need to edit the OCR result in Ballonstranslator. It seem that manga-image-translator can't product the json file prefix by "imgtrans_" which required by BallonsTranslator. And what i really need is running the ctd-ocr-inpaint pipeline in batch mode in remote GPU server.

bropines commented 5 months ago

Thank you. I have tried manga-image-translator. But I need to edit the OCR result in Ballonstranslator. It seem that manga-image-translator can't product the json file prefix by "imgtrans_" which required by BallonsTranslator. And what i really need is running the ctd-ocr-inpaint pipeline in batch mode in remote GPU server.

Well, there is no such function yet. It’s like we didn’t imagine that anyone would need it. Of course, I can write something quick, or stupidly concoct a converter on my knee, but I think dmMaze will do it better.

bropines commented 5 months ago

I current using PC without Nvidia card. Is there anyway run BallonsTranslator headless (without GUI) in cli ? I could upload the code model and manga images, do the ctd, ocr and inpaint pipeline remotely . Then download the result. Thanks in advance.

In fact, all the functions that are in our program are available here. Here you can even create a service for yourself and work from another device. https://github.com/VoileLabs/cotrans https://github.com/zyddnys/manga-image-translator

Thank you. I have tried manga-image-translator. But I need to edit the OCR result in Ballonstranslator. It seem that manga-image-translator can't product the json file prefix by "imgtrans_" which required by BallonsTranslator. And what i really need is running the ctd-ocr-inpaint pipeline in batch mode in remote GPU server.

Can I ask you to give me an example json that is generated while M-I-T is running? I don't have enough space to put it too

aqssxlzc commented 5 months ago

Thank you. I have tried manga-image-translator. But I need to edit the OCR result in Ballonstranslator. It seem that manga-image-translator can't product the json file prefix by "imgtrans_" which required by BallonsTranslator. And what i really need is running the ctd-ocr-inpaint pipeline in batch mode in remote GPU server.

Can I ask you to give me an example json that is generated while M-I-T is running? I don't have enough space to put it too

M-I-T is not generated any json while running, through I am not very sure about that, but I could not find the way product json output.

dmMaze commented 5 months ago

现在可以了,拉一下源码然后参考 https://github.com/dmMaze/BallonsTranslator?tab=readme-ov-file#%E5%91%BD%E4%BB%A4%E8%A1%8C%E6%A8%A1%E5%BC%8F-%E6%97%A0gui

qianzhou123 commented 5 months ago

现在可以了,拉一下源码然后参考 https://github.com/dmMaze/BallonsTranslator?tab=readme-ov-file#%E5%91%BD%E4%BB%A4%E8%A1%8C%E6%A8%A1%E5%BC%8F-%E6%97%A0gui

方便写一个web网页吗,有个web网页远程操作起来会好用点。

https://github.com/zyddnys/manga-image-translator 这个项目部署起来相对太麻烦了

aqssxlzc commented 5 months ago

现在可以了,拉一下源码然后参考 https://github.com/dmMaze/BallonsTranslator?tab=readme-ov-file#%E5%91%BD%E4%BB%A4%E8%A1%8C%E6%A8%A1%E5%BC%8F-%E6%97%A0gui

感谢如此迅速的功能添加。 但是我在colab上测试上出现报错后命令行崩溃。 报错为

[INFO   ] mainwindow:run_next_dir:1213 - translating /content/test ...
Text Detection:   0% 0/1 [00:00<?, ?it/s]
OCR:   0% 0/1 [00:00<?, ?it/s]
Translation:   0% 0/1 [00:00<?, ?it/s]
Inpaint:   0% 0/1 [00:00<?, ?it/s]
This plugin does not support propagateSizeHints()
terminate called without an active exception

测试代码为

!rm -rf test
!mkdir test
!curl https://upload.wikimedia.org/wikipedia/commons/5/58/Wikipe-tan_manga_page1.jpg -o test/test.jpg
!git clone --single-branch --branch dev https://github.com/dmMaze/BallonsTranslator.git
!python BallonsTranslator/launch.py --headless --exec_dirs "/content/test"

https://colab.research.google.com/drive/13fJhYV6SN-WSg5I4_cnIoT6XzeP5jjcI?usp=sharing

aqssxlzc commented 5 months ago

补充: 在本地的linux系统(Archlinux,最新内核)上测试出现同样的问题。报错信息一致。

dmMaze commented 5 months ago

补充: 在本地的linux系统(Archlinux,最新内核)上测试出现同样的问题。报错信息一致。

现在可以了

aqssxlzc commented 5 months ago

Working perfect!太感谢了!