Skip to content

Instantly share code, notes, and snippets.

@adamjstewart
Created May 5, 2022 21:53
Show Gist options
  • Save adamjstewart/18f7962589afd8644c20e539493b3c05 to your computer and use it in GitHub Desktop.
Save adamjstewart/18f7962589afd8644c20e539493b3c05 to your computer and use it in GitHub Desktop.
Plotting a Sentinel 2 image with TorchGeo
import matplotlib.pyplot as plt
from torchgeo.datasets import Sentinel2
from torchgeo.transforms import AppendNDVI
dataset = Sentinel2(root="...")
sample = dataset[...]
fig = dataset.plot(sample)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment