Skip to content

piclem/sen2venus-pytorch-dataset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sen2venus-pytorch-dataset

Unofficial dataloader for the Sen2Venµs dataset, baked at CESBIO by Julien Michel, Juan Vinasco-Salinas, Jordi Inglada and Olivier Hagolle.

🔍 Overview

Install with:

pip install sen2venus-pytorch-dataset

This package provides a simple way to download and use the Sen2Venµs dataset within the pytorch and Xarray ecosystems.

from sen2venus import Sen2VenusSite
import matplotlib.pyplot as plt

dataset = Sen2VenusSite(root='./', site_name='SUDOUE-4', load_geometry=True, subset='all')
input, target = dataset.getitem_xarray(0)
input.plot.imshow(col='band')
target.plot.imshow(col='band')
plt.show()

Matching Sentinel 2 and Venus samples

✅ Features

  • Automatic download from zenodo: The Zenodo URLs and hashes are included. From a region name (see the list), the corresponding subset is downloaded and decompressed.

  • x2, x4 or multi-resolution dataset loading: you can pick the rgbnir or the rededge subset to load the x2 or the x4 low (Sentinel-2) and high (Venus) resolution patches, or specify all to concatenate Sentinel-2 multi-resolution bands, as in this paper.

  • inspired from existing frameworks: the Sen2Venus class is inspired from the torchsr dataset definition style and the torchvision download utility are used.

  • automatically retrieve geospatial information: includes method to convert the dataset samples to Xarray DataArrays

  • compatible with sr-pytorch-lightning: you can train your own SR model using a fork of sr-pytorch-lightning.

📋 TODO / WIP

  • better integration of download within class instantiation - currently needs to be reinstantiated
  • multiple regions download
  • pypi publishing
  • parallel downloads
  • integration with sr-pytorch-lightning

▶️ Installation

You can install the package using pip:

pip install sen2venus-pytorch-dataset

or if you want to clone it first (e.g. to try out the examples):

git clone https://github.com/piclem/sen2venus-pytorch-dataset.git
cd sen2venus
pip install . 

📖 Documentation (WIP)

For more detailed information on the available parameters, methods, and best practices, please refer to the documentation.

🆘 Support and Issues (WIP)

If you encounter any issues, bugs, or have questions about the package, please feel free to open an issue on the GitHub repository. We appreciate your feedback!

🖊️ License

This package is released under the MIT License.