Skip to content

Sample Spatial Scenes Only from TemporalMultiRasterSource #1996

Closed Answered by AdeelH
jejjohnson asked this question in Q&A
Discussion options

You must be logged in to vote

You are right: this is not currently possible. And I agree that it would be nice to have.

If you are only interested in sampling one timestamp at a time, one workaround would be to just treat each image as independent. That is, convert each raster source to a separate GeoDataset and then concatenate them using torch.utils.data.ConcatDataset. That way, when you randomly sample a chip from the concatenated dataset, it would return an (H, W, C) chip from a random location and a random timestamp. Would that work for you?

Replies: 2 comments 1 reply

Comment options

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

Answer selected by jejjohnson
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
None yet
2 participants