ogkalu2 / comic-translate

Desktop app for automatically translating comics - BDs, Manga, Manhwa, Fumetti and more in a variety of formats (Image, Pdf, Epub, cbr, cbz, etc) and in multiple languages.
Apache License 2.0
901 stars 83 forks source link

poor performance of the Inpaiting module #89

Closed TaunT closed 4 weeks ago

TaunT commented 1 month ago

For me this is the biggest problem, it is very difficult for module to clear the text and because of this it cannot insert a translation. Can you make a choice of inpainting algorithm, like for the translator and the OCR?

1) original RCO008-gigapixel-low resolution v2-2x HARD

2) cleaned RCO008-gigapixel-low resolution v2-2x HARD_cleaned

3) translated RCO008-gigapixel-low resolution v2-2x HARD_translated

(the translation text is very bad, because for this page I chose a free Google translator for experiments)

TaunT commented 1 month ago

Are there any hints or tips, maybe I can change the values ​​in the config parameters to make it clean better? I didn't find it myself(

ogkalu2 commented 1 month ago

I'm going to push an update later today. You will be able to manually clean the Images. Still only one Inpainting model but i've laid grounds to add support for more later easily.

ogkalu2 commented 4 weeks ago

After some algorithmic improvements and reworking how segmentation works entirely, inpainting is much better. For example your image on automatic mode(Inpaint resize method - 960) now returns en_cleaned en_translated

TaunT commented 4 weeks ago

@ogkalu2 Thank you very much! I have already tried it and it is amazing! Much better than before, now I don't have to manually fix clouds that used to have broken borders. It saves a lot of time and nerves, thanks again, great!

TaunT commented 4 weeks ago

Unfortunately, I can only use manual mode for now, probably because of the complexity of the Russian language, so I make different conveniences for myself in my branch) I made two requests. The second - with disabling the text outline, it seems to me, you can easily integrate it into your project.

How it works now RCO012 т

ogkalu2 commented 4 weeks ago

@TaunT No problem. Sorry, i've been working on the new Inpainting so i hadn't actually looked at the PRs yet. I just added some comments on your second pull request (outline). You just need to make a few very small changes.

TaunT commented 4 weeks ago

@ogkalu2 done! =)

ogkalu2 commented 4 weeks ago

Thanks! Merged.

TaunT commented 4 weeks ago

@ogkalu2 my manual mode panel now) image