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

Random sized patches support for other non-geospatial datamodules #855

Closed
4 tasks done
nilsleh opened this issue Oct 16, 2022 · 1 comment · Fixed by #928
Closed
4 tasks done

Random sized patches support for other non-geospatial datamodules #855

nilsleh opened this issue Oct 16, 2022 · 1 comment · Fixed by #928
Labels
datamodules PyTorch Lightning datamodules
Milestone

Comments

@nilsleh
Copy link
Collaborator

nilsleh commented Oct 16, 2022

Summary

In #851 it was suggested that datamodules with variable sized input images should implement a random size crop from tile to patches during training and have a keyword argument to specify the desired patch_size.

When looking through our other Non-geospatial datamodules, there are other cases that might be good to add the same support, just because the default images are very large and not suitable for batches even though all images have the same dimensions:

Maybe, there can also be a threshold for future datamodule additions: for example if image size is greater than X, implement the random patch crop logic for that datamodule.

Rationale

I think it would lower the threshold of using these datasets. Since datamodules are supposed to make it very quick and easy for users to conduct segmentation experiments, the patch_size logic would make it a bit more easier to practically use the datamodules right away.

Implementation

Implement a logic like in the OSCDDatamodule.

Alternatives

No response

Additional information

No response

@adamjstewart adamjstewart added the datamodules PyTorch Lightning datamodules label Oct 16, 2022
@ashnair1
Copy link
Collaborator

The InriaAerialImageLabelling datamodule already supports extraction of random crops.

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

Successfully merging a pull request may close this issue.

3 participants