Skip to content
Harry33tPublic

About

Scene-calibrated self-supervised hyperspectral band selection

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

URBAN-SSL

Reference implementation of URBAN-SSL for self-supervised hyperspectral band selection from co-registered HSI-LiDAR scenes.

URBAN-SSL trains a masked HSI-LiDAR reconstruction model without labels, converts clean per-band reconstruction errors into representativeness scores, calibrates them with scene-noise statistics, and constructs an exact-(K) subset with correlation and spectral-coverage constraints. LiDAR is used only as auxiliary spatial context while training the selector. The downstream KNN and SVM classifiers receive selected HSI bands only.

Installation

Python 3.10 or 3.11 is recommended.

git clone https://github.com/Harry33t/URBAN-SSL.git
cd URBAN-SSL
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest -q

For selector training, install a CUDA-enabled PyTorch build and then run pip install -e ".[train]".

Dataset preparation

The datasets are not redistributed. Place the original files under:

Datasets/
  Houston2013/
    2013_IEEE_GRSS_DF_Contest_CASI.mat
    2013_IEEE_GRSS_DF_Contest_LiDAR.mat
    GRSS2013.mat
  MUUFL/
    muufl_gulfport_campus_1_hsi_220_label.mat
  Trento/
    Trento_HSI.mat
    Trento_LiDAR_data.mat
    Trento_GT.mat

See docs/DATASETS.md for array expectations.

Quick start

Train, select, and evaluate one MUUFL selector:

python scripts/train_raw_selector.py \
  --dataset muufl \
  --dataset-root /path/to/Datasets \
  --output-dir outputs/raw/muufl/seed_53401 \
  --seed 53401

python scripts/select_bands.py \
  --dataset muufl \
  --dataset-root /path/to/Datasets \
  --raw-dir outputs/raw/muufl/seed_53401 \
  --selector-seed 53401 \
  --output outputs/selectors/URBAN-SSL/muufl/seed_53401/result.json

python scripts/evaluate_selected_bands.py \
  --dataset muufl \
  --dataset-root /path/to/Datasets \
  --selector outputs/selectors/URBAN-SSL/muufl/seed_53401/result.json \
  --output outputs/evaluation/muufl_seed_53401.csv

The complete reference protocol is defined in configs/protocol.json and documented in docs/REPRODUCIBILITY.md.

The frozen study uses Houston2013, MUUFL, and Trento; exact band budgets (K\in{10,20,30,40,50}); ten selector seeds; and ten classification splits. KNN and SVM always share the same selected HSI bands.

Code layout

  • urban_ssl/: reusable data loading, scoring, exact-K selection, and evaluation functions.
  • scripts/: command-line entry points for training, selection, evaluation, and aggregation.
  • reproduction/protocol/: selector network and dataset-specific training implementation.
  • configs/protocol.json: budgets, selector seeds, split seeds, and classifier settings.
  • tests/: exact-K and evaluation consistency checks.

License

Code authored for URBAN-SSL is released under the MIT License. Dataset terms and third-party method licenses remain with their respective owners.

About

Scene-calibrated self-supervised hyperspectral band selection

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages