The repository contains the code implementation of the paper: Envisioning Global Urban Development with Satellite Imagery and Generative AI.
Download or clone the repository.
git clone https://github.com/kailaisun/UrbanControlNet.git
cd UrbanControlNet
We recommend using Conda (Miniconda) for installation.
Create a virtual environment named mambacontrol and activate it.
conda env create -f environment.yaml
conda activate mambacontrol
The dataset is built from publicly available global sources:
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.py
python prediction_train.py
For 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 👬
The repository contains the code implementation of the paper: Envisioning Global Urban Development with Satellite Imagery and Generative AI.
Download or clone the repository.
git clone https://github.com/kailaisun/UrbanControlNet.git
cd UrbanControlNet
We recommend using Conda (Miniconda) for installation.
Create a virtual environment named mambacontrol and activate it.
conda env create -f environment.yaml
conda activate mambacontrol
The dataset is built from publicly available global sources:
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.py
python prediction_train.py
For 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 👬