Closed wwardaww closed 7 months ago
What device and OS are you using?
Ubuntu 22.04 and desktop
and also im using python 3.10
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'
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
comment lang_code = 'zh_CN'
uncomment # lang_code = 'en_US'
Install font 微软雅黑
or change global_font_name and font_dic accordingly in your MomoTranslator_XXX_config.yml file
now i can access gui bu i cant process this image
console output
trace:
gui:
check_pts image:
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.
what is scan file? iamge name is : RCO003_1663976825.jpg
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:
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.
thx for the assist i will try tomorrow
pyqt6==6.5.0
in requirements.txttsseract
via apt-getmultimode
, median
, mean
to statistics.multimode
, statistics.median
, statistics.mean
since python thorws median module does not exist
do_mode: 'do_dev_folder'
it's gices me a new error: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.
Search for comictextdetector.pt.onnx
in the code and you'll get the path. Or you can change the path in the code.
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.
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.
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
Hi, we cannot open the gui