Comments (10)
please provide a failure example and your arguments
from manga-image-translator.
Hi,
This is the command I'm using:
python -m manga_translator -l ENG --translator=offline --font-size-minimum=15 --font-path _fontpath_/KOMIKASL.ttf --mask-dilation-offset=5 -f jpg --detector=ctd --inpainter=lama_mpe -i "_inputFolder_" --manga2eng
fontpath and inputFolder are real paths, of course. Below are the input and output images. You can see the text on the lower left panel is badly translated, with the OCR failing to recognise the text as being horizontal.
Hopefully this helps.
from manga-image-translator.
From what I can see in the several cases I came across, it seems the OCR recognizes horizontal, multi-line phrases as if each line was a column of vertical text orientation - including trying to interpret the kanji rotated, which is why the translation is complete rubbish.
I say this because the same doesn't happen if there's just a single line. If it is just a single, horizontal line, the OCR properly detects it as being on the horizontal orientation and detects correctly the characters.
I understand that there's a need to cater for vertical aligned text (being the majority of it, of course), but maybe the OCR code can be improved so that, if the text rotation is more than 45 degrees (with zero degrees being the text being perfectly vertical), it is to be detected as horizontal.
from manga-image-translator.
Maybe this can help. I've ran it on demo mode, obtaining the intermediates. You can see that the bbox in question (5) is wrongly detected as being rotated 74.26 degrees (since it was detected as a vertical aligned text heavily rotated), but another bbox with the same orientation (3) is correctly detected as being rotated only -9.93 degrees (i.e. properly detected as horizontal text, with a small rotation).
from manga-image-translator.
@dmMaze I think this may be more on your area? I think the code for the Comic Text Detector is yours, isn't it?
Checking the code, the issue doesn't seem to be on the OCR step, but on the textbox detection. The text box is not on the right orientation, so it passes the detected text on the vertical to the OCR.
from manga-image-translator.
@itsdapolice
It's some text-detection postprocessing or ocr preprocessing I didn't write. Ballonstranslator can do it right:
I'll take my time to investigate why it's wrong in manga-image-translator
from manga-image-translator.
@itsdapolice It's some text-detection postprocessing or ocr preprocessing I didn't write. Ballonstranslator can do it right:
I'll take my time to investigate why it's wrong in manga-image-translator
Thanks, mate. I did try to wrap my head around the code, but I'm way too unfamiliar with it to be of any help.
from manga-image-translator.
I've tested the new commit and works like a charm. Thanks, @dmMaze .
from manga-image-translator.
@itsdapolice Just a reminder 8925d36 would fail some vertical cases. Please update to 391d799
from manga-image-translator.
@itsdapolice Just a reminder 8925d36 would fail some vertical cases. Please update to 391d799
Thanks, will do.
from manga-image-translator.
Related Issues (20)
- [Bug]: 并发问题 HOT 6
- [Feature Request]: gp4o mini 來了 HOT 4
- [Bug]: UserScript dont work on Twitter HOT 1
- [Bug]: GPT4o-mini is not GPT4o
- [Feature Request]: Update Sugoi to use Offline Translator API to Leverage the massive V9 performance gains
- [Feature Request]: 增加InternVL 2.0模型 HOT 1
- [Bug]: window无法使用预编译文件安装pydensecrf HOT 1
- [Feature Request]: 希望支持QWEN2
- [Bug]: How to translate same file again in API mode?
- [Feature Request]: web模式下没法选择翻译成泰文
- [Bug]: The GPT Config Reference format in the README document may be incorrect
- [Bug]: Translator invalid HOT 1
- [Bug]: Could not reach translate service
- [Feature Request]: expected rendering performance on GPUs? Documenting GPU and CPU requirements? Number of Python threads?
- [Bug]: colab notebook get error and repeat restart
- [Bug]: ERROR: [batch] ConfigKeyError: Missing key 0 HOT 1
- [Feature Request]: 能否设置或者添加翻译后的字体
- [Feature Request]: Add Groq as an translator service
- [Feature Request]: 是否考虑使用Pango作为漫画的文本排版引擎?
- [Feature Request]: 添加过滤非垂直或水平文本的选项
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from manga-image-translator.