Coder Social home page Coder Social logo

momotranslator's Introduction

MomoTranslator

Pure OpenCV comic translation tool

Commit activity License Contributors

简体中文 | English

功能

漫画翻译辅助软件MomoTranslator当前的功能为:

  1. 查找漫画画格

  2. 查找漫画气泡

  3. 根据画格排序气泡,也可手动调整气泡排序

  4. 识别文字

  5. 使用谷歌和ChatGPT网页版翻译

填字功能暂不公开,如果是汉化者要用可以找我跑填字脚本。

演示视频

之前的功能演示视频见https://www.bilibili.com/video/BV1P54y1Q7fW/

软件特点是主要功能基于opencv,可以不需要pytorch,也可以使用pytorch来提高精确度。

之前不公开代码的原因是遭受多名视频讲漫up的抄袭、性*扰、网暴,我担心自己写的代码开源后成为逼死自己的工具。

由于现在ChatGPT的发展,我觉得也许有其他方法避免最糟糕的结果,可以先试试开源。

安装

首先,确保您的计算机上已安装Python 3.10。您可以通过在命令行输入以下命令来检查Python版本:

python --version

克隆此存储库或下载ZIP文件并解压缩。

使用以下命令安装必需的Python库:

pip install -r requirements.txt

另外,en_core_web_sm的安装需要科学上网,然后根据系统在终端运行对应的语句:

python3 -m spacy download en_core_web_sm #Mac
python.exe -m spacy download en_core_web_sm #Win

nltk数据库安装则需要python中执行如下脚本:

import nltk
nltk.download('words')
nltk.download('names')
nltk.download('wordnet')
nltk.download('omw-1.4')

使用

在命令行中,进入到项目文件夹并运行pyqt5_momotranslator.py文件:

python pyqt5_momotranslator.py

运行程序后,将出现一个图形用户界面。

许可证

本项目根据MIT许可证授权。有关更多信息,请查看LICENSE文件。

momotranslator's People

Contributors

alicewish 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

momotranslator's Issues

ModuleNotFoundError: No module named 'chardet'

2023-04-25_13-24-48

(venv) F:\MomoTranslator>python pyqt5_momotranslator.py
Traceback (most recent call last):
  File "F:\MomoTranslator\pyqt5_momotranslator.py", line 43, in <module>
    from aip import AipOcr
  File "F:\MomoTranslator\venv\lib\site-packages\aip\__init__.py", line 7, in <module>
    from .nlp import AipNlp
  File "F:\MomoTranslator\venv\lib\site-packages\aip\nlp.py", line 16, in <module>
    import chardet
ModuleNotFoundError: No module named 'chardet'

No module named cobble

D:\Github\Momo Translator>python pyqt5_momotranslator.py Traceback (most recent call last): File "D:\Github\Momo Translator\pyqt5_momotranslator.py", line 66, in <module> from mammoth import convert_to_html File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python310\lib\site-packages\mammoth\__init__.py", line 1, in <module> from . import docx, conversion, options, images, transforms, underline File "C:\Users\LENOVO\AppData\Local\Programs\Python\Python310\lib\site-packages\mammoth\docx\__init__.py", line 4, in <module> import cobble ModuleNotFoundError: No module named 'cobble'

ModuleNotFoundError: No module named 'stdlib_list'

2023-04-23_20-36-13

(venv) F:\MomoTranslator>python pyqt5_momotranslator.py
Traceback (most recent call last):
  File "F:\MomoTranslator\pyqt5_momotranslator.py", line 25, in <module>
    from stdlib_list import stdlib_list
ModuleNotFoundError: No module named 'stdlib_list

ModuleNotFoundError: No module named 'exceptions'

2023-04-25_13-24-48

(venv) F:\MomoTranslator>python pyqt5_momotranslator.py
Traceback (most recent call last):
  File "F:\MomoTranslator\pyqt5_momotranslator.py", line 48, in <module>
    from docx import Document
  File "F:\MomoTranslator\venv\lib\site-packages\docx.py", line 30, in <module>
    from exceptions import PendingDeprecationWarning
ModuleNotFoundError: No module named 'exceptions'

2023-04-25_13-30-48

ModuleNotFoundError: No module named 'docx'

2023-04-25_13-24-48

(venv) F:\MomoTranslator>python pyqt5_momotranslator.py
Traceback (most recent call last):
  File "F:\MomoTranslator\pyqt5_momotranslator.py", line 48, in <module>
    from docx import Document
ModuleNotFoundError: No module named 'docx'

Installing on linux issues

image

Hi, we cannot open the gui

Traceback (most recent call last):
  File "/media/arda/E64E3CD94E3CA3E91/Projeler/MomoTranslator/pyqt5_momotranslator.py", line 45, in <module>
    from PyQt6.QtCore import QPointF, QRectF, QSettings, QSize, QTranslator, Qt, pyqtSignal
ImportError: /home/arda/.local/lib/python3.10/site-packages/PyQt6/QtCore.abi3.so: undefined symbol: _ZN14QReadWriteLock16destroyRecursiveEP21QReadWriteLockPrivate, version Qt_6_PRIVATE_API

无法打开图形化界面

在 M2 Air的macOS Ventura 运行 pyqt5_ momotranslator.py 后,显示:

(py39) MomoTranslator % python pyqt5_momotranslator.py
docx
easyocr
loguru
matplotlib
natsort
numpy
pytesseract
qtawesome
scipy
torch
webcolors
xmltodict
2023-04-21 10:52:10.913 | DEBUG    | __main__:wrapper:350 - generate_requirements took: 0.09秒

但是并没有出现图形界面

ModuleNotFoundError: No module named 'PyQt6'

2023-04-23_20-36-13

(venv) F:\MomoTranslator>python pyqt5_momotranslator.py
Traceback (most recent call last):
  File "F:\MomoTranslator\pyqt5_momotranslator.py", line 36, in <module>
    from PyQt6.QtCore import QSettings, QSize, QTranslator, Qt
ModuleNotFoundError: No module named 'PyQt6'

ModuleNotFoundError: No module named 'deep_translator

2023-04-25_13-24-48

(venv) F:\MomoTranslator>python pyqt5_momotranslator.py
Traceback (most recent call last):
  File "F:\MomoTranslator\pyqt5_momotranslator.py", line 47, in <module>
    from deep_translator import GoogleTranslator
ModuleNotFoundError: No module named 'deep_translator'

注释翻译

我可以加入注释的翻译么?

还有就是本地化中,也可以加入西班牙语和葡萄牙语。日语->西班牙语的漫画翻译量相当可观。

如果得到许可,我就创建PR了

最新更i性能Win11下图形界面打不开报错

E:\MomoTranslator-main>python pyqt5_momotranslator.py
2023-10-23 13:35:35.650 | DEBUG | main:AppConfig:2574 - 当前用户配置文件名为:MomoTranslator_AMD64_16GB_config.yml
2023-10-23 13:35:35.785 | DEBUG | main::8997 - msyh_font_ttc='C:/Windows/Fonts/msyh.ttc'
Traceback (most recent call last):
File "E:\MomoTranslator-main\pyqt5_momotranslator.py", line 8998, in
msyh_font20 = ImageFont.truetype(msyh_font_ttc.as_posix(), 20)
AttributeError: 'str' object has no attribute 'as_posix'

ModuleNotFoundError: No module named 'aip'

2023-04-23_20-36-13

(venv) F:\MomoTranslator>python pyqt5_momotranslator.py
Traceback (most recent call last):
  File "F:\MomoTranslator\pyqt5_momotranslator.py", line 43, in <module>
    from aip import AipOcr
ModuleNotFoundError: No module named 'aip'

2023-04-23_20-47-43

请问技术上能不能编译成exe文件

pythin版本3.12,运行pip install -r requirements.txt时报错,所以我就手动一个个安装。在安装到easyocr和pytorch时安装了很多遍也上网查了教程但还是失败,所以就想问问是否能编译,谢谢。

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.