Giter VIP home page Giter VIP logo

comic-translation's People

Contributors

jtl1207 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

comic-translation's Issues

功能需求

很需要一个可调整缩放图片预览区域的功能. 资源如果很小的话, 有点看不清 orz

Program execution error

Hi,

I get following error when execute

Traceback (most recent call last):
  File "C:\Users\User\Downloads\comic_translation1.2.1\Python\lib\configparser.py", line 789, in get
    value = d[option]
  File "C:\Users\User\Downloads\comic_translation1.2.1\Python\lib\collections\__init__.py", line 898, in __getitem__
    return self.__missing__(key)            # support subclasses that define __missing__
  File "C:\Users\User\Downloads\comic_translation1.2.1\Python\lib\collections\__init__.py", line 890, in __missing__
    raise KeyError(key)
KeyError: 'word_mod'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "C:\Users\User\Downloads\comic_translation1.2.1\resources\main.py", line 971, in config_read
    self.var.word_mod = config.get('var', 'word_mod')
  File "C:\Users\User\Downloads\comic_translation1.2.1\Python\lib\configparser.py", line 792, in get
    raise NoOptionError(option, section)
configparser.NoOptionError: No option 'word_mod' in section: 'var'

Please assist

第一次运行无法安装程序

每次运行都是到这里就完事了
→[2023-02-11 18:10:56,440] [INFO] | QPT Runtime版本号为1.0b4.dev6,若无法使用该
程序,可向程序发布者或GitHub: QPT-Family/QPT提交issue寻求帮助
→[2023-02-11 18:10:56,451] [DEBUG] | SHELL: chcp 65001
→[2023-02-11 18:10:56,594] [DEBUG] | Windows PowerShell
→[2023-02-11 18:10:56,595] [DEBUG] | Ȩ (C) 2009 Microsoft CorporationȨ
系统是2008r2 软件版本是1.2.1最新 难道不支持旧系统么?

program execution error

First of all, I will inform you that it is a laptop that does not have an external graphics card. The installation proceeds without any errors, and if you run the program after installation, the program will end with the following errors.
It was executed in the latest version of 1.2.1 and Korean patch was also conducted.
It ran in a Windows 10 64-bit environment.
Add the contents. When you overwrite the Korean patch file as it is, the error occurs and ends. If you don't overwrite the Korean patch, it won't end.
Also, is the overall translation not activated?
Traceback (most recent call last):
File "E:\comic\resources\main.py", line 965, in config_read
config.read('config.ini')
File "E:\comic\Python\lib\configparser.py", line 697, in read
self._read(fp, filename)
File "E:\comic\Python\lib\configparser.py", line 1017, in _read
for lineno, line in enumerate(fp, start=1):
UnicodeDecodeError: 'cp949' codec can't decode byte 0xc9 in position 74: illegal multibyte sequence

1.2.0 version error..

image

Traceback (most recent call last):
File "C:\Users\power\Desktop\comic_translation1.2.0\resources\main.py", line 168, in
self.ui.pushButton_5.clicked.connect(lambda event: self.doit())
File "C:\Users\power\Desktop\comic_translation1.2.0\resources\main.py", line 646, in doit
self.do_translation()
File "C:\Users\power\Desktop\comic_translation1.2.0\resources\main.py", line 680, in do_translation
self.memory.img_show = img.copy()
AttributeError: 'Render' object has no attribute 'copy'

I clicked button to edit text.. but not works..

功能需求

很需要一个可调整缩放图片预览区域的功能. 资源如果很小的话, 有点看不清 orz

opencv安装过程缺失配置文件

手动安装paddlepaddle_gpu不再报错,开始提示opencv配置文件丢失
2022-11-23 00:50:44,976 ERROR: 在执行终端命令时检测到了失败,完整信息如下:
PS C:\Users\Twilight\Desktop\comic_translation1.2.1\comic_translation1.2.1> cd "C:\Users\Twilight\Desktop\comic_translation1.2.1\comic_translation1.2.1\resources";./../Python/python.exe "C:\Users\Twilight\Desktop\comic_translation1.2.1\comic_translation1.2.1\resources\main.py" ; echo "---QPT OUTPUT STATUS CODE---" $?
Traceback (most recent call last):
File "C:\Users\Twilight\Desktop\comic_translation1.2.1\comic_translation1.2.1\resources\main.py", line 11, in
import cv2
File "C:\Users\Twilight\Desktop\comic_translation1.2.1\comic_translation1.2.1\Python\Lib\site-packages\cv2_init_.py", line 188, in
bootstrap()
File "C:\Users\Twilight\Desktop\comic_translation1.2.1\comic_translation1.2.1\Python\Lib\site-packages\cv2_init_.py", line 118, in bootstrap
load_first_config(['config.py'], True)
File "C:\Users\Twilight\Desktop\comic_translation1.2.1\comic_translation1.2.1\Python\Lib\site-packages\cv2_init_.py", line 116, in load_first_config
raise ImportError('OpenCV loader: missing configuration file: {}. Check OpenCV installation.'.format(fnames))
ImportError: OpenCV loader: missing configuration file: ['config.py']. Check OpenCV installation.ns: 1.19.5)
ERROR: No matching distribution found for numpy<=1.19.3,>=1.13; python_version >= "3.5" and platform_system == "Windows"

In English plz

Does this support English?
It be great if there was an English manual/guide on how to get this to work!

OpenCV版本问题

使用requirement.txt中的版本安装后出现类似于一下issue的问题
opencv/opencv#18300
在手动更新opencv至最新版后问题消失

另,在打开图片过大时出现了图片超出屏幕边缘的问题

建议增加其他网盘分流

github移动网络下的很慢,建议增加百度网盘等下载方式。github下载小文件还好,这种大文件实在有点慢。

不能自动翻译一整页

不知道是不是我没有安装成功,我不能点击整页翻译;
真心希望能有全自动翻译整本漫画的功能,不需要我一个个对话框的点击确认,或者提供一个api来让我调用这个程序,指定漫画目录,生成目录,字体,语言等一些参数来完成全自动翻译;
还有目前翻译不太准确,希望能接入 gpt3.5 ,可以让gpt 根据前后文语境来翻译, 用户自己提供api base 和key ;
如果能完成这两个功能,真的就是宝藏项目了,造福二次元

一些小问题

先介绍我的情况,win10-21H1,拉跨i7-4700MQ,除了有点卡,纯CPU工作还是勉强能跑,明天试试win11+3060。然后1.1.0版本成功使用,1.2.0版本初始化报错,日志文件百度云,使用1.2.0版的resources文件夹替换1.1.0可以成功使用新功能。但是不知道是替换还是替他原因,1.2.0版本的去文字没1.1.0版本智能了,直接按照选框大小填充白色,1.1.0会进行判断。

其他小问题:
1.如果选择图片的路径有中文OR日文,修改完的图片会保存失败,英文路径无问题。
2.挂梯的话,程序可能是因为连不上Google服务器,启动时偶尔会卡死并闪退,不挂梯则正常。
3.字体设置选项的【定位:手动】不会用,期待使用说明。

一些建议:
1.希望添加译文固定字号功能,现在的智能识别偶尔会超出选框,需要经常试错。
2.希望选框可以通过四边调整大小和移动。
3.希望添加的译文可以通过选框拖动位置进行微调。
4.希望译文区添加历史译文记录功能,十条左右即可,方便撤销更改。

感谢倾听

切換字體閃退

切換字體後會閃退
原本內建字體會顯示嵌字失敗
向大佬求救

新增功能

有没有撤回或者重做这类功能,不然手误一次之前全白搭

安装失败

本地Python版本为3.7.5,话说这种包不先搞个venv么?直接装感觉挺容易遇到这种问题的。

初始化进度 20:034/8 |━━━━━━━━━━ | 50.00% PaddlePaddlePackage部署中...2022-03-16 20:03:20,175 ERROR: 在执行终端命令时检测到了失败,完整信息如下:
PS C:\Users\AERO\Downloads\comic_translation1.1.0.7z\comic_translation1.1.0> cd C: ;C:\Users\AERO\Downloads\comic_translation1.1.0.7z\comic_translation1.1.0\Python\python.exe -m pip install paddlepaddle-gpu==2.2.2 -i https://mirrors.bfsu.edu.cn/pypi/web/simple -f C:\Users\AERO\Downloads\comic_translation1.1.0.7z\comic_translation1.1.0\opt/packages --no-index --target C:\Users\AERO\Downloads\comic_translation1.1.0.7z\comic_translation1.1.0\Python\Lib\site-packages --isolated --disable-pip-version-check --cache-dir C:\Users\AERO\AppData\Local\Temp\QPT_Cache_V/1.0b3.dev5\pip_cache --timeout 10 --quiet; echo "---QPT OUTPUT STATUS CODE---" ;$?
ERROR: Could not find a version that satisfies the requirement numpy<=1.19.3,>=1.13; python_version >= "3.5" and platform_system == "Windows" (from paddlepaddle-gpu) (from versions: 1.19.5)
ERROR: No matching distribution found for numpy<=1.19.3,>=1.13; python_version >= "3.5" and platform_system == "Windows"

初始化进度 20:036/8 |━━━━━━━━━━━━━━━ | 75.00% BatchInstallation部署中...Traceback (most recent call last)::
File "C:\Users\AERO\Downloads\comic_translation1.1.0.7z\comic_translation1.1.0\Python\Lib\site-packages\pip_vendor\pkg_resources_init_.py", line 3021, in _dep_map
return self._dep_map
File "C:\Users\AERO\Downloads\comic_translation1.1.0.7z\comic_translation1.1.0\Python\Lib\site-packages\pip_vendor\pkg_resources_init
.py", line 2815, in getattr
raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\AERO\Downloads\comic_translation1.1.0.7z\comic_translation1.1.0\Python\Lib\site-packages\pip_vendor\pkg_resources_init_.py", line 3012, in _parsed_pkg_info
return self.pkg_info
File "C:\Users\AERO\Downloads\comic_translation1.1.0.7z\comic_translation1.1.0\Python\Lib\site-packages\pip_vendor\pkg_resources_init
.py", line 2815, in getattr
raise AttributeError(attr)
AttributeError: _pkg_info

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "C:\Users\AERO\Downloads\comic_translation1.1.0.7z\comic_translation1.1.0\Python\Lib\site-packages\qpt\run.py", line 25, in
module.run()
File "C:\Users\AERO\Downloads\comic_translation1.1.0.7z\comic_translation1.1.0\Python\Lib\site-packages\qpt\executor.py", line 470, in run
self._solve_module()
File "C:\Users\AERO\Downloads\comic_translation1.1.0.7z\comic_translation1.1.0\Python\Lib\site-packages\qpt\executor.py", line 425, in solve_module
render()
File "C:\Users\AERO\Downloads\comic_translation1.1.0.7z\comic_translation1.1.0\Python\Lib\site-packages\qpt\executor.py", line 419, in render
sub_module.unpack()
File "C:\Users\AERO\Downloads\comic_translation1.1.0.7z\comic_translation1.1.0\Python\Lib\site-packages\qpt\modules\base.py", line 202, in unpack
opt.run(op_path)
File "C:\Users\AERO\Downloads\comic_translation1.1.0.7z\comic_translation1.1.0\Python\Lib\site-packages\qpt\modules\base.py", line 73, in run
self.act()
File "C:\Users\AERO\Downloads\comic_translation1.1.0.7z\comic_translation1.1.0\Python\Lib\site-packages\qpt\modules\package.py", line 149, in act
ready_list = PythonPackages.search_packages_dist_info()[0].keys()
File "C:\Users\AERO\Downloads\comic_translation1.1.0.7z\comic_translation1.1.0\Python\Lib\site-packages\qpt\kernel\qcode.py", line 64, in search_packages_dist_info
dep_pkg_dict = PythonPackages.search_dep()
File "C:\Users\AERO\Downloads\comic_translation1.1.0.7z\comic_translation1.1.0\Python\Lib\site-packages\qpt\kernel\qcode.py", line 115, in search_dep
dep = pkg.requires()
File "C:\Users\AERO\Downloads\comic_translation1.1.0.7z\comic_translation1.1.0\Python\Lib\site-packages\pip_vendor\pkg_resources_init
.py", line 2736, in requires
dm = self.dep_map
File "C:\Users\AERO\Downloads\comic_translation1.1.0.7z\comic_translation1.1.0\Python\Lib\site-packages\pip_vendor\pkg_resources_init
.py", line 3023, in _dep_map
self.__dep_map = self.compute_dependencies()
File "C:\Users\AERO\Downloads\comic_translation1.1.0.7z\comic_translation1.1.0\Python\Lib\site-packages\pip_vendor\pkg_resources_init
.py", line 3032, in _compute_dependencies
for req in self.parsed_pkg_info.get_all('Requires-Dist') or []:
File "C:\Users\AERO\Downloads\comic_translation1.1.0.7z\comic_translation1.1.0\Python\Lib\site-packages\pip_vendor\pkg_resources_init
.py", line 3014, in parsed_pkg_info
metadata = self.get_metadata(self.PKG_INFO)
File "C:\Users\AERO\Downloads\comic_translation1.1.0.7z\comic_translation1.1.0\Python\Lib\site-packages\pip_vendor\pkg_resources_init
.py", line 1420, in get_metadata
value = self.get(path)
File "C:\Users\AERO\Downloads\comic_translation1.1.0.7z\comic_translation1.1.0\Python\Lib\site-packages\pip_vendor\pkg_resources_init
.py", line 1616, in _get
with open(path, 'rb') as stream:
FileNotFoundError: [Errno 2] No such file or directory: 'c:\users\aero\downloads\comic_translation1.1.0.7z\comic_translation1.1.0\python\lib\site-packages\torchvision-0.10.1.dist-info\METADATA'

C:\Users\AERO\Downloads\comic_translation1.1.0.7z\comic_translation1.1.0>pause
Press any key to continue . . .

从git repo启动 从huggingface下载东西时http401错误

我用的Linux, 这是我git clone后的各种设置:

  • 用python3.9创建venv (python3.9是conda的)
  • venv/bin/pip install -r requirements.txt
  • venv/bin/huggingface-cli login

运行 venv/bin/python main.py 后能看到UI窗口, 然后终端报下列错误, 程序结束

% venv/bin/python main.py 
Traceback (most recent call last):
  File "/home/dev/ML/comic-translation/venv/lib/python3.9/site-packages/transformers/feature_extraction_utils.py", line 404, in get_feature_extractor_dict
    resolved_feature_extractor_file = cached_path(
  File "/home/dev/ML/comic-translation/venv/lib/python3.9/site-packages/transformers/file_utils.py", line 1921, in cached_path
    output_path = get_from_cache(
  File "/home/dev/ML/comic-translation/venv/lib/python3.9/site-packages/transformers/file_utils.py", line 2125, in get_from_cache
    _raise_for_status(r)
  File "/home/dev/ML/comic-translation/venv/lib/python3.9/site-packages/transformers/file_utils.py", line 2052, in _raise_for_status
    request.raise_for_status()
  File "/home/dev/ML/comic-translation/venv/lib/python3.9/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/.%5Cmanga_ocr%5Cmodel/resolve/main/preprocessor_config.json

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/dev/ML/comic-translation/main.py", line 966, in config_read
    self.change_mod(self.var.img_language)
  File "/home/dev/ML/comic-translation/main.py", line 258, in change_mod
    thread_language = threading.Thread(target=self.thread_language('ja'))
  File "/home/dev/ML/comic-translation/main.py", line 273, in thread_language
    self.memory.model = MangaOcr()
  File "/home/dev/ML/comic-translation/manga_ocr/ocr.py", line 14, in __init__
    self.feature_extractor = AutoFeatureExtractor.from_pretrained(pretrained_model_name_or_path)
  File "/home/dev/ML/comic-translation/venv/lib/python3.9/site-packages/transformers/models/auto/feature_extraction_auto.py", line 261, in from_pretrained
    config_dict, _ = FeatureExtractionMixin.get_feature_extractor_dict(pretrained_model_name_or_path, **kwargs)
  File "/home/dev/ML/comic-translation/venv/lib/python3.9/site-packages/transformers/feature_extraction_utils.py", line 433, in get_feature_extractor_dict
    raise EnvironmentError(
OSError: We couldn't connect to 'https://huggingface.co/' to load this model and it looks like .\manga_ocr\model is not the path to a directory conaining a preprocessor_config.json file.
Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.
[1]    25063 IOT instruction (core dumped)  venv/bin/python main.py

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.