Skip to content

RandomGeoSampler vs RandomBatchGeoSampler #1751

Closed Answered by adamjstewart
lcoandrade asked this question in Q&A
Discussion options

You must be logged in to vote

And for some reason, after making the intersection dataset, the labels have their CRS converted

See Figure 2 from our paper. Your datasets have different CRSs. If you don't reproject them to the same CRS, you won't be able to align them. Luckily, TorchGeo reprojects them for you automatically when you merge the two datasets. You can do this implicitly:

dataset_a & dataset_b  # warps b to a

or explicitly:

dataset_b = MyRasterMask(..., crs=...)

Should I use RandomGeoSampler or RandomBatchGeoSampler and why?

See Figure 3a from our paper. RandomGeoSampler samples a random patch from a random file for each sample in each mini-batch. RandomBatchGeoSampler works very similarly, but instead s…

Replies: 6 comments 9 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@isaaccorley
Comment options

@lcoandrade
Comment options

@adamjstewart
Comment options

@lcoandrade
Comment options

Comment options

You must be logged in to vote
2 replies
@adamjstewart
Comment options

@lcoandrade
Comment options

Comment options

You must be logged in to vote
2 replies
@adamjstewart
Comment options

@lcoandrade
Comment options

Comment options

You must be logged in to vote
1 reply
@lcoandrade
Comment options

Answer selected by lcoandrade
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
samplers Samplers for indexing datasets
3 participants