Small, focused pipeline to build a 3-class dataset (fire / no_fire / burn_scar) from FIRMS + Sentinel-2, and train ResNet classifiers.
- Install:
pip install -r requirements.txt - Configure
.envwith Sentinel Hub creds (SH_CLIENT_ID,SH_CLIENT_SECRET) - Pipeline:
python scripts/build_candidates.pypython scripts/download_dataset.pypython scripts/prepare_splits.py
- Train:
- RGB:
python models/train_resnet.py - 6-band: set
EXPERIMENT="all"intrain_resnet.py
- RGB:
- Data in
data/splits/(train/val/test), bands: B02,B03,B04,B08,B11,B12 - Quality filters: cloud/water/valid pixels + thermal (B12) thresholds
- Geographic split to avoid spatial leakage
scripts/build_candidates.py— match FIRMS to S2 catalogscripts/download_dataset.py— download patches + metadatascripts/prepare_splits.py— filter, balance, and splitmodels/dataset.py— PyTorch dataset + transformsmodels/train_resnet.py— RGB/6-band training (ReduceLROnPlateau, dropout, label smoothing)
- MPS/Metal and CUDA are auto-detected.
- Checkpoints saved to
models/checkpoints/. - For detailed steps, see
DATA_PIPELINE.md.
