maeriil / Aoriil

Image translator designed for manga but can be extended to any websites in general.
MIT License
0 stars 0 forks source link

Text Detection Boundry Merge is not working as intended. #4

Open maeriil opened 1 year ago

maeriil commented 1 year ago

The text detection is not working as intended as shown by the following images. broken_border1

For this case, we can observe that the two green boxes at bottom left aren't merged. If it is not merged, (1) the text loses its meaning, (2) the filling textbox is too small to insert english text, therefore it will revert to either (1) decreased font size or (2) vertical english alignment.

broken_border2

This scenario, we see many issues again with merging smaller texts into larger texts. The detection currently compares the size of smaller boundry with larger boundry. If the difference it too large, it wont merge. This is to try to combat unnecessary bug, which is going to be shown in the next picture. We need to revamp the text boundry merge completely using new logic.

broken-border3

This panel becomes a disaster. The reason why there is a HUGE green box is because the text on the top, the vertical text on the left, and the huge texts behind the two persons in the middle pannel are getting merged. Because of this, its attempting to merge other smaller textboses below as well. This is a serious bug and needs to be fixed ASAP.

broken-border-4

This is a kind of problem thats going to be very difficult to solve. Currently, the EASYOCR library is detecting the background texts as well and its attempting to translate it. However, in doing so, it is also recognizing that the text bubble is a valid text and therefore is merging alongside it. Normally, this is fine but in our case, this is bad. This is because the bubble text is completely independent from the background text. In doing so, the bubble text will completely lose its meaning.

broken-border5

This is an example of some bugs that haven't been seen yet. The bugb on the top right is not really much of a priority. However, we see that the tilted text was NOT detected properly at all. We need to look towards fixing this after. The text at the bottom is also very hard to detect since it is not really computer letters but more of a handwritten letters which are more hard to detect.

In general, text detection algorithm is not working as properly and needs to be improved ASAP.