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

Eliminate the possibility of the perspective transform collapsing #1489

Merged
merged 1 commit into from
Nov 5, 2023

Commits on Oct 25, 2023

  1. Eliminate the possibility of the perspective transform collapsing

    Prior to this change, while the perspective transform could collapse at any selection of the scale parameter, it was especially more prevelant for higher values of scale. Specifically, the randomly generated transformation polygon had a non-zero chance of concave, which led to collapsed perspective transformations.
    
    A more refined (and easier to understand) solution requires the implementation of "Concave Polygon Recoverer" like in imgaug. However, restricting the randomly generated `points` values [0, 1/3] ensures geometrically that the generated polygon will be convex, hence resulting in a valid (uncollapsed) perspective transformation.
    
    The upper limit is set to 0.32 instead of 1/3, to avoid any potential numerical issues (due to near-concave polygons), with the same motivation behind the piece of code ensuring that `min_height` and `max_height` are over 2.0, shortly following the polygon generation.
    alicangok authored Oct 25, 2023
    Configuration menu
    Copy the full SHA
    26bfe65 View commit details
    Browse the repository at this point in the history