Lane count / road type detection

Extract road features from aerial imagery leveraging machine learning


This repository aims at extracting lane count / road types features from aerial imagery in switzerland. It emerged from an idea for the Geo.Hackmin Week.

AI based feature extraction from aerial imagery has shown promising results in several studies for road features (eg Mnhi) . Various implementations are available like for example roadtagger or airs. There is also a comprehensive collection of resources on deep learning using satelite imagery on github.


The swissimage dataset consists of cloud free areal imagery with a ground resolution of 10 centimeters. From this more than 60k road images were extracted for training.

Classify road types

There exist various road type calssifications in switzerland which we may try to fit. We explored two models, a basic cnn calssifier and a customized DenseNet that fit the objektart of the street layer of the swissTLM3D.

Unsupervised way

In case there is no labels in the dataset, to find out the road type, we can manually crop images of different types of roads and use these images as reference. Then we can compute the perceptual loss between the image and the reference. The smallest loss yields the type/class of the input image. Perceptual loss can be easily computed by the pretrained model VGG16. Unlike pixel-wise loss such as L2 loss, perceptual loss focuses on the content of the image, hence is more tolerant to translation and rotation of the objects.

Count lanes

To count the marks or edges of road lanes, edge detection might be efficient. If the backgrounds/surroundings are noisy, we can use bileteral filter to preprocess the image.


imagination is released under The Anti-Capitalist Software License (version 1.4).

Loading ...
All attendees, sponsors, partners, volunteers and staff at our hackathon are required to agree with the Hack Code of Conduct. Organisers will enforce this code throughout the event. We expect cooperation from all participants to ensure a safe environment for everybody.

Creative Commons LicenceThe contents of this website, unless otherwise stated, are licensed under a Creative Commons Attribution 4.0 International License.

    This event was organized by cividi GmbH and made possible thanks to our Engagement Migros pioneer project.
Geo.Hackmin Week