Algorithmic Design: Generative Adversarial Networks Based Urban Design

Page 1

Rong Peng, Da Xu Chair of Architectural Informatics Department of Architecture Technical University of GenerativeMunich Adversarial Networks Based Urban Design

Generative Adversarial Networks Based Urban Design

Chair of Architectural Informatics Dr.-Ing.

Algorithmic Design

2
Prof.
Frank Petzold
Ivan Bratoev, Frank Petzold 03725447 | Rong Peng 03756247 | Da Xu

Table of Contents

3 322622181284 Ideas Selection Topic PrototypeDataDataConceptDeterminationDevelopmentSourceProcessing Reflection and Outlook

Ideas Selection

At the beginning of this course, we get the final AI task of this semester and then we focus on two questions: what is the problem we want to solve and how do we imagine an AI could assist. For the interims presentation 1 we proposed two different ideas and we also prepared storyboards for each idea.

In the presentation, we have two initial ideas regarding AI. The first one is to deal with the lengthy generative work in the urban planning process, and the workload is huge for planers. Meanwhile they will face many meetings and discussions, in which economic factors and planning indicators will take up a lot of time. The numerical parameters are easier to be processed by digital way. So we would like to use algorithms to help planners rapid generate city models.

In traditional algorithms, input parameters are calculated according to formula algorithms. Yet it makes it difficult to describe the more complex factors in design, such as the proportional relationship of buildings to open space, the typology of urban blocks and so on. The GAN method in the machine learning algorithm provide a different method. It can input parameters and generate a more realistic city model according to the training data set. By adjusting the parameters, different city models can also be quickly obtained. It will help planners find better solutions and make the discussion process more efficient.

4

When given a city planning project, planners, architects will discuss about proposal.

The new machine learning algorithm GAN provides a new way to generate city models.

Concept Propose 1

However, there are many factors that need to be considered during the Withdiscussion.thehelpof

AI, a wide variety of different models can be quickly generated.

The factors discussed can often be turned into parameters for generating urban models.

This will help planners discuss planning proposal.

5

Our second proposal is related to how the coronavirus affects our live. Two years after the outbreak of the COVID-19, the related prevention measures are being gradually reduced. We seem to escape the effects of the virus on us and enter the post-pandemic era. But have we really returned to the life before the pandemic? This is the problem we want to investigate. Uploading photos, tweeting on social media has become a part of our daily life, at the same time which also documenting people’s activities. Moreover, nearly all mobile apps have location functions and navigation software has become an indispensable tool for us. These applications are recording our movements every day. We have experienced lockdown during the pandemic and working from home or online courses become familiar and accepted by us. Which has significantly changed our lifestyles and scope of activities. With the help of Artificial Intelligence, we expect to get relevant photos, key words, location and other information from social media and applications. We look forward to getting some changes or information through subsequent analysis, such as numbers of photos from a tourist spot, the amount of people appearing at a certain metro station. These changes may help us to investigate how pandemic have influenced our daily life and if we are really getting free from the negative effects of the covid 19.

6

Could we really return to the life before the pandemic.

Working from home and online courses become familiar and accepted.

Concept Propose 2

Social media documents our Gettingactivities.photos,

key words and location from social media with the help of AI.

Navigation software record our movements .

Analyzing data and drawing conclusions.

7

Topic Determination

After several presentations and tutoring we finally decided our topic: generative adversarial networks based urban design.

The reason we choose this topic is because we realize in recent years, rapid advances in big data and artificial intelligence techniques have opened new opportunities for architects and urban planners to deeply understand the development and design of our cities. We want to through our investigation understands the impact of topography on a city‘s development and roads design.

Our goal is to build a GAN-based street network generation model. GAN is short of generative adversarial network, which designed by Ian Goodfellow and his colleagues in June 2014. GAN is a class of machine learning frameworks and is being applied in more and more fields, including but not limited to fashion, art, science, video game and so on. In a GAN two neural networks compete with each other and by given a training set, the generator trains the data and the discriminator tell how good the output is and at the same time it is also being updated dynamically, in the process of continuous training GAN become more accurate in their predictions.

First, we put the collected information such as topography information, Street Network and so on into this model and then the model will generate corresponding street network predictions. Finally, we need to judge the quality of the generated information. We hope our model could through these input topography and road junctions related information generate street network.

8

TopographypInformationStreetNetwork

9 Concept
Planning Guidance CompletedNetworkStreet Mask Dening Region to GenerateNetworkStreet Generator RealDiscriminatororFake?

The first step of our GAN framework takes the street network layer as our basic layer data and we put a certain mask on the layer. Then the generator could base on the context produce a whole street network which could cover the mask area. After this step we put other layers into the generator to create a better street network. Finally, we put topography layers to train the model and new street network will be generated based on topography information and previous date, then we put these final outputs into discriminator to judge the quality of all images.

10
11 Overall Framework Conventionallayers Street Network Mask Road TypographyJunctionsInformationDataSamples ConventionallayersConventionallayers Discriminator Conventionallayers

Data Source

Finally we chose Siegen as our target area because this is a Germany city surrounded by mountains. We collected the digital elevation model from a public collection of Earth science data, namely NASA Earth Data and We chose the DEM has 12.5 m resolution which captured by ALOS PALSAR(Advanced Land Observing Satellite). About Street network information we collected from OpenStreetMap. Administrative area is base of digital geodata provided from Federal Agency for Cartography and Geodesy.

12
Interface of NASA Earth Data

Interface of OpenStreetMap

Interface of Federal Agency for Cartography and Geodesy

13

After data collection, we will perform further processing on these raw information. In this Stage we generate Topographic Elevation, Slope, Aspect Slope. Hill shade and Street Network layers from raw data with the leverage of ArcGIS. And then, we generate so called fishnet in ArcGIS in our defined area, with 500m Cell Size Width and Height. Then we split every layers through this fishnet into 379 different precises and we save them in different folders, but with the same picture number.

14

Interface of ArcGIS

15

Digital Elevation Model Topographic Elevation

Aspect Network
16
Street

Slope

17
Hill shade (Azimuth=180) Hill shade (Azimuth=0) Hill shade (Azimuth=270)

Data Processing

After exporting the original datas from ArchGIS, to get a better model, we process the data differently according to the different experiments we will perform.

First, we convert the tif images to jepg format which is compatible with more image processing libraries. By this process, we use the open source library in python-PIL, to read and save the image. In this step, we convert all images and save them in different folders.

Next, we made enhancements to the core road data. Adjust the original lowcontrast image to a high-contrast black and white image. At the same time, adjust the image size of each geographic information layer to be consistent. This process uses the numpy library and process the image as an array.

18

Data Augmentation Conversion tif2jpg

19
Format

Constrained by the limited data set, the complete tile is difficult to be summarize by the model. So for the street network, we add a square mask at the center, to increase the input information, and reduce the prediction area at the same time. The model is trained by comparing with the target data. This process also handle the image as a numpy array with pixels.

In concept, we will add different geographic information. The layers need to be merged. In the prototype, we selected the altitude data and street network. This process is carried out using the function of addWeighted in the cv2 library.

In order to ensure that the image information, we try different weights, and set the road value to 0.7 and the geographic information value to 0.3 in the end.

In order to make the data easily be imported, and to be more convenient for training on the server of Jupternotebook, the source input dataset and target dataset are packaged into npz files which contains numpy four-dimensional array, and upload to github.

20
21 ConcentrationnpzDataFileAddMask

Image credits: Thalles Silva

22

Experimental Design

We designed three progressively studies to test different deep learning algorithmic models and observe the predicted result.

In the first study, we choose the GAN model, which randomly generate noise through the generator, and the a encode-decode discriminator to distinguish real and generated data, and train the generator by maximizing the loss in between of the datas. The datastructure is listed in the left page.

As shown in the figure, the input data is the streetnetwork , and the result obtained from the last training.

As result, the model could not find the features of the picture due to the limited dataset. Another possible factor influence the result is the randomly generated noise, which can make the training process unstable.

In the second study, we chose pix2pix which has a wider application and a stable training model. The pix2pix is a cGAN-based model. Its discriminator is PatchGAN, which can discriminate high-frequency information, and its generator is UNet, which is more clearly expressed the features.

We add the mask to the road network and put it into the model, after 50 epochs of training, we can get a nice road network result.

23

Target

Study 1

tile scale: 500m x 500m quantity: 379 size: 965 x 965 chanel: 1 datasets shape: (379,28,28) epochs: 300 batch size: 5 model: GAN

24

Study 2 epochs:

25
scale: 500m x 500m quantity: 379 size: 965 x 965 chanel: 1 datasets shape: (379,256,256)
50 batch size: 1 model: pix2pix Target Epoch = 10 30 50 Input Output Target
26 Street Network Mask Data Samples Discriminator Generator Typography Information

Prototype

The goal of the prototype is to get the features of how geographic information affects the generation of roads. In the future planning, this model can predict the possible street network in the site by inputting geographic information and surrounding road network.

On the basis of study 2, in our prototype, we first selected the elevation as the base map to concentralized with the road network, which is added with Mask, as the input. We carried out data processing similar to the previous two studies, converted the image format, enhanced the data, and merged the data. Then it will be used as the input of the generator and the discriminator will distinguish images. Comparing with the target images, the discriminator will reduce the loss and feedback to train the generator. The prototype still adopts pix2pix.

The training process lasts about 5 hours. After 30 epochs training, the loss of the discriminator has been close to stable-4e-4, which is almost 0, and the loss value of the generator has also dropped from 30 to about 3. The model can generate geographic and road network information well after trainning process. ( digram in next page)

The images in the end perform well, which have the rare difference between the generator and the target image.

27

Folder Structure

28

Training Process

29
30 Training
31 Epoch = 5 10 15 20 25 Input Output Target scale: 500m x 500m quantity: 379 size: 256 x 256 chanel: 1 datasets shape: (379,256,256) epochs: 25 batch size: 2 model: pix2pix Result

Reflection and Outlook

The current prototype has many possibilities for continued development. Based on the discussions on Seminar, we summarize them into five.

1 Quantity of datasets

The area of a city is limited. When it is divided into tiles of a certain size, only an amount of data sets can be obtained, and the training of the model is limited due to small-capacity data.

2 The complexity of geographic information

The prototype only adds elevation, other geographic datas such as slope, shadow, etc., can more comprehensively understand the terrain of the region.

32

3 Other type of information

Based on a limited dataset, pix2pix2 meets the requirements proposed by the concept to predict road networks. By a larger amount of data, for example, adding data from other regions, the model can add hidden convolutional layers to concentralized the datas, and to allow the generator to grab terrain features. The model has the possibility of adding other information too, such as data related to regional culture and residents' usage habit, so that the road network generated by the model is more in line with planners' expectations.

4 Model Evaluation

The current prototype has not tested with the dataset, whether it is possible to predict the road network in the current area and whether it can generalize to other urban road networks with similar plans and topography remains to be verified.

33

References

[1] Fang, Z., Qi, J., Fan, L., Huang, J., Jin, Y., & Yang, T. (2022). A topog raphy-aware approach to the automatic generation of urban road networks. International Journal of Geographical Information Science, 1-25.

[2] Fedorova, S. (2021). Generative adversarial networks for urban block design. In SimAUD 2021: A Symposium on Simulation for Architecture and Urban Design.

[3] Anna, B., Jonathan D., (2022). A Machine-learning approach to urban design interventions in non-planned settlements. In CAADRIA: 2022, Volume 1, 223-232.

[4] Isola, P., Zhu, J.-Y., Zhou, T., & Efros, A. A. (2017). Image-to-Image Translation with Conditional Adversarial Networks. 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). doi:10.1109/cvpr.2017.632

[5] Courtial, A., Touya, G., & Zhang, X. (2021, July). Generative adversarial networks to generalise urban areas in topographic maps. In XXIV ISPRS Congress (2021 edition) (Vol. 43, pp. 15-22).

[6] Chaillou, S. (2020). ArchiGAN: Artificial Intelligence x Architecture. In: Yuan P., Xie M., Leach N., Yao J., Wang X. (Eds.) Architectural Intelligence (pp. 117-127). Springer, Singapore. https://doi.org/10.1007/978-98115-6568-7_8

[7] Yao, J., Huang, C., Peng, X. I.& Yuan, P. F. (2021). Generative design method of building group: Based on generative adversarial network and genetic algorithm. In Proceedings of the 26th International Conference of the Association for Computer-Aided Architectural Design Research in Asia (CAADRIA) (1) (pp.61-70).

34

[8] Anna, B., Jonathan D., (2022). A Machine-learning approach to urban design interventions in non-planned settlements. In CAADRIA: 2022, Volume 1, 223-232.

[9] Aliaga, D.G., Vanegas, C.A., and Benes, B., 2008. Interactive examplebased urban layout synthesis. ACM Transactions on Graphics, 27 (5), 1–10.

36 Contact <RONG <SS2022><03725447>PENG> <DA <SS2022><03756247>XU>
37

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.