The repository contains the code implementation of the paper: Envisioning Global Urban Development with Satellite Imagery and Generative AI.
- Introduction
- Installation
- Dataset Preparation
- Model Training
- Model Testing
- Model evaluation
- Acknowledgements
- Citation
- License
- Contact Us
Download or clone the repository.
git clone https://github.com/kailaisun/UrbanControlNet.git
cd UrbanControlNetWe recommend using Conda (Miniconda) for installation.
Create a virtual environment named mambacontrol and activate it.
conda env create -f environment.yaml
conda activate mambacontrolThe dataset is built from publicly available global sources:
- Urban boundaries — GHS Urban Centre Database (2023), covering 500 metropolitan areas with 400 m × 400 m grids.
- Satellite imagery — Mapbox Static Tiles API.
- Population and building data — GHSL P2023A (2020): GHS-BUILT-S, GHS-BUILT-V, GHS-POP.
- Environmental constraints — OpenStreetMap, including major roads, water bodies, and railways.
Download land use, building, and basemap data:
cd dataset
python download_mapbox_tiles.py
python download_osm_landuse_building.py Create DEM, hint, and satellite images:
python create_dem_image.py
python create_hint_image.py
python create_satellite_image.py Compute grid density and land use–road metrics:
python compute_grid_density_gee.py
python create_landuse_road_metrics.py cd Urbancontrolnet
python train_density.py Set sd_locked = False, then
python train_density.py-We provide two checkpoints (one is finetuned on 100 cities with better performance; another is finetuned on 500 cities with larger coverage):Download
Download checkpoints, make a new folder (checkpoints_density), and change the lines at results_view_loop_density.py:
ckpt_directory = f'./checkpoints_density'
ckpt_epoch_list = ['100']
output_file_dir = f'./output_image/city_'python results_view_loop_density.pypython prediction_train.pyFor computing metric (e.g., FID, ID, SSIM, FSIM, PSNR, etc.), please see our another repo: Evaluation-Metrics
The repository is licensed under the Apache 2.0 license.
If you have other questions❓, please contact us in time 👬
