/InstantCITY

Primary LanguagePythonOtherNOASSERTION

Logo

InstantCITY: Synthesising morphologically accurate geospatial data for urban form analysis, transfer, and quality control

Logo

This is the official repo of InstantCITY, a Geospatial Data Translation model for urban form analysis, transfer, and quality control.

Running InstantCITY

1. Install prerequisites

Use environment.yml to create a conda environment for GANmapper

conda env create -f environment.yml
conda activate IC

2. Download weights

The weights files are available on figshare in the Checkpoints folder.

https://doi.org/10.6084/m9.figshare.15103128.v1

Place the Checkpoints folder in the repo.

3. Prediction

Predictions can be carried out by running the following sample code. The name of the city depends on the name of each dataset.

python test.py --name <model_name> --dataroot <path to input XYZ tile dir with street networks> 

Testing an area in New York:

python test.py --name NY15 --dataroot ./datasets/Test/NY/input/15 

Testing an area in Singapore:

python test.py --name SG15 --dataroot ./datasets/Test/SG/input/15 

Testing an area in London:

python test.py --name London15 --dataroot ./datasets/Test/London/input/15 

The result will be produced in XYZ directories in ./results/<cityname>/test_latest/images/fake

4. Style Transfer

Transfering the style of one city to another, in this case, a model trained in New York City is used to predict the morphology in Detroit.

python test.py --name NY15 --dataroot ./datasets/Transfer/Detroit/input/15

Or transfering the urban texture of Jakarta to the street network of Manila

python test.py --name Jakarta15 --dataroot ./datasets/Transfer/Manila/input/15

You can choose to visualise the tiles in QGIS using a local WMTS server. For example, use the following url and choose Zoom 15 only.

file:///D:/InstantCITY//datasets/Test/SG//fake//{z}//{x}//{y}.png

4. Metrics and Vectorization

Please see the jupyter notebook in datasets/Metric.ipynb for FID score computation and vectorization.

Paper

A paper about the work was published in ISPRS Journal of Photogrammetry and Remote Sensing, and it is available open access here.

If you use this work in a scientific context, please cite this article.

Wu AN, Biljecki F (2023): InstantCITY: Synthesising morphologically accurate geospatial data for urban form analysis, transfer, and quality control. ISPRS Journal of Photogrammetry and Remote Sensing, 195: 90-104. doi:10.1016/j.isprsjprs.2022.11.005

@article{2023_ijprs_instantcity,
  author = {Wu, Abraham Noah and Biljecki, Filip},
  doi = {10.1016/j.isprsjprs.2022.11.005},
  journal = {ISPRS Journal of Photogrammetry and Remote Sensing},
  pages = {90-104},
  title = {InstantCITY: Synthesising morphologically accurate geospatial data for urban form analysis, transfer, and quality control},
  volume = {195},
  year = {2023}
}

License

Distributed under the MIT License. See LICENSE for more information.

Acknowledgements

InstantCity is made possible by using the following packages