Original PDF
Front matter

List of Figures

Chapter 1. Introduction & Motivations

Figure 1.1. The hand stencils at the Cuevas de las Manos in Santa Cruz, Argentina, are thought to be over 10,000 years old. Image from Wikimedia Commons by User:Marianocecowski, licenced under CC BY-SA 3.0.

Chapter 2. Background

Figure 2.1. Still image from video “Deepdream is blowing my mind” (2015) by Memo Akten.

Figure 2.2. “All watched over by machines of loving grace: Deepdream edition” (2015) at the “DeepDream: The art of Neural Networks” exhibition at the Gray Area Foundation, February 2016.

Figure 2.3. A selection of press covering the “DeepDream: The art of Neural Networks” exhibition at the Gray Area Foundation, February 2016.

Figure 2.4. a.) A three layer, feed-forward, Multi-Layer Perceptron with a single hidden layer. In this diagram, all of the neurons are displayed, and we can see that the network consists of 4 inputs and 3 outputs, and a 5 neuron hidden layer. b.) The same MLP, displayed with layers collapsed into multi-variate units allowing simpler visualisation, mathematical modelling and computational implementation using vectors. The dimensions of each layer is indicated with dim, 𝑾xh and 𝑾hy denote the weights of the connections from the input layer to the hidden layer, and hidden layer to the output layer respectively, 𝒃h and 𝒃y denote the bias vectors (which are typically included as parts of the weights or parameters) of the hidden layer and output layer respectively, and φ denotes the activation functions. c.) A Recurrent Neural Network, with a cyclic connection on the hidden layer.

Figure 2.5. A Convolutional layer consisting of many filters, applied to an input. Image from Wikimedia Commons, licensed under CC BY-SA 4.0

Figure 2.6. Image from Wikimedia Commons, licensed CC under BY-SA 4.0

Figure 2.7. A simple Auto-Encoder. In this example, the input and output layers consist of 10 neurons, while the bottleneck layer consists of 3 neurons. To avoid clutter in the diagram, we have omitted drawing all of the connections. In a MLP Auto-Encoder, all of the layers are fully connected. In a Convolutional Auto-Encoder, the layers are arranged into grids as we describe in subsection 2.3.15: Convolutional Neural Networks (CNN)

Figure 2.8. Variational Auto-Encoder. The output of the encoder network is the mean 𝝁 and standard deviation 𝝈 of a Normal distribution, from which a latent vector 𝒛 is sampled 𝒛~𝒩(𝝁,𝝈). This is then fed into the decoder network for decoding.

Figure 2.9. Generative Adversarial Network

Figure 2.10. MLP and RNN with single hidden layer.

Figure 2.11. Overview of the steps of MCTS

Chapter 3. Realtime sequence generation with continuous control

Figure 3.1. Overview of how MCTS and the CNN is integrated

Figure 3.2. A screenshot from our software, running the MLR model trained on MNIST. The top left panel shows the current state of the canvas for the current timestep, the top middle panel shows the scaled down drawing used for evaluation, and the top right panel shows a visualization of all of the current MCTS rollouts for the current timestep. At the bottom of the screenshot, the class probability distribution shows that the classifier returns 100% confidence that the current state of the drawing is the digit ‘3'.

Figure 3.3. A screenshot of our software, running the Inception-v3 model trained on ImageNet with desired target class set to ‘meerkat'. At the bottom of the screenshot, the class probability distribution shows that the classifier is 100% confident that the drawing is of a 'meerkat'.

Figure 3.4. The same configuration as Fig. 3.3 except the desired target class is ‘white wolf', and the class probability distribution shows that the classifier is 98% confident that the drawing is of a 'white wolf'.

Figure 3.5. Screenshot from our dual-screen interactive Char-RNN ensemble software. On the left is the interaction screen which we typically display on a touchscreen monitor. On the right is the output screen where the text is displayed as it is generated character-by-character.

Figure 3.6. The two screens from Fig. 3.5 stacked vertically for ease of reading in print.

Figure 3.7. Software architecture for our interactive Char-RNN. The Server is a python-based console application with no Graphical User Interface, that manages all of the models. At every timestep, the Server receives a seed text from the Visualiser, runs it through all of the models, and returns all of the probability distributions output from each model to the Visualiser. The Visualiser is an OpenGL application which provides the visual interface and interaction. The screenshots in Fig. 3.5 and Fig. 3.6 are from the Visualiser. The Visualiser continually tracks the performer's actions, either via mouse input, tracking the performer's hands using a LeapMotion device, or via faders on an external midi controller. At every timestep, the Visualiser uses these inputs to calculate and update style mixture weights, which are used to calculate the joint probability distribution for the next character. The Visualiser samples the next character from this distribution, updates the screen with this new character, and also sends it back to the Server via OSC, so that the Server can update the internal state of each of the models.

Chapter 4. Hello World: Realtime interactive training as an informative and performative tool

Figure 4.1. Hello World at The Moscow Museum of Modern Art, 2018 (Photo © Yuri Palmin)

Figure 4.2. Variational Auto-Encoder. The output of the encoder network is the mean 𝝁 and standard deviation 𝝈 of a Normal distribution, from which a latent vector 𝒛 is sampled 𝒛~𝒩(𝝁,𝝈). This is then fed into the decoder network for decoding.

Figure 4.3. An adaptation of Hello World at “Artists and Robots”, Astana Contemporary Art Centre, 2017

Figure 4.4. A screenshot from our Hello World software.

Figure 4.5. A selection of frames covering roughly a two minute experimentation session where we play with the optimisation hyperparameters learning rate, momentum, and gradient clipping threshold. Time flows from left to right, and each frame shows the live reconstruction, i.e. the Seeing panel.

Figure 4.6. Six screenshots showing a qualitative comparison of the four different loss functions. Four models train in parallel, with identical architecture and hyperparameters and the only difference being the loss functions. MS-SSIM converges the quickest, producing the sharpest reconstructions, while L2 and CE loss produce the most blurry.

Figure 4.7. Three screenshots taken during the first 30 seconds of a new experimentation session. The model is initialised at the beginning, and by the 3rd row, has converged to the extent that the reconstructed image Seeing is sharp and resembles the live video feed Stimulus. This indicates that the model has become familiar with, and has learnt the necessary features required to represent and reconstruct this Stimulus image.

Figure 4.8. In the top row, we hold our left arm vertical and hold it still for a few seconds while we wait for the reconstructed image Seeing to become sharp. We then rotate our arm to be horizontal. As can be seen in the 2nd row, the entire reconstructed image Seeing is sharp, except for our arm, which is missing. The model has not seen our arm in a horizontal position yet, and thus lacks the representations required to visualise it in that manner. Across the last two rows, the arm flickers and fades in as the model learns the necessary representations for the arm in this position. Note that in the 3rd column Reminiscing, the arm flickers between horizontal and vertical. This is due to the fact that the Reminiscing image is a random sample from the local neighbourhood of the Stimulus. And in the well structured latent space of a generative model, this local neighbourhood will contain images that are aesthetically, structurally, and/or semantically similar. For this reason, the Reminiscing image will be random samples that resemble the Stimulus, without necessarily being straight reconstructions.

Figure 4.9. In the top row, we hold a red phone in our right hand for a few seconds while we wait for the reconstructed image Seeing to become sharp. In the second row, we put the phone down, and quickly lift our hand to the same position. In Seeing, trying to reconstruct this image of our hand without a phone, the model samples the closest image it can to this Stimulus. And that is limited by what it has seen before, and the representations that it has learnt. In this case, the red phone appears in our hand. Over the course of the subsequent rows, the phone flashes on and off and gradually fades out as the model learns the necessary representations for this Stimulus. In the Reminiscing panel however, we can see that the local neighbourhood of this point in latent space is still dominated by the red phone. It will take another minute or two for the distribution to be evened out across this larger area in latent space.

Figure 4.10. We hold the red phone in our left hand. However the model has not seen this. In fact it has only seen our arm in this position with our hand open and flat, as it was in Fig. 4.8 . So in Seeing, this is how the model reconstructs this Stimulus image. Over the next few frames, the red phone gradually fades in, flickering in and out. After the 5th frame, we start slowly rotating our arm back and forth between horizontal and vertical, and we observe the results in both Seeing, and Reminiscing as the phone flickers in and out, and the arm even snaps to horizontal or vertical positions.

Chapter 5. Learning to see: Digital puppetry through realtime video transformation

Figure 5.1. Frames from Gloomy Sunday (video, 2017), demonstrating subsection 5.4.2: Digital puppetry. Each row shows a single frame from the video, and is also a screenshot from our software (with the GUI hidden). In each frame, the left panel shows the live video feed from a camera, and the right panel shows the image generated in realtime by our software.

Figure 5.2. Frames from Gloomy Sunday (video, 2017), demonstrating subsection 5.4.2: Digital puppetry. Each row shows a single frame from the video, and is also a screenshot from our software (with the GUI hidden). In each frame, the left panel shows the live video feed from a camera, and the right panel shows the image generated in realtime by our software.

Figure 5.3. Frames from a video demonstrating subsection 5.4.1: Augmented drawing. Each pair of images shows a single frame from the video, and is also a screenshot from our software (with the GUI hidden). In each frame, the left panel shows the live video feed from a camera, and the right panel shows the image generated in realtime by our software.

Figure 5.4. Frames from We are all made of star dust (video, 2017), demonstrating subsection 5.4.3: Live parameter manipulation. In the top frame, we adjust the parameters such that the desired output brightness is low. The system automatically uses dark features to construct the output image. In this case, most of the output image is comprised of distant galaxies, while hints of larger and brighter distant galaxies define the outline of the face in the video feed. In the lower two frames, we increase the desired brightness, and the system automatically replaces the distant galaxies with brighter features, such as nebulae. We demonstrate this in much more detail in later sections.

Figure 5.5. Frames from a video demonstrating muliple simultaneous models. This was presented as an interactive installation at International Documentary Film Festival Amsterdam (IDFA) 2017. Each row shows a single frame from the video, and is also a screenshot from our software (with the GUI hidden). In each frame, the left panel shows the live video feed from a camera, and the subsequent panels show images generated in realtime by our software using multiple models trained on different datasets.

Figure 5.6. subsection 5.4.2: Interactive installation as exhibited at The Barbican's 2019 AI: More than Human exhibition in London, UK and currently on tour around the world. We discuss this in more detail in subsection 5.4.2: Interactive installation.

Figure 5.7. A high level schematic of the system including the training and inference stages. During pix2pix training, the images which are to be used as 𝒊𝒏𝒑𝒖𝒕𝒔 in the (𝒊𝒏𝒑𝒖𝒕,𝒕𝒂𝒓𝒈𝒆𝒕) pairs, are generated on the fly from the 𝒕𝒂𝒓𝒈𝒆𝒕 images via a custom image processing pipeline. The parameters of this pipeline are randomised on every iteration, in order to augment the dataset and aid generalisation. During inference, the video feed is also fed through the same image processing pipeline. In addition, a number of additional image processing filters are applied before the images are fed into the model for prediction. This exposes a number of human-understandable parameters for realtime manipulation and meaningful control over the images generated.

Figure 5.8. Example images from training. Each row shows examples from a separate model. From top to bottom, these are the Waves, Flowers and Deep space models. The left column shows an image selected at random from the training data. This is a random crop, and may or may not have been flipped. This will be used as a target image for this particular training iteration. I.e. it is the ground truth. The centre column shows the input image generated on the fly via realtime processing of the target image, with randomised parameters (i.e. random brightness and contrast). The right column shows a prediction from the generative model, given only input. In other words, the model is learning to predict the first column, given only the second column, and is producing the third column.

Figure 5.9. A screenshot from our realtime inference software with multiple models and the GUI enabled. In the top left corner, we can see the live video feed, either from a camera, or a video file. In the top centre, we can see the video feed processed by the image processing pipeline. This is the input image (labelled capture_proc in the screenshot) that is fed to the trained model(s) for inference. In this particular case, the video feed has been downscaled 24x, and then upscaled back to its original size. This acts as a low-pass filter. The next four panels show the outputs from four different models, simultaneously running inference on the same input. On the far right, we can see the GUI, showing the parameters which are adjustable in realtime. Notice how the original video feed in the top left, is radically different from the raw training examples in the left-most column of Fig. 5.8. However, the centre image, which is actually input into the model during inference, very much resembles the types of images in the centre column of Fig. 5.8, which are input into the model during training.

Figure 5.10. Frames from a video demonstrating augmented drawing (2017).

Figure 5.11. Frames from a video demonstrating augmented drawing (2018). More frames from this video can be seen in 5.3.

Figure 5.12. Stills from Delusions (video, 2017) by French artist and roboticist Patrick Tresset. Each pair of images shows a single frame from the video. In each frame, the left panel shows the live video feed from a camera, and the right panel shows the image output from his software in realtime.

Figure 5.13. Stills from Body Network on Paper I and II (video, 2019) by American artist and human anatomy expert Scott Eaton.

Figure 5.14. Frames from the video Gloomy Sunday (2017)

Figure 5.15. Frames from the video We are made of star dust #2 (2017). The live video feed for this example comes from a USB microscope.

Figure 5.16. Objects provided with the Learning to see interactive installation. Users play with and manipulate these objects. The video feed from an overhead camera is fed to our system for processing.

Figure 5.17. Learning to see interactive installation at The Barbican's 2019 AI: More than Human exhibition in London, UK.

Figure 5.18. Learning to see interactive installation at The Barbican's 2019 AI: More than Human exhibition in London, UK.

Figure 5.19. Learning to see interactive installation at The Barbican's 2019 AI: More than Human exhibition in London, UK.

Figure 5.20. Learning to see interactive installation at The Barbican's 2019 AI: More than Human exhibition in London, UK.

Figure 5.21. Frames from Architectural machine translation (video, 2019) by Swedish architect Erik Swahn. In 2019, inspired by the work that we shared in this area, Swahn started experimenting with a similar approach. He trained models on architectural plans and urban maps. Using wooden blocks, he was able to instantly prototype potential architectural diagrams.

Figure 5.22. The image here in the top left shows the frozen video feed that will be used as an input for all of the subsequent examples in this section. All of the variations in output in the subsequent examples, come only from different configurations of parameters, which we will detail in each example.

Figure 5.23. A selection of outputs from the Waves model, collected in a single image to aid side-by-side visual comparison. Note that each of these images was generated from the same input video frame. Only the processing pipeline parameters are interactively modified in realtime via the GUI.

Figure 5.24. Same configuration as Fig. 5.23, with outputs from the Fire model.

Figure 5.25. Same configuration as Fig. 5.23, with outputs from the Clouds model.

Figure 5.26. Same configuration as Fig. 5.23, with outputs from the Deep space model.

Figure 5.27. downscale=24, gamma=2.

Figure 5.28. downscale=24, gamma=5.

Figure 5.29. More examples of modifying gamma, arranged in a single image to aid side-by-side visual comparison. Each of the columns show the outputs for gamma=2, 3, 5 and 7 respectively, with downscale=24 for all.

Figure 5.30. The first column is for reference, and shows the outputs with invert turned off and gamma=2. The following three columns show the outputs with invert turned on and gamma=1, 2 and 3 respectively.

Figure 5.31. invert=True, downscale=0., post_median=20, gamma=1.

Figure 5.32. invert=True, downscale=10, post_median=30, gamma=1. In the previous example, to demonstrate the effect of the median filter, we disabled the downscale low-pass filter. This results in undesirable high frequency artefacts in the output images. To address this, we reintroduce a small amount of downscale.

Figure 5.33. More examples of modifying the amount of the median filter, arranged in a single image to aid side-by-side visual comparison. The first column is for reference, and shows the outputs with median turned off, gamma=2 and downscale=24. The following three columns show the outputs for median=10, 20 and 30 respectively. The last column also has downscale=10 to remove the high frequency artefacts, while the second and third columns have downscale turned off.

Figure 5.34. adaptive_thresh=True, downscale=0. For each pixel, we set a threshold equal to a gaussian-weighted sum of the pixel's neighbours within a block, minus a constant C. If the pixel value is greater than this threshold, it is set to black, otherwise it is set to white. This behaviour can be inverted with the invert parameter. The block size and constant C can be adjusted with the adaptive_thresh_block and adaptive_thresh_c parameters respectively.

Figure 5.35. adaptive_thresh=True, downscale=16. In the previous example, we disabled the low-pass filter, to demonstrate the effect of the adaptive threshold. The undesirable high frequency artefacts which arise as a result of this can be resolved with a low-pass filter such as downscale.

Figure 5.36. adaptive_thresh=True, downscale=16, post_median=10. We can reintroduce a median at the end of the image processing pipeline, smoothing the edges of the shapes.

Figure 5.37. adaptive_thresh=True, downscale=16, post_median=20. Increasing the amount of median smooths the shapes of the structures even more.

Figure 5.38. The first two columns show the outputs for post_median=10 and 20 respectively. The last two columns show the outputs for pre_median=10 and 20 respectively. In all cases, the adaptive threshold and downscale settings are the same as the previous examples.

Figure 5.39. canny=True, canny_t1=10, canny_t2=20.

Figure 5.40. canny=True, canny_t1=1, canny_t2=10. We can adjust the threshold values for the canny algorithm using canny_t1 and canny_t2 to increase or decrease the amount of detail captured.

Figure 5.41. pre_median=10, canny=True, canny_t1=1, canny_t2=10. Applying a median filter before the canny filter, removes some of the noise and smooths the edges detected by the algorithm.

Figure 5.42. pre_median=10, canny=True, canny_t1=1, canny_t2=10, post_blur=20. As we demonstrated in the previous examples, to remove the high frequency artefacts in the output images, we can apply a low-pass filter to the input image. In the previous examples, we used downscale as a low-pass filter. Another option that we have available, is to use a blur. The difference between post_blur and downscale is very subtle, but for the sake of variety, we will use blur in these next few examples. Similar to median, we can apply the blur at the start of the filter pipeline, or at the end. In this particular case, since we would like to filter the results of the canny edge detection, we use post_blur.

Figure 5.43. More examples of modifying the canny thresholds and the amounts of pre_median and post_blur filters. The (pre_median, canny_t1, canny_t2, post_blur) settings for each column are as follows. 1:(10, 5, 20, 20); 2:(10, 10, 50, 20); 3:(10, 10, 100, 30); 4:(15, 10, 100, 30).

Chapter 6. Deep Meditations: Latent storytelling

Figure 6.1. Photos from Deep Meditations: A brief history of almost everything in 60 minutes at Sonar+D Barcelona, 2019

Figure 6.2. An example frame from a rendered video of a (𝒛-sequence, video) pair. Each of the 28 tiles in this image, shows the image produced by decoding the same 𝒛-vector from 28 different snapshots of the same model where each snapshot is separated by 100 iterations. The snapshot iteration number is also included in each square panel for reference, although in a font perhaps too small for print.

Figure 6.3. A screenshot of editing 𝒛-sequence videos in Kdenlive with tiled snapshots.

Figure 6.4. An interpolated, dense 𝒁 sequence produced using spherical interpolation. Time flows left to right. Upon close inspection, one can notice vertical notches. These indicate discontinuities every time a keyframe is reached, and a new target keyframe is selected.

Figure 6.5. An interpolated, dense 𝒁 sequence produced using physical interpolation. Time flows left to right. The vertical notches that were visible in Fig. 6.4 are no longer an issue.

Full-size image