Downloads · 30 days
0
eshanli/terrain-urban-diffusion-v5
terrain-urban-diffusion-v5 is a machine learning model from eshanli. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for onnx. The card lists the license as mit.
Five conditional denoising diffusion "experts" that generate street-level urban growth proposals (roads, continuous built-up density, and proposed amenity locations) for real settlements, conditioned on terrain and th…
Downloads · 30 days
0
Access
Public
Updated Jul 14, 2026
Repo size
117 MB
Likes
0
Public
Click a slice to open those files.
.onnx115 MB · 98%
From the Hugging Face model README
Five conditional denoising diffusion "experts" that generate street-level urban growth proposals (roads, continuous built-up density, and proposed amenity locations) for real settlements, conditioned on terrain and the existing footprint. Each expert covers one contemporary growth regime, and a hard router selects the expert for a given map window from interpretable conditioning statistics.
Companion to the paper From Growth Model to Planning Assistant: Terrain-Conditioned Diffusion with Auditable Language Operations and Jurisdictional Rule Packs. A preprint is available on SSRN (abstract 7089538, posted July 2026); the same manuscript is under review at Environment and Planning B: Urban Analytics and City Science (manuscript ID EPB-2026-0743). The paper PDF is also included in this repo as paper.pdf.
There is one expert per growth regime:
| Expert file | Regime |
|---|---|
model_village.onnx | Village |
model_town.onnx | Hilly town |
model_urban.onnx | Planned fringe |
model_informal.onnx | Informal peri-urban frontier |
model_megacity.onnx | Megacity edge |
A hard router picks the expert for each window from four interpretable conditioning statistics: slope, built fraction, road fraction, and the roads-per-built ratio. The routing rule and its fallback chains live in src/moe.py in the code repository, so expert selection is auditable rather than learned end-to-end.
| File | What it is |
|---|---|
model_village.onnx, model_town.onnx, model_urban.onnx, model_informal.onnx, model_megacity.onnx | The five diffusion experts, ~23 MB each |
zone_clf.json | Gradient-boosted zoning classifier, exported as plain JSON trees for in-browser evaluation |
bike_clf.json | Logistic bike-infrastructure classifier (intercept + 4 coefficients) |
paper.pdf | The accompanying paper |
Each expert is an ONNX export of a conditional U-Net with roughly 13M parameters, operating on 128x128 rasters at 15 m/px. The five conditioning channels are:
Sampling uses DDIM with 50 steps.
The experts are standard ONNX graphs, so any ONNX Runtime binding works. Because the exact input and output node names depend on the export, inspect them at load time rather than hardcoding:
import numpy as np
import onnxruntime as ort
sess = ort.InferenceSession("model_village.onnx", providers=["CPUExecutionProvider"])
# Inspect the signature so you feed the right tensors
for i in sess.get_inputs():
print("input:", i.name, i.shape, i.type)
for o in sess.get_outputs():
print("output:", o.name, o.shape, o.type)
# A conditional diffusion U-Net expects a noisy latent, a timestep, and the
# 5-channel conditioning stack (elevation z-score, slope/30, built, roads, water),
# all as 128x128 rasters. Map the names printed above to these tensors, then run
# the DDIM loop (50 steps) yourself. The reference sampler is in the code repo.
For the full pipeline (routing across experts, DDIM sampling, and the planning-task layer described below) use the code repository rather than calling a single expert in isolation.
If you only need one window, route manually: compute slope, built fraction, road fraction, and roads-per-built ratio for the window and follow the rule in src/moe.py. If you are processing a whole region, let the router in the code repo assign experts per tile.
Training targets are observed 1980-2020 change, assembled automatically with no manual annotation from:
Each expert was trained for 300 epochs on a single T4 GPU. Final noise-prediction losses:
| Expert | Loss |
|---|---|
| Village | 0.024 |
| Town | 0.028 |
| Urban | 0.032 |
| Informal | 0.038 |
| Megacity | 0.042 |
The zoning classifier (zone_clf.json) reaches leave-one-town-out macro-F1 of 0.257 across five morphology families and is set to abstain rather than guess, so its output should be read as advisory typing, not ground truth.
Beyond raw generation, the code repository wraps the experts in an auditable planning workflow: zoning annotation, demand forecasting, compliance checks against rule packs extracted from planning documents, public-comment synthesis, and staff-report drafting. Those "auditable language operations and jurisdictional rule packs" are the subject of the paper.
Decision support and exploration. Outputs are candidate growth proposals meant to help planners and researchers reason about where and how a settlement might grow. They are not plans and not legal determinations.
Available as an SSRN preprint (abstract 7089538); the same manuscript is under review at Environment and Planning B. Update with the published reference once available.
@misc{iyer2026terrainurban,
title = {From Growth Model to Planning Assistant: Terrain-Conditioned Diffusion
with Auditable Language Operations and Jurisdictional Rule Packs},
author = {Iyer, Eshan},
year = {2026},
howpublished = {SSRN preprint},
url = {https://papers.ssrn.com/abstract=7089538},
note = {SSRN abstract 7089538; manuscript under review at Environment and
Planning B: Urban Analytics and City Science (EPB-2026-0743)}
}
MIT.