Datasets:
metadata
license: cc-by-4.0
task_categories:
- image-segmentation
tags:
- semantic-segmentation
- building-detection
- remote-sensing
- aerial-imagery
- geospatial
size_categories:
- 1K<n<10K
WHU Building Dataset
The WHU Building Dataset is a widely-used benchmark for building extraction from high-resolution aerial imagery. It contains aerial images at 0.3m resolution with pixel-level binary building masks.
Dataset Description
| Property | Value |
|---|---|
| Resolution | 0.3m ground sampling distance |
| Tile Size | 512 x 512 pixels |
| Channels | 3 (RGB) |
| Classes | 2 (Background=0, Building=255) |
| Format | PNG |
Splits
| Split | Images | Masks |
|---|---|---|
| Train | 5,732 | 5,732 |
| Val | 1,228 | 1,228 |
| Test | 1,228 | 1,228 |
| Total | 8,188 | 8,188 |
Directory Structure
├── train/
│ ├── Image/ # 5,732 RGB PNG images (512x512)
│ └── Mask/ # 5,732 binary mask PNG images (0=background, 255=building)
├── val/
│ ├── Image/ # 1,228 RGB PNG images
│ └── Mask/ # 1,228 binary mask PNG images
└── test/
├── Image/ # 1,228 RGB PNG images
└── Mask/ # 1,228 binary mask PNG images
Usage
With GeoAI
import geoai
# Download and prepare the dataset (converts PNG to GeoTIFF, remaps labels 255→1)
# See: https://github.com/opengeos/geoai/blob/main/scripts/train_whu_building.py
Direct Download
from huggingface_hub import snapshot_download
path = snapshot_download(repo_id="giswqs/WHU-Building-Dataset", repo_type="dataset")
Pre-trained Model
A pre-trained EfficientNet-B4 + UNet++ model achieving 0.9054 IoU on the test split is available at: giswqs/whu-building-unetplusplus-efficientnet-b4
Label Format
- Background: pixel value 0
- Building: pixel value 255
Note: When training with CrossEntropyLoss, remap labels from 0/255 to 0/1.
Citation
@article{ji2019fully,
title={Fully convolutional networks for multisource building identification},
author={Ji, Shunping and Wei, Shiqing and Lu, Meng},
journal={IEEE Transactions on Geoscience and Remote Sensing},
volume={57},
number={1},
pages={108--120},
year={2019},
publisher={IEEE}
}
References
- Original dataset: WHU Building Dataset
- GeoAI package: https://github.com/opengeos/geoai