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| 9 |
+
tags:
|
| 10 |
+
- architecture
|
| 11 |
+
- synthetic-data
|
| 12 |
+
- visual-similarity
|
| 13 |
+
- retrieval
|
| 14 |
+
- sim-to-real
|
| 15 |
+
size_categories:
|
| 16 |
+
- 1K<n<10K
|
| 17 |
+
pretty_name: "Facade β synthetic architectural style corpus"
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
# Facade β synthetic architectural style corpus
|
| 21 |
+
|
| 22 |
+
**1,000 generated reference plates across 20 architectural styles**, with
|
| 23 |
+
structured attribute labels, generated style readings, and a precomputed
|
| 24 |
+
retrieval index.
|
| 25 |
+
|
| 26 |
+
Built for a visual-similarity search task: photograph a building, retrieve the
|
| 27 |
+
closest reference plates, get a reading of the style. Live app:
|
| 28 |
+
**[Facade](https://huggingface.co/spaces/Jonathandav/facade)**
|
| 29 |
+
|
| 30 |
+
---
|
| 31 |
+
|
| 32 |
+
## What this is
|
| 33 |
+
|
| 34 |
+
Every plate is generated from a **sampled attribute specification** β style,
|
| 35 |
+
massing, material, window rhythm, roofline, palette β plus controlled nuisance
|
| 36 |
+
factors (viewing angle, crop, light, condition). Nothing is left to the
|
| 37 |
+
generator's discretion.
|
| 38 |
+
|
| 39 |
+
That design buys three things:
|
| 40 |
+
|
| 41 |
+
1. **Ground truth for free.** Every image inherits its labels from the
|
| 42 |
+
specification, so retrieval evaluation needs no manual annotation.
|
| 43 |
+
2. **Measurable instruction compliance.** Because each style declares an
|
| 44 |
+
expected saturation band and dominant edge orientation, whether the
|
| 45 |
+
generator obeyed is a computed quantity rather than an opinion.
|
| 46 |
+
3. **Sliceable nuisance factors.** Angle, crop and light are controlled, so
|
| 47 |
+
accuracy can be reported *conditioned on* them instead of averaged over
|
| 48 |
+
them.
|
| 49 |
+
|
| 50 |
+
## What this is **not**
|
| 51 |
+
|
| 52 |
+
The corpus depicts **generic facades in a style**. No plate represents a real
|
| 53 |
+
building and none is attributable to any architect. Style labels describe the
|
| 54 |
+
*generation specification*, not an art-historical judgement about any structure
|
| 55 |
+
in the world.
|
| 56 |
+
|
| 57 |
+
Intended use is **visual-similarity search**. This is not an authoritative
|
| 58 |
+
identification tool and carries no claim about any building's date, architect,
|
| 59 |
+
or heritage status.
|
| 60 |
+
|
| 61 |
+
---
|
| 62 |
+
|
| 63 |
+
## Files
|
| 64 |
+
|
| 65 |
+
| path | contents |
|
| 66 |
+
|---|---|
|
| 67 |
+
| `plates/` | 1,000 reference images, 512 px PNG, `<style_id>-<nnn>.png` |
|
| 68 |
+
| `plate_manifest.parquet` | per-plate labels, prompts, seeds and generated readings |
|
| 69 |
+
| `style_seed.csv` | the 20 style definitions and their expected measurements |
|
| 70 |
+
| `index_embeddings.npy` | precomputed image embeddings for the shipped model |
|
| 71 |
+
| `index_plate_ids.csv` | row order for the embedding matrix |
|
| 72 |
+
| `index_model.txt` | which model produced the index |
|
| 73 |
+
| `eda_summary.json` | measured compliance and signal statistics |
|
| 74 |
+
| `generation_log.csv` | per-attempt generation record (acceptance, rejection reasons) |
|
| 75 |
+
| `notebooks/` | corpus generation, EDA, model comparison, publishing |
|
| 76 |
+
|
| 77 |
+
### Loading
|
| 78 |
+
|
| 79 |
+
```python
|
| 80 |
+
import numpy as np, pandas as pd
|
| 81 |
+
from huggingface_hub import hf_hub_download
|
| 82 |
+
|
| 83 |
+
REPO = "Jonathandav/facade-styles"
|
| 84 |
+
get = lambda f: hf_hub_download(REPO, f, repo_type="dataset")
|
| 85 |
+
|
| 86 |
+
E = np.load(get("index_embeddings.npy")) # (1000, d)
|
| 87 |
+
ids = pd.read_csv(get("index_plate_ids.csv")) # row order
|
| 88 |
+
manifest = pd.read_parquet(get("plate_manifest.parquet"))
|
| 89 |
+
styles = pd.read_csv(get("style_seed.csv"))
|
| 90 |
+
```
|
| 91 |
+
|
| 92 |
+
Plates resolve directly:
|
| 93 |
+
`https://huggingface.co/datasets/Jonathandav/facade-styles/resolve/main/plates/ST01-000.png`
|
| 94 |
+
|
| 95 |
+
---
|
| 96 |
+
|
| 97 |
+
## The 20 styles
|
| 98 |
+
|
| 99 |
+
Bauhaus International Β· Brutalist Β· Art Deco Β· Ottoman Revival Β· Mandate
|
| 100 |
+
Eclectic Β· Neoclassical Β· Gothic Revival Β· Venetian Gothic Β· Georgian Β·
|
| 101 |
+
Victorian Terrace Β· Mid-century Modern Β· Postmodern Β· Deconstructivist Β·
|
| 102 |
+
Contemporary Curtain Wall Β· Mediterranean Vernacular Β· Adobe Pueblo Β· Soviet
|
| 103 |
+
Constructivist Β· Scandinavian Functionalist Β· Industrial Warehouse Β· Japanese
|
| 104 |
+
Metabolist
|
| 105 |
+
|
| 106 |
+
Fifty plates each. Anything outside these twenty is still forced onto the
|
| 107 |
+
nearest of them β worth knowing before trusting a result.
|
| 108 |
+
|
| 109 |
+
---
|
| 110 |
+
|
| 111 |
+
## How it was built
|
| 112 |
+
|
| 113 |
+
| stage | detail |
|
| 114 |
+
|---|---|
|
| 115 |
+
| image model | SDXL-Turbo, 6 steps, `guidance_scale=3.0`, 512 px |
|
| 116 |
+
| text model | Qwen2.5-1.5B-Instruct, for the style readings |
|
| 117 |
+
| acceptance | every plate measured after generation; rejects regenerated with a fresh seed, up to 5 attempts |
|
| 118 |
+
|
| 119 |
+
Prompt construction is deliberate. The style name, period and iconic features
|
| 120 |
+
lead the prompt, because diffusion weights early tokens most heavily.
|
| 121 |
+
`prompt_2` is **not** passed: in SDXL the second encoder produces the pooled
|
| 122 |
+
embedding that conditions the whole image, and putting a generic photographic
|
| 123 |
+
style there collapsed every architectural style into the same contemporary
|
| 124 |
+
office block.
|
| 125 |
+
|
| 126 |
+
---
|
| 127 |
+
|
| 128 |
+
## Measured properties
|
| 129 |
+
|
| 130 |
+
### Style compliance
|
| 131 |
+
|
| 132 |
+
Each style declares an expected saturation band and dominant edge orientation.
|
| 133 |
+
Both are computed from pixels and compared against the declaration.
|
| 134 |
+
|
| 135 |
+
| test | result |
|
| 136 |
+
|---|---|
|
| 137 |
+
| declared saturation rank vs measured | **Spearman Ο = 0.67, p β 1.5 Γ 10β»ΒΉΒ³Β², n = 1000** |
|
| 138 |
+
| saturation within calibrated band | see `eda_summary.json` |
|
| 139 |
+
| edge orientation as declared | see `eda_summary.json` |
|
| 140 |
+
|
| 141 |
+
The saturation bands are **calibrated from the corpus**, not set a priori. The
|
| 142 |
+
first attempt used absolute thresholds chosen before any image existed and
|
| 143 |
+
scored 8% compliance β because measured saturation ran 0.30β0.85 while the
|
| 144 |
+
"medium" band had been guessed at 0.22β0.50. What the style table actually
|
| 145 |
+
asserts is a *ranking*, not a value on a calibrated scale, so the headline test
|
| 146 |
+
is rank agreement and the bands were rederived from corpus quantiles.
|
| 147 |
+
|
| 148 |
+
### Does style dominate the nuisance factors?
|
| 149 |
+
|
| 150 |
+
Variance in each measured feature attributable to each factor (Ξ·Β²):
|
| 151 |
+
|
| 152 |
+
| feature | style | light | crop | view | condition |
|
| 153 |
+
|---|---|---|---|---|---|
|
| 154 |
+
| saturation | **0.63** | 0.12 | ~0.01 | ~0.00 | ~0.00 |
|
| 155 |
+
| brightness | **0.66** | 0.18 | ~0.01 | ~0.00 | ~0.00 |
|
| 156 |
+
| contrast | **0.43** | 0.19 | ~0.01 | ~0.00 | ~0.00 |
|
| 157 |
+
| orientation ratio | **0.56** | 0.04 | ~0.00 | ~0.00 | ~0.00 |
|
| 158 |
+
| edge density | **0.63** | 0.07 | 0.02 | ~0.01 | ~0.00 |
|
| 159 |
+
| angle entropy | **0.63** | ~0.01 | ~0.00 | ~0.01 | ~0.00 |
|
| 160 |
+
|
| 161 |
+
Style dominates every feature. Crop, view and condition sit at essentially
|
| 162 |
+
zero β which validates the sampler: those axes are *cycled* rather than drawn
|
| 163 |
+
independently, so they cannot correlate with style. If they did, an embedding
|
| 164 |
+
model could score well by learning framing instead of architecture.
|
| 165 |
+
|
| 166 |
+
Light is the only meaningful contaminant, and only on the photometric
|
| 167 |
+
features, which is physically unsurprising. Contrast has both the weakest style
|
| 168 |
+
margin and the strongest light effect, making it the least trustworthy of the
|
| 169 |
+
six.
|
| 170 |
+
|
| 171 |
+
---
|
| 172 |
+
|
| 173 |
+
## Retrieval benchmark
|
| 174 |
+
|
| 175 |
+
Image-to-image retrieval over the corpus, style as the label, chance β 0.049.
|
| 176 |
+
|
| 177 |
+
| model | Recall@1 | Recall@3 | MRR | lift |
|
| 178 |
+
|---|---|---|---|---|
|
| 179 |
+
| SigLIP-B/16 | 0.972 | 0.994 | 0.983 | 19.8Γ |
|
| 180 |
+
| **LAION-CLIP-B/32** | 0.970 | 0.991 | 0.981 | 19.8Γ |
|
| 181 |
+
| CLIP-B/32 | 0.955 | 0.988 | 0.972 | 19.5Γ |
|
| 182 |
+
|
| 183 |
+
**These are at ceiling and the comparison cannot resolve.** Plates of the same
|
| 184 |
+
style share nearly identical prompt strings, differing only in angle, crop,
|
| 185 |
+
light and condition, so same-style plates are near-siblings. Every slice β by
|
| 186 |
+
crop, view, light or condition β falls between 0.975 and 1.000. The differences
|
| 187 |
+
between models are inside noise.
|
| 188 |
+
|
| 189 |
+
Note also that `material` and `period` are functionally determined by `style`
|
| 190 |
+
in this corpus (one value each per style), so they are not independent label
|
| 191 |
+
axes. `ornament_level` is.
|
| 192 |
+
|
| 193 |
+
### Most confused pairs
|
| 194 |
+
|
| 195 |
+
| true | retrieved | rate |
|
| 196 |
+
|---|---|---|
|
| 197 |
+
| Georgian | Victorian Terrace | 0.16 |
|
| 198 |
+
| Victorian Terrace | Georgian | 0.08 |
|
| 199 |
+
| Mandate Eclectic | Ottoman Revival | 0.06 |
|
| 200 |
+
| Brutalist | Bauhaus International | 0.04 |
|
| 201 |
+
|
| 202 |
+
Georgian β Victorian Terrace was **predicted before running any embedding
|
| 203 |
+
model**, from centroid distance in measured saturation/orientation space. Two
|
| 204 |
+
British brick terraces a century apart, and both the pixel metric and CLIP
|
| 205 |
+
agree they are the hardest pair.
|
| 206 |
+
|
| 207 |
+
The remaining confusions have a structure the pixel metric could not see:
|
| 208 |
+
Bauhaus International acts as an *attractor* for the modernist styles β
|
| 209 |
+
Brutalist, Soviet Constructivist and Japanese Metabolist all leak toward it.
|
| 210 |
+
That is a semantic effect, not a geometric one.
|
| 211 |
+
|
| 212 |
+
---
|
| 213 |
+
|
| 214 |
+
## Sim-to-real
|
| 215 |
+
|
| 216 |
+
The corpus is synthetic; queries are not. Evaluated on **17 hand-labelled
|
| 217 |
+
photographs** of real buildings in Tel Aviv, Jaffa, Paris and the Greek
|
| 218 |
+
islands, retrieving against the wholly synthetic index.
|
| 219 |
+
|
| 220 |
+
| model | real R@3 | synthetic R@3 | gap |
|
| 221 |
+
|---|---|---|---|
|
| 222 |
+
| **LAION-CLIP-B/32** | **0.94** (16/17) | 0.991 | **β0.05** |
|
| 223 |
+
| SigLIP-B/16 | 0.88 (15/17) | 0.994 | β0.11 |
|
| 224 |
+
| CLIP-B/32 | 0.76 (13/17) | 0.988 | β0.22 |
|
| 225 |
+
|
| 226 |
+
Per style (LAION): Bauhaus 1.00 Β· Ottoman Revival 1.00 Β· Mandate Eclectic 0.83
|
| 227 |
+
Β· Neoclassical 1.00 Β· Gothic Revival 1.00 Β· Mediterranean Vernacular 1.00.
|
| 228 |
+
|
| 229 |
+
**The headline finding.** The synthetic benchmark ranked SigLIP first by 0.002
|
| 230 |
+
on Recall@1. On real photographs LAION wins and has less than half the domain
|
| 231 |
+
gap. **Selecting on the saturated benchmark would have shipped the weaker
|
| 232 |
+
model.** A benchmark at ceiling does not merely fail to discriminate β it
|
| 233 |
+
discriminates wrongly.
|
| 234 |
+
|
| 235 |
+
Mandate Eclectic scores lowest, and it was also the group flagged as
|
| 236 |
+
lowest-confidence during hand-labelling. Labelling uncertainty surfacing in the
|
| 237 |
+
results is a reassuring sign about both.
|
| 238 |
+
|
| 239 |
+
Failure cases are architecturally sensible rather than random: a Bauhaus
|
| 240 |
+
building retrieved as Soviet Constructivist (contemporaneous interwar
|
| 241 |
+
modernism, strip windows, white render), and a night photograph of a Mandate
|
| 242 |
+
building retrieved as Mediterranean Vernacular (both cream render with
|
| 243 |
+
shutters).
|
| 244 |
+
|
| 245 |
+
---
|
| 246 |
+
|
| 247 |
+
## Generator failures found during construction
|
| 248 |
+
|
| 249 |
+
Four, documented in `notebooks/02_facade_eda.ipynb`. **Three were silent** β no
|
| 250 |
+
exception, no warning, and output that looked entirely plausible.
|
| 251 |
+
|
| 252 |
+
| # | failure | how it was caught | silent |
|
| 253 |
+
|---|---|---|---|
|
| 254 |
+
| 1 | the pooled embedding overrode every style | Bauhaus, Brutalist and Gothic all rendered as the same beige office block | yes |
|
| 255 |
+
| 2 | detail crops destroyed the class signal | style unrecoverable from a cropped window grid | yes |
|
| 256 |
+
| 3 | `key_features` never reached the image prompt | code review after failure 1 | no |
|
| 257 |
+
| 4 | prompts truncated at 77 tokens | validator token-budget check | yes |
|
| 258 |
+
|
| 259 |
+
A fifth was a **measurement** bug rather than a generation one: the orientation
|
| 260 |
+
classifier could only emit three of the five declared labels, so every style
|
| 261 |
+
declaring `curved` or `diagonal` scored zero and looked like a total generator
|
| 262 |
+
failure. Fixing the metric raised orientation compliance from 60% to 83%.
|
| 263 |
+
|
| 264 |
+
The general lesson, and the reason this section exists: a synthetic corpus
|
| 265 |
+
needs instrumented acceptance criteria. Looking reasonable is not evidence of a
|
| 266 |
+
working generator, and a broken metric can invent a failure as easily as a
|
| 267 |
+
broken generator can hide one.
|
| 268 |
+
|
| 269 |
+
---
|
| 270 |
+
|
| 271 |
+
## Known limitations
|
| 272 |
+
|
| 273 |
+
- Style boundaries blur where visual grammars genuinely overlap; the confusion
|
| 274 |
+
matrix above reports which pairs.
|
| 275 |
+
- Synthetic-to-synthetic retrieval saturates and cannot rank models reliably β
|
| 276 |
+
see the sim-to-real section.
|
| 277 |
+
- `material` and `period` are determined by `style` and are not independent
|
| 278 |
+
labels.
|
| 279 |
+
- The real-photograph evaluation is small (n = 17) and unevenly distributed;
|
| 280 |
+
per-style figures are reported alongside the mean for that reason.
|
| 281 |
+
- Generated plates are stylistic composites and may combine period details that
|
| 282 |
+
would not co-occur on a real building.
|
| 283 |
+
- One style's declared edge orientation disagrees with measurement. The
|
| 284 |
+
declaration is probably wrong, and it has been left visible rather than
|
| 285 |
+
fitted to the data.
|
| 286 |
+
|
| 287 |
+
## Ethical notes
|
| 288 |
+
|
| 289 |
+
No plate depicts a real building or is attributable to any architect. The
|
| 290 |
+
accompanying app states, in the interface, that its output is a stylistic
|
| 291 |
+
suggestion carrying no claim about a building's architect, date, or heritage
|
| 292 |
+
status. Both the image and text prompts explicitly bar the models from naming
|
| 293 |
+
real architects or buildings and from asserting heritage status.
|
| 294 |
+
|
| 295 |
+
## Citation
|
| 296 |
+
|
| 297 |
+
```bibtex
|
| 298 |
+
@misc{facade_styles_2026,
|
| 299 |
+
title = {Facade: a synthetic architectural style corpus with
|
| 300 |
+
sim-to-real evaluation},
|
| 301 |
+
author = {Jonathan Dav},
|
| 302 |
+
year = {2026},
|
| 303 |
+
url = {https://huggingface.co/datasets/Jonathandav/facade-styles}
|
| 304 |
+
}
|
| 305 |
+
```
|