← all repositories
ternaus/TernausNetV2

Satellite instance segmentation via watershed trickery

A competition-hardened PyTorch model that teases apart overlapping building footprints from 11-channel satellite imagery by predicting where objects touch.

543 stars Jupyter Notebook Computer VisionML Frameworks
TernausNetV2
Not currently ranked — collecting fresh signals.
star history

What it does

TernausNetV2 performs instance segmentation on satellite imagery to extract individual building footprints. It takes 11-channel input—RGB plus eight multispectral bands—and outputs two binary masks: one for building vs. non-building pixels, another highlighting boundaries where buildings touch or nearly touch. These masks feed into a watershed transform to separate overlapping structures. The authors placed second in the CVPR 2018 DeepGlobe Building Extraction Challenge.

The interesting bit

The watershed-from-touching-boundaries idea isn’t new, but applying it to satellite imagery with a WideResNet-38 encoder chewing on 11 channels is a pragmatic mashup. The In-Place Activated BatchNorm keeps memory sane while the network juggles high-resolution panchromatic and low-resolution multispectral data simultaneously.

Key highlights

  • Pre-trained weights and a demo.ipynb notebook provided for inference
  • Trained on SpaceNet data: 30 cm resolution, 650×650 pixel tiles from Vegas, Paris, Shanghai, and Khartoum
  • Public/private leaderboard scores: 0.739 / 0.736 average across cities (Vegas strongest at ~0.89, Khartoum weakest at ~0.60)
  • Dependencies frozen to Python 3.6 and PyTorch 0.4—archaeological by current standards
  • Network diagram and teaser visualization included in repo

Caveats

  • PyTorch 0.4 dependency means you’ll likely need container archaeology or careful environment reconstruction to run this today
  • README states code is “sufficient for inference”—training scripts not provided
  • Performance varies sharply by geography; Khartoum scores suggest the model struggles with different building morphologies or image quality

Verdict

Worth a look if you’re researching satellite instance segmentation or need a proven watershed-based baseline for building extraction. Skip it if you need a modern, maintained training pipeline or plug-and-play compatibility with current PyTorch.

Frequently asked

What is ternaus/TernausNetV2?
A competition-hardened PyTorch model that teases apart overlapping building footprints from 11-channel satellite imagery by predicting where objects touch.
Is TernausNetV2 open source?
Yes — ternaus/TernausNetV2 is open source, released under the BSD-3-Clause license.
What language is TernausNetV2 written in?
ternaus/TernausNetV2 is primarily written in Jupyter Notebook.
How popular is TernausNetV2?
ternaus/TernausNetV2 has 543 stars on GitHub.
Where can I find TernausNetV2?
ternaus/TernausNetV2 is on GitHub at https://github.com/ternaus/TernausNetV2.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.