Urban patterns recognition with a neural network
This is the part of my long-term project aitecture.com
Artificial Intelligence technologies now spread in many branches of the economy, and architecture, design and urbanism are no exception. They have huge potential, up to a complete revision of established approaches and practices. My research is how we could utilize AI on particular tasks — recognize urban patterns on example of Russian cities.
When dealing with a city, whether it is urban planning, concept or research, it is necessary to grasp its structure. The availability of map services does not give a general idea of the city.
This method employs neural network, which can learn how to recognize different urban patterns and finally get an overall picture. So we can get a new knowledge about the city and its landscape (urbanscape).
If a person, when looking at a satellite map, is able to distinguish for example, an industrial zone from a residential area, then a computer can do it for us. The task is to train it, thereby to transfer knowledge from the person to the neural network.
In my research, I analyzed five large Russian cities, with more than 1 million people:
Moscow, Nizhny Novgorod, Kazan, Samara, Yekaterinburg.
The peculiarity of many Russian cities is that they have common patterns of urban development (morphological types). For example, residential areas built up by typical series of buildings, according to one principle - this type or residential area called 'microrayon'. Thus, morphotypes of Russian cities can be analyzed on the basis of a single collection of patterns.
The methodology consists of two stages:
1) Learn: training model
At this stage, it is important to obtain quality dataset for training and in sufficient quantity. For this, an expert — a person who can classify objects (in this case — myself), in a random order, classifies individual objects from a database, for example 10% of the total number. The bigger, the better. Then, when the training dataset is collected, it is possible to train the neural network model — classifier.
2) Predict: classification of samples
When the model is trained, an unlimited number of samples can be passed through it. The output is a predicted class of the sample.
We have trained a computer and now IT generates new knowledge for us!
I used a workflow with:
- GIS package Qgis, with the module Open Layers for Google maps, and my own scripts for the preliminary classification and export of samples;
- The Python environment with machine learning libraries: Keras, Theano.
As a model for machine learning I used Convolutional Neural Networks (CNN), which used for LeNet project.
For the CityClass project, 1686 samples were selected and classified (1267 train / 419 validation). It was possible to achieve accuracy of classification by the validation set of 70–75%, which is a mere good indicator for a small database, and considering that not all samples could be determined unambiguously.
Classes of patterns
All cities were divided into a grid with a cell size of 600 x 600 m, of which 7 characteristic urban patterns classes were selected. The whole sample was classified, according to what is predominant in it.
- 1 — private residential housing area;
- 2 — historical city blocks, before the beginning of the 20th century.;
- 3 — city blocks district with separate residential buildings, so called “Stalin style” , lowercase — first half of the 20th century, 1930–1960;
- 4 — mass housing apartment buildings — microrayons, 1960–1990;
- 5 — modern residential development, from 2000-s;
- 6 —industrial and public areas: industrial areas, railway stations, shopping centers, stadiums, infrastructure facilities;
- 7 — natural and mixed areas.
Well recognized large areas, consisting of many tiles: the historic center of Moscow, parks, the riverbed of Moscow, industrial zones, a network of low-rise settlements outside the main part of the city.
Enlarged fragments of the city:
On the enlarged fragments, individual objects are visible, for example: Leninsky Prospect (street), railway infrastructure facilities, former ZIL plant, and others.
Other cities are described similarly.
I am very glad that I managed to implement the idea of this research in the form that I conceived it, and at the same time to reach the planned level of classification accuracy above 70%.
This is just one example of how to use the technology of deep machine learning in the practice of urban / urban development. For example, you can train a neural network to distinguish between areas and public spaces, extract their specific characteristics in order to use them later.
By the same technique, we can classify other cities, for example in Europe or USA.
Also it is a good idea to get an images from inner layers of a neural network. This will be one of the following posts.
As a result, we saw our cities the way a computer sees them.