Coder Social home page Coder Social logo

Comments (19)

alicewish avatar alicewish commented on June 3, 2024 1

comment lang_code = 'zh_CN'
uncomment # lang_code = 'en_US'

from momotranslator.

alicewish avatar alicewish commented on June 3, 2024 1

Search for comictextdetector.pt.onnx in the code and you'll get the path. Or you can change the path in the code.

from momotranslator.

alicewish avatar alicewish commented on June 3, 2024 1

In the config file, change target_lang: 'zh-CN' to your desired language, and make sure it is valid.
See more at https://github.com/nidhaloff/deep-translator

The ChatGPT web translator is written for Mac automation and does not work on any other system.

from momotranslator.

alicewish avatar alicewish commented on June 3, 2024

What device and OS are you using?

from momotranslator.

wwardaww avatar wwardaww commented on June 3, 2024

Ubuntu 22.04 and desktop

from momotranslator.

wwardaww avatar wwardaww commented on June 3, 2024

and also im using python 3.10

from momotranslator.

wwardaww avatar wwardaww commented on June 3, 2024

hi i found it!! i install pyqt6==6.2.0 and then i un comment nltk but now i have another problem:

Traceback (most recent call last):
  File "/media/arda/E64E3CD94E3CA3E91/Projeler/MomoTranslator/pyqt5_momotranslator.py", line 9315, in <module>
    msyh_font20 = ImageFont.truetype(msyh_font_ttc, 20)
  File "/home/arda/.local/lib/python3.10/site-packages/PIL/ImageFont.py", line 797, in truetype
    return freetype(font)
  File "/home/arda/.local/lib/python3.10/site-packages/PIL/ImageFont.py", line 794, in freetype
    return FreeTypeFont(font, size, index, encoding, layout_engine)
  File "/home/arda/.local/lib/python3.10/site-packages/PIL/ImageFont.py", line 230, in __init__
    load_from_bytes(font)
  File "/home/arda/.local/lib/python3.10/site-packages/PIL/ImageFont.py", line 210, in load_from_bytes
    self.font_bytes = f.read()
AttributeError: 'NoneType' object has no attribute 'read'

image

from momotranslator.

wwardaww avatar wwardaww commented on June 3, 2024

Hi i fix the all issue but interface is chiniese is there a way to change it or should i translate it? i willopen a pr for fixes it's looks like when program cant found the font it's fails

from momotranslator.

alicewish avatar alicewish commented on June 3, 2024

Install font 微软雅黑 or change global_font_name and font_dic accordingly in your MomoTranslator_XXX_config.yml file

from momotranslator.

wwardaww avatar wwardaww commented on June 3, 2024

now i can access gui bu i cant process this image

RCO007_1663976825

console output

image

trace:

image

gui:

image

check_pts image:

check_pts

from momotranslator.

alicewish avatar alicewish commented on June 3, 2024

There is one bubble so there should only be one textblock but the check_pts image shows two textblocks, one with blue filling and one with white filling.
Give me the whole name of the scan file, I'll use it to find the file and get a proper WLB_ext_px value.

from momotranslator.

wwardaww avatar wwardaww commented on June 3, 2024

what is scan file? iamge name is : RCO003_1663976825.jpg

from momotranslator.

alicewish avatar alicewish commented on June 3, 2024

You can get the newest code and try again.
Remember to download comictextdetector.pt.onnx if you hadn't.

Also I tried the image myself:
287463623-e8118492-4643-4c8d-bb0c-f3843fce82e6-画格
![287463623-e8118492-4643-4c8d-bb0c-f3843fce82e6-CTD](https://github.com/alicewish/MomoTranslator/assets/11379080/c41c69
287463623-e8118492-4643-4c8d-bb0c-f3843fce82e6-TextBlock-ffffff-white~000000-black
287463623-e8118492-4643-4c8d-bb0c-f3843fce82e6-Mask-ffffff-white~000000-black
f9-fd12-4602-88d9-598e188e8cae)

from momotranslator.

alicewish avatar alicewish commented on June 3, 2024

If you are famaliar with Python then change config file to do_mode: 'do_dev_folder'
The error message might be clearer without the GUI.

from momotranslator.

wwardaww avatar wwardaww commented on June 3, 2024

thx for the assist i will try tomorrow

from momotranslator.

wwardaww avatar wwardaww commented on June 3, 2024

Progress update

  • i change pyqt6 version to pyqt6==6.5.0 in requirements.txt
  • I install tsseract via apt-get
  • I chage multimode, median, mean to statistics.multimode, statistics.median, statistics.mean since python thorws median module does not exist
  • I installed pandoc via Github page:

AND ITS WORKING !!!

  • when i try to open do_mode: 'do_dev_folder' it's gices me a new error:

image

from momotranslator.

alicewish avatar alicewish commented on June 3, 2024

In the config file, when using do_mode: 'do_dev_folder', change folder_name to your actual folder name, also make sure there is a corresponding folder under ComicProcess folder with that name.

from momotranslator.

alicewish avatar alicewish commented on June 3, 2024

I forgot to put in from statistics import median, multimode, mean can be from statistics or from cv2 or from numpy, not much difference.
Code updated on that.

from momotranslator.

wwardaww avatar wwardaww commented on June 3, 2024

I forgot to put in from statistics import median, multimode, mean can be from statistics or from cv2 or from numpy, not much difference. Code updated on that.

mean on cv2 expecting diffrent format (some numpy) so it's also must import from statistics

from momotranslator.

Related Issues (20)

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.