--- pretty_name: SEN2NEON (Validation) license: cc-by-4.0 tags: - remote-sensing - geospatial - sentinel-2 - super-resolution - multispectral - earth-observation task_categories: - image-to-image task_ids: - super-resolution annotations_creators: - no-annotation language_creators: - other language: [] multilinguality: - other size_categories: - 1K", "lr": "neon_10m_linearized/.tif", "hr": "neon_2.5m_linearized/.tif", "split": "val", "name": "", "lon": , "lat": , "LC_detail_id": , "LC_detail_text": "", "LC_superclass_id": , "LC_superclass_text": "" } ``` Notes: - `split` is set to `"val"` for this release. - `lon/lat` are WGS84 centroids; may be null for tiles outside coverage. - LC fields come from the categorical land‑cover raster used in preprocessing (see below). --- ## Quick Download Using the Hub snapshot cache (resumable, selective patterns): ```bash pip install -U huggingface_hub python - <<'PY' from huggingface_hub import snapshot_download snapshot_download( repo_id="simon-donike/SEN2NEON", repo_type="dataset", local_dir="./data/sen2neon", allow_patterns=[ "metadata.jsonl", "sen2neon_metadata.csv", "neon_10m_linearized/**", "neon_2.5m_linearized/**" ], ) PY ``` (For high‑throughput, you can `pip install hf_transfer` and set `HF_HUB_ENABLE_HF_TRANSFER=1`.) --- ## Load with 🤗 Datasets (Streaming, no full download) ```python from datasets import load_dataset, Image # Stream JSONL, keep paths relative to the Hub ds = load_dataset( "json", data_files="hf://datasets/simon-donike/SEN2NEON/metadata.jsonl", split="train", # streaming uses a single split; filter by 'split' field if needed streaming=True ) # Cast path fields to Image feature to lazily fetch TIFFs ds = ds.cast_column("lr", Image()) ds = ds.cast_column("hr", Image()) row = next(iter(ds)) lr_img = row["lr"] # dict with 'path' and PIL image accessor hr_img = row["hr"] print(row["id"], row.get("LC_superclass_text")) ``` --- ## Load with PyTorch (Local Files) After downloading (e.g., into `./data/sen2neon/`), you can use the provided CSV‑driven loader: ```python from data.sen2neon_ds import SEN2NEON from torch.utils.data import DataLoader root = "./data/sen2neon" csv = f"{root}/sen2neon_metadata.csv" ds = SEN2NEON(csv_path=csv, root_dir=root, crop_size_lr=None) loader = DataLoader(ds, batch_size=2, shuffle=True, num_workers=4, pin_memory=True) batch = next(iter(loader)) lr, hr, meta = batch["lr"], batch["hr"], batch["meta"] print(lr.shape, hr.shape, meta["LC_superclass_text"][:2]) ``` --- ## Land‑cover Integration Each sample is joined with **land‑cover** information derived from an external categorical land‑cover raster covering the study area. The LR tile footprint is reprojected to the LC CRS; the **mode** value within that window is taken as the label. - `LC_detail_id` / `LC_detail_text`: fine‑grained class (e.g., 41 → “Deciduous”). - `LC_superclass_id` / `LC_superclass_text`: coarser **super‑group** (e.g., 40 → “Forest”, 50 → “Built‑up”). - These fields enable **stratified metrics** (e.g., PSNR/SSIM/SAM) by environment type. - Missing values may occur (outside coverage / NoData). --- ## Geospatial & Data Notes - **CRS:** Tiles are stored in per‑scene/projected UTM/ETRS zones; see `crs` in the CSV (when available). Centroids are additionally provided as WGS84 (`lon/lat`). - **Alignment:** HR is an exact 4× integer scaling of LR with pixel‑grid alignment. - **Nodata:** TIFF `nodata` values are respected; downstream loaders may map them to NaN. - **Bands:** Band count may vary across scenes; code examples select RGB if available (else fallbacks). --- ## Intended Uses - Benchmarking SR models (classical, CNN, diffusion, GANs). - Stratified evaluation by land‑cover class (robust performance reporting). - Qualitative visualization and error analysis. ## Limitations - Land‑cover labels are window‑mode summaries, not per‑pixel annotations. - Some tiles may lack LC labels or have ambiguous boundaries near class transitions. - Sensor mix / preprocessing differences can affect cross‑domain generalization. --- ## License Please refer to the dataset repository license on the Hub page. If you fork/modify, include the original attribution. (Contact the maintainers for commercial/redistribution questions.) --- ## Citation If you use SEN2NEON in your research, please cite the dataset and the accompanying tools. A publication is in the works. --- ## Contact - Maintainer: Image Processing Laboratory, University of Valencia, Spain - Issues & questions: open a discussion on the linked GitHub repository.