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

Crop should be more consistent in randomization #27

Open
BenjaminMidtvedt opened this issue Oct 30, 2020 · 0 comments
Open

Crop should be more consistent in randomization #27

BenjaminMidtvedt opened this issue Oct 30, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@BenjaminMidtvedt
Copy link
Collaborator

The default mode of Crop, "random", should crop each image in a list identically. However, this is achieved by seeding the rng. As a consequence, two images of size (N, N, 1) and (N, N, 2) will be cropped differently along the first dimensions.

I propose, instead, that we generate a random fraction for each dimension, which is subsequently parsed as an integer by multiplying by the dimension size. In this way, the randomization becomes independent of the size of each dimension and more consistent.

Moreover, we should allow crop and corner to be fewer elements than ndim, parsed as taking all elements and the corner at 0 for missing dimensions.

@BenjaminMidtvedt BenjaminMidtvedt added the enhancement New feature or request label Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant