Datasets:
File size: 2,648 Bytes
aed1cd0 cae1d3a aed1cd0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | ---
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
```python
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
```python
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](https://huggingface.co/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
```bibtex
@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](https://gpcv.whu.edu.cn/data/building_dataset.html)
- GeoAI package: [https://github.com/opengeos/geoai](https://github.com/opengeos/geoai)
|