Skip to content

Instantly share code, notes, and snippets.

@adamjstewart
Created May 5, 2022 21:35
Show Gist options
  • Save adamjstewart/ca2b36ef901b898a1a703d6afefc7a58 to your computer and use it in GitHub Desktop.
Save adamjstewart/ca2b36ef901b898a1a703d6afefc7a58 to your computer and use it in GitHub Desktop.
Creating a Landsat intersection dataset with TorchGeo
from torch.utils.data import DataLoader
from torchgeo.datasets import CDL, Landsat7, Landsat8, stack_samples
from torchgeo.samplers import RandomGeoSampler
landsat7 = Landsat7(root="...")
landsat8 = Landsat8(root="...", bands=Landsat8.all_bands[1:-2])
landsat = landsat7 | landsat8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment