torchgeo
torchgeo copied to clipboard
GridGeoSampler on areas smaller than patch size
Discussed in https://github.com/microsoft/torchgeo/discussions/1624
Originally posted by mpelchat04 October 5, 2023
We use the GridGeoSampler to create patches. Although, we have cases where the portion covered by the training data is small (smaller than patch_size), as seen in pink in the image:
The image and data showed here are taken from the Spacenet-7 dataset.
Using the GridGeoSampler, these patches are discarded and it seems like an intended feature ref.
Is there a logical way to overcome this limitation, where it discards useful patches?
Intended behavior is up for discussion:
Suggestion: The minimum value of the intersection bounds could be the patch_size X patch_size.
Q1: What if the area of intersection is 0? A: Then no need to have a sampler.
Q2: What if we're using a point dataset? A: What is the result of the intersection between a single point and an image tile?
Q3: What if the image tile is also smaller than patch_size?