license: cc-by-4.0
🚨 New Dataset Version Released!
We are excited to announce the release of Version [2.0] of our dataset!
This update includes:
- [More data].
- [Harmonization model retrained with more data].
- [Temporal support].
- [Check the data without downloading (Cloud-optimized properties)].
📥 Go to: https://huggingface.co/datasets/tacofoundation/SEN2NAIPv2 and follow the instructions in colab
SEN2NAIP
The increasing demand for high spatial resolution in remote sensing imagery has led to the necessity of super-resolution (SR) algorithms that convert low-resolution (LR) images into high-resolution (HR) ones. To address this need, we introduce SEN2NAIP, a large remote sensing dataset designed to support conventional and reference-based SR model training. SEN2NAIP is structured into two components to provide a broad spectrum of research and application needs. The first component comprises a cross-sensor dataset of 2,851 pairs of LR images from Sentinel-2 L2A and HR images from the National Agriculture Imagery Program (NAIP). Leveraging this dataset, we developed a degradation model capable of converting NAIP images to match the characteristics of Sentinel-2 imagery (S2like). Subsequently, this degradation model was utilized to create the second component, a synthetic dataset comprising 17,657 NAIP and S2like image pairs. With the SEN2NAIP dataset, we aim to provide a valuable resource that facilitates the exploration of new techniques for enhancing the spatial resolution of Sentinel-2 satellite imagery.
DOWNLOAD DATASET
from huggingface_hub import hf_hub_download
# Donwload cross-sensor dataset
hf_hub_download(
repo_id="isp-uv-es/SEN2NAIP",
repo_type="dataset",
filename="cross-sensor/cross-sensor.zip"
)
# Donwload synthetic dataset
for i in range(1, 19):
hf_hub_download(
repo_id="isp-uv-es/SEN2NAIP",
repo_type="dataset",
filename="synthetic/synthetic_%02d.zip" % i
)
REPRODUCIBLE EXAMPLES
Load cross-sensor dataset
import rioxarray
import torch
DEMO_PATH = "https://huggingface.co/datasets/isp-uv-es/SEN2NAIP/resolve/main/demo/"
cross_sensor_path = DEMO_PATH + "cross-sensor/ROI_0000/"
hr_data = rioxarray.open_rasterio(cross_sensor_path + "hr.tif")
lr_data = rioxarray.open_rasterio(cross_sensor_path + "lr.tif")
hr_torch = torch.from_numpy(hr_data.to_numpy()) / 255
lr_torch = torch.from_numpy(lr_data.to_numpy()) / 10000
Load Synthetic dataset
Available methods: vae_histogram_matching, vae_histogram_matching, gamma_multivariate_normal_90, gamma_multivariate_normal_75, gamma_multivariate_normal_50, gamma_multivariate_normal_25, gamma_multivariate_normal_10.
import opensr_degradation
import rioxarray
import datasets
import requests
import tempfile
import torch
import json
def load_metadata(metadata_path: str) -> dict:
tmpfile = tempfile.NamedTemporaryFile(suffix=".json")
with requests.get(metadata_path) as response:
with open(tmpfile.name, "wb") as file:
file.write(response.content)
metadata_json = json.load(open(tmpfile.name, "r"))
return metadata_json
DEMO_PATH = "https://huggingface.co/datasets/isp-uv-es/SEN2NAIP/resolve/main/demo/"
# Synthetic LR and HR data ------------------------------
synthetic_path = DEMO_PATH + "synthetic/ROI_0001/"
hr_early_data = rioxarray.open_rasterio(synthetic_path + "early/01__m_4506807_nw_19_1_20110818.tif")
hr_early_torch = torch.from_numpy(hr_early_data.to_numpy()) / 255
hr_early_metadata = load_metadata(synthetic_path + "late/metadata.json")
lr_hat, hr_hat = opensr_degradation.main.get_s2like(
image=hr_early_torch,
table=hr_early_metadata["sim_histograms"],
model="gamma_multivariate_normal_50"
)
import matplotlib.pyplot as plt
fig, ax = plt.subplots(1, 3, figsize=(10, 5))
ax[0].imshow(hr_early_torch[[3, 1, 2]].permute(1, 2, 0))
ax[0].set_title("NAIP")
ax[1].imshow(hr_hat[[3, 1, 2]].permute(1, 2, 0)*3)
ax[1].set_title("NAIPhat")
ax[2].imshow(lr_hat[[3, 1, 2]].permute(1, 2, 0)*3)
ax[2].set_title("S2like")
plt.show()
CITATION
@article{aybar2025sen2naipv2,
author = {Aybar, Cesar and Montero, David and Contreras, Julio and Donike, Simon and Kalaitzis, Freddie and Gómez-Chova, Luis},
title = {SEN2NAIP: A large-scale dataset for Sentinel-2 Image Super-Resolution},
journal = {Scientific Data},
year = {2024},
volume = {11},
number = {1},
pages = {1389},
doi = {10.1038/s41597-024-04214-y},
url = {https://doi.org/10.1038/s41597-024-04214-y},
abstract = {The increasing demand for high spatial resolution in remote sensing has underscored the need for super-resolution (SR) algorithms that can upscale low-resolution (LR) images to high-resolution (HR) ones. To address this, we present SEN2NAIP, a novel and extensive dataset explicitly developed to support SR model training. SEN2NAIP comprises two main components. The first is a set of 2,851 LR-HR image pairs, each covering 1.46 square kilometers. These pairs are produced using LR images from Sentinel-2 (S2) and corresponding HR images from the National Agriculture Imagery Program (NAIP). Using this cross-sensor dataset, we developed a degradation model capable of converting NAIP images to match the characteristics of S2 imagery ($S_{2-like}$). This led to the creation of a second subset, consisting of 35,314 NAIP images and their corresponding $S_{2-like}$ counterparts, generated using the degradation model. With the SEN2NAIP dataset, we aim to provide a valuable resource that facilitates the exploration of new techniques for enhancing the spatial resolution of Sentinel-2 imagery.},
issn = {2052-4463}
}