Created
May 5, 2022 22:06
-
-
Save adamjstewart/09764f57dea14996aeb39dd57bc55d83 to your computer and use it in GitHub Desktop.
Using a benchmark dataset with TorchGeo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from torch.utils.data import DataLoader | |
from torchgeo.datasets import VHR10 | |
dataset = VHR10(root="...", download=True, checksum=True) | |
dataloader = DataLoader(dataset, batch_size=128, shuffle=True, num_workers=4) | |
for batch in dataloader: | |
image = batch["image"] | |
label = batch["label"] | |
# train a model, or make predictions using a pre-trained model |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment