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

Horizontal text images's bounding box positions are not set properly. #17

Open
maeriil opened this issue Oct 15, 2023 · 0 comments
Open
Labels
bug Something isn't working High Priority Urgent requirement

Comments

@maeriil
Copy link
Owner

maeriil commented Oct 15, 2023

In the file imagetranslation.py, for each merged section, we set the start_pos and end_pos to crop out the text. This is what it looks like currently:

        start_pos = []
        end_pos = []

        if should_rotate: # this is true when language is part of vertical text
            start_pos = [
                section.start_pos[1],
                orig_img_width - section.end_pos[0],
            ]
            end_pos = [
                section.end_pos[1],
                orig_img_width - section.start_pos[0],
            ]

        cropped_section = crop_image(image, start_pos, end_pos)

However, if the source language is not part of vertical text, the start_pos and end_pos aren't set, for example if source language is korean. We want to fix this issue.

@maeriil maeriil added bug Something isn't working High Priority Urgent requirement labels Oct 15, 2023
@maeriil maeriil added this to the Backend API Release milestone Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working High Priority Urgent requirement
Projects
None yet
Development

No branches or pull requests

1 participant