SegSlum

May 15, 2026 · View on GitHub

Official repository of SegSlum, a semi-supervised learning framework for slum detection from satellite imagery.

Minimally supervised learning on sub-meter satellite imagery reveals slum expansion during the COVID-19 pandemic
Jeasurk Yang, Sungwon Park, Hyoshin Kim, Sumin Lee, Jungwon Kim, Jihee Kim, Meeyoung Cha
Communications Sustainability, 2026 · Paper · Project Page


Overview

SegSlum detects informal settlements (slums) from 60 cm/pixel RGB satellite imagery using a semi-supervised self-training pipeline. It requires only a small number of labeled images (~3% of the dataset) to achieve mIoU > 0.9 across diverse cities and time periods.

Key features:

  • Semi-supervised learning with adaptive pseudo-label selection
  • GRAM-matrix texture consistency regularization for photometric robustness
  • Multi-temporal and cross-national slum detection
  • Applied to 12 cities across Asia, Africa, and Latin America (2014–2024)

This codebase builds on ST++ (Yang et al., CVPR 2022).


Environment

Tested with Python 3.8+ and CUDA-enabled PyTorch.

pip install -r requirements.txt

Dependencies: torch, torchvision, numpy, pandas, scipy, scikit-image, opencv-python, Pillow, tqdm


Data

Directory layout

--data-root must point to a directory with this structure:

<DATA_ROOT>/
├── image/
│   └── <id>.png        # 256×256 RGB satellite tile (60 cm/pixel)
└── label/
    └── <id>.tif        # binary mask (0 = non-slum, 1 = slum)

Image IDs (one per line, without extension) are listed in split files under dataset/splits/. Each subfolder corresponds to one city/region (e.g. BRA_NEW_multiyear, KEN_NEW_multiyear).

Downloads

ResourceLink
Label datasetDownload
Model checkpointsDownload

Pretrained backbones

Place backbone checkpoints in pretrained/:

FileDownload
resnet50.pthhttps://download.pytorch.org/models/resnet50-0676ba61.pth
resnet101.pthhttps://download.pytorch.org/models/resnet101-63fe2227.pth

Training

CUDA_VISIBLE_DEVICES=0,1 python -W ignore main.py \
  --dataset <DATASET_NAME> \
  --data-root <PATH_TO_DATASET_ROOT> \
  --batch-size 16 \
  --backbone resnet50 \
  --model deeplabv3plusaux \
  --labeled-id-path   dataset/splits/<DATASET_NAME>/<SPLIT>/labeled.txt \
  --unlabeled-id-path dataset/splits/<DATASET_NAME>/<SPLIT>/unlabeled.txt \
  --pseudo-mask-path  outdir/pseudo_masks/<EXPERIMENT_NAME> \
  --save-path         outdir/models/<EXPERIMENT_NAME> \
  --reliable-id-path  outdir/reliable_ids/<EXPERIMENT_NAME> \
  --plus
  • --plus enables ST++ selective re-training. Omit for plain ST.
  • --nogram disables GRAM-matrix consistency (baseline).

CLI arguments

ArgumentDefaultDescription
--data-rootrequiredRoot directory containing image/ and label/
--datasetrequiredName of the split folder under dataset/splits/
--labeled-id-pathrequiredText file listing labeled image IDs
--unlabeled-id-pathrequiredText file listing unlabeled image IDs
--pseudo-mask-pathrequiredOutput path for pseudo masks
--save-pathrequiredOutput path for model checkpoints
--reliable-id-pathST++ onlyOutput path for reliable/unreliable ID lists
--batch-size16Batch size
--lr0.01Initial learning rate
--epochs100Epochs per stage
--crop-size256Input crop size
--backboneresnet50resnet50 or resnet50_whitening
--modeldeeplabv3plusauxdeeplabv3plusaux, deeplabv3plus, deeplabv3plusauxrgl, deeplabv2, pspnet
--plusEnable ST++ selective re-training
--nogramDisable GRAM-matrix consistency

Citation

@article{yang2026segslum,
  title     = {Minimally supervised learning on sub-meter satellite imagery reveals slum expansion during the {COVID}-19 pandemic},
  author    = {Yang, Jeasurk and Park, Sungwon and Kim, Hyoshin and Lee, Sumin and Kim, Jungwon and Kim, Jihee and Cha, Meeyoung},
  journal   = {Communications Sustainability},
  volume    = {1},
  pages     = {52},
  year      = {2026},
  publisher = {Nature Publishing Group},
  doi       = {10.1038/s44458-026-00054-6}
}

Acknowledgement

This codebase is adapted from ST++:

Lihe Yang, Wei Zhuo, Lei Qi, Yinghuan Shi, Yang Gao. ST++: Make Self-training Work Better for Semi-supervised Semantic Segmentation. CVPR 2022. [paper] [code]

License

MIT