shadow-transfer-bench commited on
Commit
9ba7b64
·
verified ·
1 Parent(s): c01d6ad

Add dataset card

Browse files
Files changed (1) hide show
  1. README.md +232 -0
README.md ADDED
@@ -0,0 +1,232 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ShadowTransfer
2
+
3
+ A benchmark for measuring **geographic transfer** in overhead shadow detection. 4,500 human-verified shadow masks across three U.S. cities (Chicago, Miami, Phoenix) at two native NAIP resolutions (0.3 m/px, 0.6 m/px), released in two complementary forms:
4
+
5
+ - **`data_cities/`** — raw per-city dataset organized by city, resolution, and split. Use this when you need full control over splits or want to construct your own protocols.
6
+ - **`data_loco/`** — pre-built leave-one-city-out (LOCO) folds derived from `data_cities/`. Use this when you want to reproduce the paper's transfer evaluation, or when comparing a new method against the reported baselines.
7
+
8
+ > Both directories contain the **same underlying images and masks**. `data_loco/` is a re-organization of `data_cities/` into the LOCO protocol with frozen, paper-matched train/val/test counts. Pick whichever matches your workflow.
9
+
10
+ ---
11
+
12
+ ## Quick start
13
+
14
+ ```bash
15
+ # Hosted at:
16
+ # https://huggingface.co/datasets/shadow-transfer-bench/ShadowTransfer
17
+
18
+ from huggingface_hub import snapshot_download
19
+ snapshot_download(repo_id="shadow-transfer-bench/ShadowTransfer",
20
+ repo_type="dataset", local_dir="ShadowTransfer")
21
+ ```
22
+
23
+ To reproduce the paper's LOCO numbers, point any segmentation training pipeline at one fold:
24
+
25
+ ```
26
+ ShadowTransfer/data_loco/fold_0_holdout_phoenix/highres/
27
+ train/images/ train/masks/
28
+ val/images/ val/masks/
29
+ test/images/ test/masks/
30
+ ```
31
+
32
+ That's it — `train/`, `val/`, and `test/` already contain the 450 / 150 / 150 images the paper uses.
33
+
34
+ ---
35
+
36
+ ## Schema
37
+
38
+ ### `data_cities/` — per-city raw dataset
39
+
40
+ ```
41
+ data_cities/
42
+ ├── chicago/
43
+ │ ├── highres/ # 0.3 m/px native NAIP
44
+ │ │ ├── train/
45
+ │ │ │ ├── images/ # 450 RGB .png, 384×384
46
+ │ │ │ ├── masks/ # 450 binary .png (0 / 255)
47
+ │ │ │ └── masks_multiclass/ # optional, 0–6 class IDs (see below)
48
+ │ │ ├── val/
49
+ │ │ │ ├── images/ # 150 .png
50
+ │ │ │ ├── masks/ # 150 .png
51
+ │ │ │ └── masks_multiclass/
52
+ │ │ ├── test/
53
+ │ │ │ ├── images/ # 150 .png
54
+ │ │ │ ├── masks/ # 150 .png
55
+ │ │ │ └── masks_multiclass/
56
+ │ │ ├── metadata_train.json
57
+ │ │ ├── metadata_val.json
58
+ │ │ └── metadata_test.json
59
+ │ └── midres/ # 0.6 m/px native NAIP, same layout
60
+ ├── miami/ # same layout
61
+ └── phoenix/ # same layout
62
+ ```
63
+
64
+ **Counts (per city, per resolution):** 450 train + 150 val + 150 test = **750 images**.
65
+ **Total:** 3 cities × 2 resolutions × 750 = **4,500 images**.
66
+
67
+ **File formats**
68
+
69
+ | Path | Type | Encoding |
70
+ | --- | --- | --- |
71
+ | `images/*.png` | RGB image | 8-bit, 3 channels, 384×384 |
72
+ | `masks/*.png` | binary shadow mask | 8-bit, 1 channel, `{0, 255}` (255 = shadow) |
73
+ | `masks_multiclass/*.png` | multiclass mask | 8-bit, 1 channel, integer class IDs `0–6` |
74
+
75
+ **Multiclass IDs** (used in `masks_multiclass/`):
76
+
77
+ | ID | Class |
78
+ | --- | --- |
79
+ | 0 | Background (no shadow) |
80
+ | 1 | Building / canyon shadow |
81
+ | 2 | Under-structure shadow |
82
+ | 3 | Tree-canopy dapple |
83
+ | 4 | Topography-cast shadow |
84
+ | 5 | Vehicle-cast shadow |
85
+ | 6 | Thin-linear shadow |
86
+
87
+ The benchmark in the paper evaluates on binary masks only; the multiclass masks are released for downstream analysis. Image and mask filenames match within a split (`images/foo.png` ↔ `masks/foo.png`).
88
+
89
+ **`metadata_{split}.json`** — one JSON list per split, one entry per image:
90
+
91
+ ```jsonc
92
+ {
93
+ "original_filename": "phoenix_session01_highres_paired_010.png",
94
+ "random_filename": "img_005.png", // anonymized name on disk
95
+ "city": "phoenix",
96
+ "resolution": "highres", // "highres" (0.3 m) | "midres" (0.6 m)
97
+ "split": "test", // "train" | "val" | "test"
98
+ "type": "type2", // sampling scheme tag
99
+ "image_type": "paired", // "paired" if also in the other resolution
100
+ "pair_id": "010", // links a paired pair across resolutions
101
+ "center_lon": -112.17278007840696,
102
+ "center_lat": 33.443872697021,
103
+ "tile_name": "m_3311239_ne_12_030_20230917", // source NAIP tile
104
+ "source_session": 1,
105
+ "annotation_session": 31,
106
+ "session_num": 31,
107
+ "has_annotations": true,
108
+ "shadow_types": ["Building/canyon shadow",
109
+ "Vehicle-cast shadow",
110
+ "Tree-canopy dapple"]
111
+ }
112
+ ```
113
+
114
+ The on-disk filename is `random_filename`. `original_filename` is the human-readable name. `pair_id` lets you join the 0.3 m/px and 0.6 m/px patches that share ground coordinates (300 paired patches per city — see paper §3.1).
115
+
116
+ ---
117
+
118
+ ### `data_loco/` — pre-built LOCO folds
119
+
120
+ Three folds, one per held-out city. Each fold contains the same train / val / test directory layout as the per-city dataset, plus a `manifest.json` and per-split metadata.
121
+
122
+ ```
123
+ data_loco/
124
+ ├── fold_0_holdout_phoenix/ # train: chicago + miami, test: phoenix
125
+ │ ├── highres/ # 0.3 m/px
126
+ │ │ ├── manifest.json # provenance + counts
127
+ │ │ ├── metadata_train.json
128
+ │ │ ├── metadata_val.json
129
+ │ │ ├── metadata_test.json
130
+ │ │ ├── train/
131
+ │ │ │ ├── images/ # 450 .png (225 chicago + 225 miami)
132
+ │ │ │ ├── masks/ # 450 .png
133
+ │ │ │ └── masks_multiclass/ # where present upstream
134
+ │ │ ├── val/
135
+ │ │ │ ├── images/ # 150 .png (75 chicago + 75 miami)
136
+ │ │ │ ├── masks/ # 150 .png
137
+ │ │ │ └── masks_multiclass/
138
+ │ │ └── test/
139
+ │ │ ├── images/ # 150 .png (full phoenix test pool)
140
+ │ │ ├── masks/ # 150 .png
141
+ │ │ └── masks_multiclass/
142
+ │ └── midres/ # 0.6 m/px, same layout
143
+ ├── fold_1_holdout_miami/ # train: chicago + phoenix, test: miami
144
+ └── fold_2_holdout_chicago/ # train: miami + phoenix, test: chicago
145
+ ```
146
+
147
+ **Filename convention.** In `train/` and `val/`, files are renamed `{source_city}__{original}.png` (e.g. `chicago__img_017.png`) so the two source cities cannot collide and provenance is visible at a glance. In `test/` files keep their original names because they come from a single source city. Image and mask filenames remain matched within a split.
148
+
149
+ **`metadata_{split}.json`** — same fields as the per-city metadata, plus LOCO context:
150
+
151
+ ```jsonc
152
+ {
153
+ // ... all per-city fields preserved as-is, plus:
154
+ "loco_filename": "chicago__img_017.png",
155
+ "loco_split": "train", // "train" | "val" | "test" in this fold
156
+ "loco_fold_id": 0,
157
+ "loco_holdout_city": "phoenix",
158
+ "loco_resolution": "highres",
159
+ "source_city": "chicago",
160
+ "source_split": "train", // which per-city split it came from
161
+ "has_masks_multiclass": true
162
+ }
163
+ ```
164
+
165
+ **`manifest.json`** records the build parameters, per-city counts, and the full file list — enough to re-derive the fold from `data_cities/` exactly.
166
+
167
+ **Counts per fold per resolution:** 450 train (225 per training city) + 150 val (75 per training city) + 150 test (held-out city's full test pool).
168
+
169
+ ---
170
+
171
+ ## Intended use
172
+
173
+ - **Primary use**: benchmarking shadow detection methods on overhead aerial imagery, with explicit measurement of geographic transfer (`data_loco/`) or of in-domain performance per city (`data_cities/`).
174
+ - **Secondary uses**: building footprint and façade extraction (binary masks act as occlusion priors); shadow-removal and de-shadowing research; domain generalization research on dense prediction tasks; pretraining for related overhead segmentation tasks; analysis of urban morphology and solar geometry from the included `center_lat` / `center_lon` and shadow type labels.
175
+
176
+ For ML transfer evaluation specifically, **report results on `data_loco/` using all three folds and both resolutions** (six test cells per method) and use the within-city upper-bound numbers from the paper as the comparison baseline. Per-cell paired bootstrap is recommended for significance — see the paper for the exact protocol.
177
+
178
+ ---
179
+
180
+ ## Known limitations
181
+
182
+ - **Three U.S. cities only.** Chicago, Miami, and Phoenix span distinct climates and morphologies but share North American grid-pattern urbanism. Generalization to dense historic European cities, informal settlements, or non-grid morphologies (e.g. Mumbai, Cairo, Marrakech) is untested.
183
+ - **NAIP RGB only.** No multispectral or near-infrared bands. Sensor characteristics, color processing, and acquisition conventions are NAIP-specific.
184
+ - **Single fall season.** All imagery comes from a single seasonal window; deciduous-canopy bare-vs-leaf-on variation is not represented.
185
+ - **Native-resolution releases only.** The 0.3 m and 0.6 m subsets come from separate native NAIP acquisitions, not from downsampling the same source. Do not synthesize one from the other if your goal is to study resolution transfer.
186
+ - **Boundary uncertainty.** Shadow edges are inherently soft; we recommend tolerant-mIoU evaluation with a ±2 px don't-care band (see paper §3.3). Strict pixel-exact metrics will systematically penalize all methods at the boundary.
187
+ - **Multiclass coverage.** `masks_multiclass/` is provided where reliable typing was possible; sparse classes (vehicle-cast, thin-linear) have low per-image counts and are not recommended as primary evaluation targets.
188
+ - **Annotation noise.** Even with three-phase QC and inter-annotator-agreement monitoring, a small residual disagreement rate (≈3% of segments adjudicated as borderline) is expected.
189
+
190
+ ---
191
+
192
+ ## License and attribution
193
+
194
+ - **Source imagery (NAIP).** USDA Farm Service Agency National Agriculture Imagery Program. NAIP imagery acquired through 2019 is in the U.S. public domain; later releases are published as public-domain-with-attribution by USDA-FSA APFO. Users of the imagery in derived products are asked to credit the USDA Farm Service Agency Aerial Photography Field Office (APFO).
195
+
196
+ - **Annotations and metadata.** The shadow masks (`masks/`, `masks_multiclass/`) and metadata files (`metadata_*.json`, `manifest.json`) are released under the **Creative Commons Attribution 4.0 International (CC BY 4.0)** license.
197
+
198
+ - **Required citation when using the dataset.**
199
+ ```
200
+ ShadowTransfer authors. ShadowTransfer: A Geographic Transfer Benchmark
201
+ for Overhead Shadow Detection. NeurIPS 2026 Datasets & Benchmarks Track.
202
+ ```
203
+ Please also cite USDA-FSA NAIP for the underlying imagery.
204
+
205
+ ---
206
+
207
+ ## Hosting and DOI
208
+
209
+ - **Primary host**: <https://huggingface.co/datasets/shadow-transfer-bench/ShadowTransfer>
210
+ - **DOI**: assigned via the Hugging Face dataset record (visible on the dataset card).
211
+ - **Mirror / archival copy**: see the dataset card for the latest mirror list.
212
+
213
+ ---
214
+
215
+ ## Documentation
216
+
217
+ Two structured-documentation artifacts accompany the release:
218
+
219
+ - **`DATASHEET.md`** — a Datasheet for Datasets in the format of Gebru et al. (2021), covering motivation, composition, collection, preprocessing, uses, distribution, and maintenance.
220
+ - **Croissant metadata** — machine-readable dataset description in the [MLCommons Croissant](https://mlcommons.org/working-groups/data/croissant/) format. Hugging Face auto-generates and serves this for every Hub dataset; fetch it at:
221
+ ```
222
+ https://huggingface.co/api/datasets/shadow-transfer-bench/ShadowTransfer/croissant
223
+ ```
224
+ This file is consumable by `mlcroissant`, TFDS, and any Croissant-aware loader.
225
+
226
+ ---
227
+
228
+ ## Maintenance
229
+
230
+ Issues, errata, and corrections: file an issue on the Hugging Face dataset page or open a pull request on the accompanying GitHub repository linked from the dataset card. Versioned releases are tagged on Hugging Face; the version used for the published paper results is tagged `v1.0`.
231
+
232
+ For questions about the LOCO protocol or the diagnostic framework, see the paper. For questions about the annotation pipeline, see Appendix A of the paper.