Abstract

Train a GAN model to generate urban blocks of different characteristics.

Concept

Urban morphologies in cities present an excellent source of geometry for different studies. It is hypnotic to look at block plans of different cities. 

We used the cities to train a GAN model to replicate urban blocks with specific typologies. Since we can observe significant differences in typologies between Europe and America, we selected ten cities from each continent as a base for this study. We chose cities with rich urban features and typically capitals or hubs of countries.

The expected output would be to train a GAN model to create a future city block by mixing European typologies with American typologies.

State of the Art

There have been different studies on urban morphologies using GANs, most of them using streets and the main element. One of them is:

Another researcher that has also been producing information by analysing cities at a mass scale is Geoff Boeing on his webpage.

Dataset compilation

For the dataset compilation, we used Open Street Maps to obtain the city data from 10 European and 10 American cities. We downloaded this data in Shapefile format and used QGIS to process the shapefiles and style them. Unfortunately, we had to remove some noise as some city blocks had the wrong information. 

After cleaning and styling the shapefiles, we used a python code inside QGIS to process the information in the shapefiles into square image blocks at a scale of 1:5000 (we had to repeat this process later with a scale of 1:10,000). Sample image below:

Once we had the image blocks, we had to process the image size resolution and downscale them to 256 by 256 pixels each. Again, we did this with OpenCV and Python.

With this process, we created three datasets: the European cities dataset (1,500 images), the American cities dataset (900 images) and the mixed Dataset (2,400 images).

Layer structure

The layer structure is shown below:

Initial tests

With the initial datasets with blocks at a 1:5000 scale for Europe and America, we decided to train three models: one based on European cities, one based on American cities and another with a mix of both.

On the Europe dataset, the results start to show after epoch 20,000. Since the Europe dataset has smaller city blocks, the GAN was able to show better results in training. However, around about epoch 50,000, the was a model collapse as the results stagnated in a blur of colours.

The same happened in the American Dataset, but the results were not as satisfactory. Given that the urban blocks in American cities are more significant, the GAN couldn’t find enough differences between the images to generate an exciting result.

In the third model, where we used a combination of Europe and America, the results were more satisfactory, but the trend from the previous models continued.

Further testing

Because of the previous results, we decided to create another dataset with an urban scale to fit more features into each image block of 256 by 256 pixels. So we increase the scale from 1:5000 to 1:10,000. We then proceeded to create three models based on this Dataset: a European one, an American one and a mix of both.

The results in training are palpable, still far from ideal, but the features generated from the GAN model are more and more enjoyable. Specifically in the 3rd model with the mix of both datasets. 

We recommend increasing the resolution of the image (with the drawback of needing far more computing power) or increasing the resolution of the blocks to 1:20,000 to reach better results. Unfortunately, we ran out of time for this 3rd Dataset.

Latent space explorations

With the testing concluded and using the generation model from the 55,000 epoch of the Europe+America dataset, we could generate random vector explorations and select specific characteristics that we wanted to replicate. We then recorded the specific number of these explorations and asked the model to do a latent walk from A to B. The results were super interesting: we can see how the GAN uses those characteristics to create a composite image.

Conclusions

Although the results were not as refined as we expected them to be, the progress made by the GAN from the early explorations to the later ones is outstanding. Therefore, we believe that GANs will be a valuable asset for architectural explorations of urban nature in the future.

Credits

URBAN GAN is a project of IAAC, Institute of Advanced Architecture of Catalonia, developed at Master In Advanced Computation For Architecture & Design in 2021/2022 by students: Bruno Martorelli and Gerald MandevhanaFaculty: Oana Taut. Faculty assistant: Aleksander Matalski