Datasets:
The dataset could not be loaded because the splits use different data file formats, which is not supported. Read more about the splits configuration. Click for more details.
Error code: FileFormatMismatchBetweenSplitsError
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
BONAI Dataset
Dataset Description
Dataset Summary
BONAI (Buildings in Off-Nadir Aerial Images) is a large-scale dataset for building footprint extraction (BFE) in off-nadir aerial images. It is the official dataset of the paper Learning to Extract Building Footprints from Off-Nadir Aerial Images (TPAMI 2022).
Unlike existing BFE datasets that only annotate building footprints, BONAI provides fully annotated instance-level roof and footprint polygons for each building, plus the corresponding offset vector from roof to footprint. This makes it possible to study the roof-to-footprint offset modeling that is characteristic of off-nadir imagery.
- 268,958 building instances across 3,300 aerial images (1024Γ1024)
- Images collected from six representative cities in China: Shanghai, Beijing, Harbin, Jinan, Chengdu, Xi'an
- Official
official_v1manifests and COCO annotations define 2,700 training, 300 validation, and 300 test images. Training/validation images are distributed together intrainval.zip.
Supported Tasks and Leaderboards
- Building footprint extraction: given an off-nadir aerial image, predict the footprint polygon of each building instance (via roof segmentation + offset regression, or direct footprint prediction).
- Building roof segmentation / object detection: single-class (
building) instance segmentation and detection are directly supported by the COCO-format annotations.
The official evaluation code is tools/bonai/bonai_evaluation.py in the
GitHub repository (requires the
bstool library).
Languages
Annotations and documentation are in English. Image file names encode the source city and tile location.
Dataset Structure
Data Instances
Each image is a 1024Γ1024 PNG aerial image tile. Each building instance carries:
roofpolygon (segmentation + bbox)footprintpolygon (footprint_mask + footprint_bbox)offset: 2D vector from roof to footprint, e.g.[-1, -4]building_height,ignore_flag,area,bbox
Data Fields
The coco/*.json files follow the COCO format with BONAI-specific extensions:
| Field | Description |
|---|---|
images |
id, file_name, height, width (1024Γ1024), date_captured |
annotations.segmentation |
roof polygon |
annotations.roof_bbox |
roof bounding box [x, y, w, h] |
annotations.footprint_mask |
footprint polygon |
annotations.footprint_bbox |
footprint bounding box [x, y, w, h] |
annotations.building_bbox |
enclosing building bounding box |
annotations.offset |
roofβfootprint offset vector [dx, dy] |
annotations.building_height |
building height (0 if unknown) |
annotations.ignore_flag |
1 for ignored instances |
annotations.area, bbox, iscrowd, image_id, category_id |
standard COCO fields |
categories |
single class: building (id 1) |
The csv/ files provide test-set polygons in WKT format with columns
ImageId, BuildingId, PolygonWKT_Pix, Confidence (footprint and roof versions).
Both versions cover the same 300 images as coco/bonai_shanghai_xian_test.json.
The val in the legacy CSV filenames is a historical name; these files do not describe
the validation subset. Use coco/bonai_val_official_v1.json for validation.
Data Splits
Official split: official_v1
Use the following image-level manifests and COCO annotations for the official training, validation, and test protocol:
| Split | Images | Cities | Image manifest | COCO annotations |
|---|---|---|---|---|
| Train | 2,700 | Shanghai 1,656; Beijing 684; Chengdu 72; Harbin 288 | train.txt | bonai_train_official_v1.json |
| Validation | 300 | Shanghai 228; Jinan 72 | val.txt | bonai_val_official_v1.json |
| Test | 300 | Shanghai 200; Xi'an 100 | test.txt | bonai_shanghai_xian_test.json |
The image counts match Table 1 of the paper. These downloadable manifests define official_v1;
their identity with the historical image-level partition used for the paper results has not been
established. Published paper metrics should not be treated as measured results for official_v1.
Geographic grouping. Shanghai has 157 parent tile groups, identified by the L18_<coordinate>_<coordinate>
part of each filename. Every group contains 12 images: three image sources (arg, google, ms)
and four 1024Γ1024 crops per source. Using a fixed seed of 42, 19 complete groups are selected for
validation (228 images), and the remaining 138 groups are used for training (1,656 images). All
72 Jinan images belong to validation. The Shanghai/Xi'an test set is unchanged.
No parent tile group crosses a split boundary. Checks of filename-derived parent tile extents find no positive-area overlap across train, validation, and test. Adjacent tile boundaries are allowed; no geographic buffer is imposed. This grouping check does not independently verify the imagery's georeferencing.
The split preserves every annotation field except COCO image and annotation IDs, which are made unique across the merged train/validation files. Original filenames are retained. The image ID map records each source file and original image ID; the protocol metadata records source hashes, selected groups, ID assignment, and raw annotation counts. Raw annotation counts include all released records and are not a claim of matching the paper's instance counts.
Files and training configuration
trainval.zip continues to contain all 3,000 training/validation images. Both official train and
validation COCO files reference those images; no separate image download or image renaming is
needed. test.zip contains 300 image files and one directory entry (test/), not 301 images.
The default GitHub dataset configuration
uses all five city-level trainval files for training, and its val entry also points to those
same files. That is the 3,000-image combined-training protocol, not the independent validation
protocol defined above. This configuration is also present in the
March 2022 code release.
To train and validate with official_v1, download the two official COCO files into
data/BONAI/coco/ in the BONAI code repository. Download
loft_foa_r50_fpn_2x_bonai_official_v1.py
into that repository's configs/loft_foa/ directory, beside the existing LOFT configuration.
This override selects the separate train/validation COCO files and the existing test COCO file.
The expected image directories are data/BONAI/trainval/images/ and data/BONAI/test/images/;
arrange the extracted files accordingly.
python tools/train.py configs/loft_foa/loft_foa_r50_fpn_2x_bonai_official_v1.py
Use validation for development and model selection, and reserve test for final evaluation.
The supplied configuration uses the repository's existing COCO evaluation hook for validation;
the WKT files below remain test ground truth. The
dedicated BONAI test entry point
uses the independent Shanghai/Xi'an test set when passed --city shanghai_xian.
To regenerate the official manifests and COCO subsets from the original city-level annotations:
python scripts/create_official_split.py --data-root . --output-root .
The generation script
uses complete parent tile groups and never changes the test set. The manifests are the authoritative
membership lists for official_v1.
Test CSV filenames and compatibility
The following clearer filenames are byte-for-byte copies of the legacy files. The original files remain available because the existing GitHub evaluation script references their names.
Preferred filename in csv/ |
Legacy filename in csv/ |
|---|---|
bonai_shanghai_xian_test_footprint_minarea500.csv |
shanghai_xian_v3_merge_val_footprint_crop1024_gt_minarea500.csv |
bonai_shanghai_xian_test_roof_minarea500.csv |
shanghai_xian_v3_merge_val_roof_crop1024_gt_minarea500.csv |
All four files are test-set ground truth, not validation ground truth. The aliases do not add
images or annotations. Original city-level trainval COCO files, image filenames, and archives
remain available and unchanged.
File layout:
βββ trainval.zip
βββ test.zip
βββ coco/
β βββ bonai_{beijing,chengdu,haerbin,jinan,shanghai}_trainval.json
β βββ bonai_train_official_v1.json
β βββ bonai_val_official_v1.json
β βββ bonai_shanghai_xian_test.json
βββ splits/official_v1/
β βββ train.txt
β βββ val.txt
β βββ test.txt
β βββ image_id_map.json
β βββ protocol.json
β βββ shanghai_split.png
βββ scripts/create_official_split.py
βββ configs/loft_foa_r50_fpn_2x_bonai_official_v1.py
βββ csv/ # test ground truth; explicit test names and legacy aliases
Dataset Creation
Curation Rationale
Off-nadir aerial images exhibit visible roof-to-footprint displacement caused by the oblique viewing angle and building height. BONAI was curated to enable learning-based methods that explicitly model this offset, which nadir-only datasets cannot support.
Source Data
Aerial image tiles (1024Γ1024) sourced from six Chinese cities β Shanghai, Beijing, Harbin, Jinan,
Chengdu and Xi'an β covering diverse urban layouts and building styles. File names indicate the data
source (e.g. shanghai_arg, shanghai_ms, shanghai_google).
Annotations
Instance-level annotations were produced for every building: roof polygon, footprint polygon and the offset vector between them, stored in COCO format with the extension fields listed above.
Personal and Sensitive Information
The dataset contains aerial imagery of urban areas. No personal or biometric information is annotated.
Considerations for Using the Data
Social Impact of Dataset
BONAI supports research in remote sensing and urban mapping (e.g. cadastral mapping, disaster assessment, 3D city modeling). Users should comply with local regulations when applying building extraction models.
Discussion of Biases
Imagery is limited to six Chinese cities; building styles, densities and imaging conditions may not
generalize to other regions. Some instances are marked with ignore_flag where annotation is
uncertain.
Other Known Limitations
building_heightis 0 for instances where height is unknown.- The dataset targets building footprints only; other land-cover classes are not annotated.
Additional Information
Dataset Curators
Jinwang Wang, Lingxuan Meng, Weijia Li, Wen Yang, Lei Yu, Gui-Song Xia.
Licensing Information
The official code repository (jwwangchn/BONAI) is released under the MIT License. No separate license statement for the dataset files has been published; please refer to the repository and the paper authors for the intended terms of use.
Citation Information
@article{wang2022bonai,
author={Wang, Jinwang and Meng, Lingxuan and Li, Weijia and Yang, Wen and Yu, Lei and Xia, Gui-Song},
journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
title={Learning to Extract Building Footprints from Off-Nadir Aerial Images},
year={2022},
volume={},
number={},
pages={1-1},
doi={10.1109/TPAMI.2022.3162583}
}
Paper: arXiv Β· Code: jwwangchn/BONAI
Contributions
Contact: Jinwang Wang (jwwangchn@whu.edu.cn).
- Downloads last month
- 1,327
