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

OCR Vertical Japanese texts? #686

Open
vsatyamesc opened this issue Mar 18, 2022 · 9 comments
Open

OCR Vertical Japanese texts? #686

vsatyamesc opened this issue Mar 18, 2022 · 9 comments

Comments

@vsatyamesc
Copy link

can you add a trained model or whatever for Vertical Japanese texts too?

@TsXor
Copy link

TsXor commented Nov 11, 2022

It's magical, but you just need to rotate the image for 90 degree. (for craft)

@vsatyamesc
Copy link
Author

It's magical, but you just need to rotate the image for 90 degree. (for craft)

You aren't joking are you? You understand the difference between vertical texts and horizontal right?

@TsXor
Copy link

TsXor commented Nov 11, 2022

It's magical, but you just need to rotate the image for 90 degree. (for craft)

You aren't joking are you? You understand the difference between vertical texts and horizontal right?

You just have to try, I mean craft detection. I am not kidding.
I don't know why craft can still recognize rotated character!

@TsXor
Copy link

TsXor commented Nov 11, 2022

In fact, craft just first find characters and then connect them into lines. So, I mean, we can detect text lines like this, and rotate every single character in a line, then rotate the line, and we can get horizontal text.

@vsatyamesc
Copy link
Author

I will have to try it. so you mean I have to rotate the image in a way that it makes horizontal text and based on that CRAFT would rotate each characters

@vsatyamesc
Copy link
Author

In fact, craft just first find characters and then connect them into lines. So, I mean, we can detect text lines like this, and rotate every single character in a line, then rotate the line, and we can get horizontal text.

just as you said I tried, but it is not working. It does seem better than before though because it has been able to recognize more characters but it isn't up to point or close to what it can achieve with other languages. If you don't know Japanese vertical text is totally different than English vertical texts. So this PR doesn't work on Japanese vertical texts.

@TsXor
Copy link

TsXor commented Nov 12, 2022

just as you said I tried, but it is not working. It does seem better than before though because it has been able to recognize more characters but it isn't up to point or close to what it can achieve with other languages. If you don't know Japanese vertical text is totally different than English vertical texts. So this PR doesn't work on Japanese vertical texts.

The point is, craft by default try to bind characters that is horizontally near into lines, so when you write like

c b a
c b a
c b a

craft will understand them as 3 lines of cba
This is what will happen when the vertical characters can coincidentally be understood as horizontal lines.
I mean, when they cannot, like this:
example

It will confuse craft.

@TsXor
Copy link

TsXor commented Nov 12, 2022

Also, there is another well known trick to achieve this:
when training the ocr, tell them that:
example is a
and when recognizing, rotate the picture by 90 degrees counterclockwise.

@vsatyamesc
Copy link
Author

Maybe they'll try to add Japanese vertical text recognition, or I'll have to find a workaround

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants