Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: The text often appears kinda off or is missing entirely. #703

Open
BlaskKilt opened this issue Sep 3, 2024 · 12 comments
Open

[Bug]: The text often appears kinda off or is missing entirely. #703

BlaskKilt opened this issue Sep 3, 2024 · 12 comments
Labels
bug Something isn't working

Comments

@BlaskKilt
Copy link

Issue

The text often appears kinda off or is missing entirely. Is this considered normal? I have encircled the problematic areas in red. This issue does not seem to occur in manga2eng.

Is there a fix for this or commands to set as input? I'd be so much happy if someone helped me.

8
11

Command Line Arguments

No response

Console logs

No response

@BlaskKilt BlaskKilt added the bug Something isn't working label Sep 3, 2024
@grassmedico
Copy link

maybe provide your prompt? or have you try changing the font yet?
mine dont have that problem

az_pages-to-jpg-0010
az_pages-to-jpg-0010x

@github-staff github-staff deleted a comment from maher-nakesh Oct 1, 2024
@BlaskKilt
Copy link
Author

BlaskKilt commented Oct 7, 2024

maybe provide your prompt? or have you try changing the font yet? mine dont have that problem

az_pages-to-jpg-0010 az_pages-to-jpg-0010x

Here is my command = python3 -m manga_translator -v --mode batch --font-size-minimum 14 --font-path fonts/anime_ace_3.ttf --upscale-ratio 2 --ignore-errors --overwrite --translator=gpt4 -l ENG -i /root/9.3.24/Mezase_goka_kyakusen_Fune

My command is pretty basic how should I get that kind of output?? By upping fonts? Have you used fixed fonts or other fonts?

Also I could get that kind of good result sometimes but the problem is still there and it will ruin all my outputs kinda caught me off guard everytime 😥

@retol
Copy link

retol commented Oct 23, 2024

It's not a problem with the font or input command, it's a problem with the program itself.
After updating all the files in Git to the latest version, I encountered the same issue, and I roll back to a previous version, the problem doesn't appear. I don't know what code does it, but after --force-horizontal processing, the right area is all removed.

I guess it probably specifies an invisible box area and deleting all text outside that area.
This issue doesn't occur in vertical mode, but the readability in vertical mode is terrible 🥶
This bug is serious and needs to be fixed.

@DuckDuckGo-prog
Copy link

DuckDuckGo-prog commented Oct 25, 2024

It's not a problem with the font or input command, it's a problem with the program itself. After updating all the files in Git to the latest version, I encountered the same issue, and I roll back to a previous version, the problem doesn't appear. I don't know what code does it, but after --force-horizontal processing, the right area is all removed.

I guess it probably specifies an invisible box area and deleting all text outside that area. This issue doesn't occur in vertical mode, but the readability in vertical mode is terrible 🥶 This bug is serious and needs to be fixed.

I've been searching for a fix or temporary fix for this, too, kinda destroys my reading. I'm not gonna lie, I hope someone fixes this.
Also, I'll be trying that --force-horizontal and see what it gets me.

@DuckDuckGo-prog
Copy link

It's not a problem with the font or input command, it's a problem with the program itself. After updating all the files in Git to the latest version, I encountered the same issue, and I roll back to a previous version, the problem doesn't appear. I don't know what code does it, but after --force-horizontal processing, the right area is all removed.

I guess it probably specifies an invisible box area and deleting all text outside that area. This issue doesn't occur in vertical mode, but the readability in vertical mode is terrible 🥶 This bug is serious and needs to be fixed.

By the way what version do you roll back too been month's for me here when I tested this app now I'm stuck with the same problem

@retol
Copy link

retol commented Oct 26, 2024

By the way what version do you roll back too been month's for me here when I tested this app now I'm stuck with the same problem

The last working latest version was not backup when updated, so I don't have it. It was created several months after my current backup from 2024-Jan-05(This is the version that I have verified works normally when Rollback.) So this bug hasn't been around that long.
The problem is that after several attempts to fix this, running pip install requirements.txt, the environment is updated to the latest version and the older versions translator no longer run. I shouldn't have done this 😂

https://drive.google.com/file/d/1zwVjvdW65PG075bu-qlYg9jMZ945h6gr/view?usp=drive_link
If you are in a past state where you have not updated requirements, try this. However, this version is older than the latest version that worked normally, so the translation performance will be lower. it is recommended to use it only temporarily until the bug is fixed.

@DuckDuckGo-prog
Copy link

By the way what version do you roll back too been month's for me here when I tested this app now I'm stuck with the same problem

The last working latest version was not backup when updated, so I don't have it. It was created several months after my current backup from 2024-Jan-05(This is the version that I have verified works normally when Rollback.) So this bug hasn't been around that long. The problem is that after several attempts to fix this, running pip install requirements.txt, the environment is updated to the latest version and the older versions translator no longer run. I shouldn't have done this 😂

https://drive.google.com/file/d/1zwVjvdW65PG075bu-qlYg9jMZ945h6gr/view?usp=drive_link If you are in a past state where you have not updated requirements, try this. However, this version is older than the latest version that worked normally, so the translation performance will be lower. it is recommended to use it only temporarily until the bug is fixed.

I rather trade lower performance rather than extra cancer reading 😂

@retol
Copy link

retol commented Oct 27, 2024

I rather trade lower performance rather than extra cancer reading 😂

Here's some good news.

https://github.com/zyddnys/manga-image-translator/forks?include=active&page=1

I'm not a developer so I didn't know, but here can access and download all the past commit forks. I was able to track down the past versions and finally find the cause of this trolling.

silverfantacy@0653847
This was caused by a code change in the text_render.py file in this commit.

The solution is to change the code in line 740 of the [text_render.py] file from A to B.

[A]
if bg is None :
x, y, w, h = cv2.boundingRect(canvas_text)
else :
x, y, w, h = cv2.boundingRect(canvas_border)
[B]
x, y, width, height = cv2.boundingRect(canvas_border)

This applies to the latest version as well, so to keep it clean, remove all translator files, download the latest file from github and apply that.

Or if you don't know how to apply this, download this patch file and overwrite it. Keep the folder structure.
https://drive.google.com/file/d/1Lfdrp-6HfoB6BmUdGcJws5dBAouFSKis/view?usp=drive_link

@retol
Copy link

retol commented Oct 27, 2024

[A code]
A
[B code]
B

@DuckDuckGo-prog
Copy link

DuckDuckGo-prog commented Oct 27, 2024

[A code] A [B code] B

Not all heroes wear cape's It fixes my problem thank you so much!

@BlaskKilt
Copy link
Author

I rather trade lower performance rather than extra cancer reading 😂

Here's some good news.

https://github.com/zyddnys/manga-image-translator/forks?include=active&page=1

I'm not a developer so I didn't know, but here can access and download all the past commit forks. I was able to track down the past versions and finally find the cause of this trolling.

silverfantacy@0653847 This was caused by a code change in the text_render.py file in this commit.

The solution is to change the code in line 740 of the [text_render.py] file from A to B.

[A]

if bg is None :
x, y, w, h = cv2.boundingRect(canvas_text)
else :
x, y, w, h = cv2.boundingRect(canvas_border)
[B]
x, y, width, height = cv2.boundingRect(canvas_border)
This applies to the latest version as well, so to keep it clean, remove all translator files, download the latest file from github and apply that.

Or if you don't know how to apply this, download this patch file and overwrite it. Keep the folder structure. https://drive.google.com/file/d/1Lfdrp-6HfoB6BmUdGcJws5dBAouFSKis/view?usp=drive_link

Wow!... thank you so much too, Glad someone notice this problem

@popcion
Copy link

popcion commented Oct 31, 2024

I rather trade lower performance rather than extra cancer reading 😂

Here's some good news.

https://github.com/zyddnys/manga-image-translator/forks?include=active&page=1

I'm not a developer so I didn't know, but here can access and download all the past commit forks. I was able to track down the past versions and finally find the cause of this trolling.

silverfantacy@0653847 This was caused by a code change in the text_render.py file in this commit.

The solution is to change the code in line 740 of the [text_render.py] file from A to B.

[A]

if bg is None :
x, y, w, h = cv2.boundingRect(canvas_text)
else :
x, y, w, h = cv2.boundingRect(canvas_border)
[B]
x, y, width, height = cv2.boundingRect(canvas_border)
This applies to the latest version as well, so to keep it clean, remove all translator files, download the latest file from github and apply that.

Or if you don't know how to apply this, download this patch file and overwrite it. Keep the folder structure. https://drive.google.com/file/d/1Lfdrp-6HfoB6BmUdGcJws5dBAouFSKis/view?usp=drive_link

Thanks a lot! It helps. I see a lot of people encounter this problem, not just for ENG translation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants