Best way to split train/val/test indices/datasets ? #1210
Replies: 2 comments 2 replies
-
You're in luck! @pmandiola literally just added several splitting utilities to TorchGeo in #866. These will be included in the 0.5.0 release, but are already in the main branch if you want to experiment with them. See here for the documentation, and let us know if there's any splitting techniques you think are missing. |
Beta Was this translation helpful? Give feedback.
-
My approach was subclass GeoDataModule to create (60% for training, 20% for validation and 20% for testing) like this:
This custom geodatamodule is made with an intersection dataset (images and labels):
Then, my geodatamodule is made like this:
|
Beta Was this translation helpful? Give feedback.
-
I am trying to formulate the best strategy to create train/val/test splits from the one data directory, where I have subdirectories of shadow images and (shadow-free) clean images. I am intersecting the two in order to obtain pairs of pixel-aligned shadow and shadow-free images. Any existing codebase in torchgeo that I can integrate to do the splits? Should I consider splitting the sampler outputs? Splitting the imagesets would be very limited in terrms of the data points, I was hoping that I can maybe split the sampled batches of patches.
Here's my code to obtain dataloaders on the intersection dataset:
Beta Was this translation helpful? Give feedback.
All reactions