Labyrinths of the London Underground.
How I used Image-to-image translation to create my own labyrinths and mazes.
Labyrinths of the London Underground.
How I used Image-to-image translation to create my own labyrinths and mazes.
If you have been to London, then chances are you have been on the “Tube”, the underground transit system of London. The Tube has a certain aesthetic style which has been developed through time as a reflection of the architectural restraints of building underground as well as of the fashions of the age, as popular artists have often been asked to contribute art to help decorate the stations. In a case of form following function, and vice-versa, the art produced for the Tube has reflected and also developed the characteristic style, e.g. the iconic tube maps, art and the advertising which is scattered all around the system are all very much linked to the atmosphere and function of the system.

Photo Credit: Chris McKenna (CC BY-SA 4.0)
One of the more recent, and great, artistic contributions to the London Underground comes from the artist Mark Wallinger, a British artist known for his sculpture and artworks. He has contributed a series of iconic labyrinths which perfectly capture and enhance the aesthetic style of the Tube. In all of the 270 underground stations you will now find a labyrinth created by Mark Wallinger. Each labyrinth is numbered and is unique and stylised in one of eleven different complementary styles. The labyrinth is often described as a metaphor for the path of the soul in life, whereby the complicated path will ultimately lead you to its centre. Each one of Wallinger’s designs helps take the visitor or commuter to London on a journey of discovery as they descend into the depths of the underground, before reaching illumination at their destination.

Labyrinth 218, Cockfosters (Mark Wallinger). Photo Credit: Jack Gordon (CC BY-SA 4.0)
Having walked past Mark Wallinger’s Labyrinths many times, over many years, I always felt the need to somehow complete them. The temptation to draw on them and to plot the path through the Labyrinth has always been too tempting to resist. So as a little project, I decided to capture an image of each design and develop a simple algorithm to solve them using my image analysis skills to do so. Because there are 270 different designs, I opted not to go to each station and take a photo. I reasoned this would take me weeks to achieve and so instead I purchased the book: Labyrinth: A Journey Through London’s Underground by Mark Wallinger. From this book I was able to scan in each design, and then develop a simple thresholding and search algorithm which plotted the root through each one. If you want to see a guide for doing that, I also created a video and guide for this: https://www.youtube.com/watch?v=1KHgCRs-x1M . The method works for mazes as well.

Labyrinth: A Journey Through London’s Underground by Mark Wallinger
Once I solved the labyrinths I played with the idea of depicting the solution of each maze as an interesting visual project, maybe with some ambient music to help create a tone. What I quickly realised however is that each labyrinth was a bit simple, having only one possible route through each. This meant the video, with all 270 labyrinths, might be a bit dull! and I was also worried about using so many of Mark Wallinger’s designs, and making them so available, potentially infringing on the copyright, despite the novel use case. I therefore scrapped this idea but I wondered what I could do with all these labyrinths and their corresponding solutions which I had calculated

Labyrinth 28 being solved by my algorithm. The emergent green line shows the unfolding solution (or route) through the labyrinth.
I realised at this point that I had created the perfect training set for a type of applied deep learning called: image-to-image translation. In this deep-learning paradigm you take a number of paired training images where the input and output images are linked by their underlying structure, but are visually distinct. You then train a network to learn how to stylise the input to the output whilst retaining the structure of the input. Once trained, the network can then automatically convert images from the input, into the style of output. the benefit of this is that it can potentially create quite complicated outputs, from a simple input. Applications of this include for colorizing or decolorizing images, converting sketches into photos, or converting simple schematic-like maps into fully fledged aerial views. A popular choice of network for image-to-image translation is the Pix2pix network which has been shown to work on many examples.

Example of Pix2Pix network use-case (https://ml4a.github.io/guides/Pix2Pix/). Upper row: training pairs used for training the network. Researchers created 1000’s of paired images, with a hand drawn structural image (input based on actual photographs of buildings (output). The Pix2Pix network once trained with many paired examples ,like these, can then generate photos of imaginary buildings. Lower panel, Example of imaginary layout being used with the network to create a predicted output representing a novel photo of a building.
By using my labyrinth solutions I calculated as the input and the Mark Wallinger designs as output, I realised I could use the resulting trained Pix2Pix network to generate unlimited unique designs, with the aesthetic of a Mark Wallinger piece, but with a path of my choosing.

I therefore set to work and trained several models to learn the relationship between the labyrinth solution and the output labyrinth image. Mark Wallinger’s labyrinths come in eleven different styles and so I pooled each design and trained a number of networks.
Once trained I then tested each network on an unseen labyrinth layout, i.e. a labyrinth solution not seen in the training. I found at first the trained networks were a little fragile. Because I didn’t have thousands of paired training images the networks had overfit and had learnt literally to recognise an input rather than really understand how to convert it based on the structure. To solve this problem I used much more regularisation in the input, which I achieved through creating many similar but distinct variations of input and output image. I did this through shifting the designs in X and Y and also through rotating the labyrinths. This created a lot more variation in the training material and meant the network had to really understand how to create the output based on the input rather than just recognising it. This is like a student who really understands the topic, as opposed to just learning the answers of an exam. Through this strategy I produced a number of robust networks which really captured the style of Mark Wallinger’s work.
Here are some examples of the work I produced:

Made-up design 1 (Visit on Instagram)

Made-up design 2 (Visit on Instagram)
Although not perfect, the mazes are pretty good. Where they fall down is predicting the red cross, which is the starting point and characteristic starting point of each maze. This could be corrected in future, but works in these examples to convince you they are not from the original collection. As mentioned I also wanted to produces some mazes, so I tried a circular maze and a labyrinth:

Made-up design 3 (Visit on Instagram)
The circular variant worked well, but the square maze produced and interesting artefact:

Made-up design 4 (Visit on Instagram)
Because the Pix2pix network during training never saw a square labyrinth (all Wallinger’s designs are circular) the network struggled to deal with the areas which fell outside the normal circular region. This created an interesting visual style but fails as a functional maze. In the future I will stick to circular mazes with this particular training regime.
I found that I could also experiment with the design to make it rotate and animate, rendering each frame of the underlying design with the desired aesthetic. I found that the more I changed the underlying structure and changed the form of the layout the less the result looking like a Mark Wallinger maze, though some of the details still remain. In the end I have created unique pieces of imagery which have influences from Mark Wallinger’s work in them.

Animated circular maze.
So next time you visit the London Underground, keep an eye out for the Mark Wallinger’s designs, and in the meantime, please enjoy my art which reflects and hopefully celebrates his style and contributions.
메타데이터
- post_id
- 561896b6e2bd
- slug
- labyrinths-of-the-london-underground-561896b6e2bd
- url
- https://medium.com/analytics-vidhya/labyrinths-of-the-london-underground-561896b6e2bd
- canonical_url
- https://medium.com/analytics-vidhya/labyrinths-of-the-london-underground-561896b6e2bd
- author_url
- https://medium.com/@dwaithe
- status
- ok
- fetched_at
- 2026-06-13 09:11:36