Learning to see: Digital puppetry through realtime video transformation
5.1 Introduction
In the previous chapter chapter 4: Hello World: Realtime interactive training as an informative and performative tool, we presented a method and software that we developed, that trains a Deep Neural Network in realtime on a live camera feed. Using this software allowed us to gain very valuable insights into how Artificial Neural Networks learn. Using that insight, we were able to control the images generated by the Neural Network, in a realtime, meaningful and continuous manner. The system that we developed made this possible via two primary modes of interaction. The first mode of interaction is a very direct control of the input to the system. By manipulating objects in front of a camera, a user can control the images fed to the Neural Network for processing. This provides a very performative and playful interaction. The second mode of interaction, is through realtime manipulation of a number of parameters via a Graphical User Interface (GUI) or a physical device such as faders on a midi controller. We found that these two modes of interaction, complement each other very well, and provide a wide range of meaningful control to the user. In this chapter, we wish to investigate this further.
One of the aims of the research that we presented in Hello World, was to investigate how DNNs learn. And in particular, we were able to adjust a large number of hyperparameters in realtime, while a DNN was trainingFootnote 1. With immediate feedback, we were able to observe the effects of the various different hyperparameter configurations, and this allowed us to optimally select values inline with the behaviours that we were looking for.
In this chapter, we move beyond that question, and we wish to investigate how we can provide more control over the aesthetics of the images generated by a Deep Neural Network. We expand on the software tool that we developed in the previous chapter, and we build upon what we consider to be a very powerful aspect of the system, which are the two modes of interaction we describe above. In Hello World, we provide no additional training data to the system. Instead, upon launch of the software, the Artificial Neural Network starts blank, and trains live on a camera feed. In this chapter, we introduce to this system large datasets consisting of thousands of images. In other words, we first pre-train Neural Networks on these large datasets, and then we investigate how can we use these pre-trained models within our system, and provide realtime, meaningful, continuous control to the user, via the modes of interaction that we describe above.
It is worth mentioning, that the system we developed, and will present in this chapter, is capable of both starting with a model pre-trained on a dataset of thousands of images, while continuing to train live on the camera feed (and/or another dataset of images) as it did in Hello World. While this provides very interesting results, we found that it distracts from the main question that we seek to address in this chapter, which is to meaningfully control the aesthetics of the images generated by the Neural Network. Enabling realtime learning, on top of pre-trained models, makes it much more difficult for a user to isolate and understand the creative impact of any actions that they might take, as the system is far more complex, with orders of magnitude more variables affecting the images generated. This in turn, makes the control available to the user, less meaningful in accordance with the working definition that we present in this thesis. For this reason, for all of the work that we present in this chapter, we choose to disable realtime learning, and we leave that for future research which focuses solely on the question of how do Neural Networks learn. Instead, we focus only on integrating large datasets into our realtime, interactive system.
In this chapter, under the umbrella title Learning to see, we will present and discuss a number of related outputs. These include a publicly released open-source software tool, a number of public videos and artworks, and the underlying method that we used to create all of these works. We shared our videos and artworks publicly on the internet, and this constitutes a crucial aspect of our work. This is because, as we discuss in chapter 1: Introduction & Motivations, our primary aim is not necessarily to invent specific methods that accomplish certain tasks. It is instead, to demonstrate the potential power of realtime, meaningful, continuous control over the outputs of generative Deep Neural Networks. This field, at the time of our research in 2016–2017, is practically non-existent. We hope to help encourage more research and discourse in this direction. Many of the works that we created, gained immense popularity via the internet, and we consider this to be an indication that realtime, meaningful, continuous control over the outputs of generative Deep Neural Networks is indeed a very important area of research. One of the video demonstrations that we created, was shown during Nvidia CEO Jensen Huang's keynote at GTC (GPU Technology Conference) 2019Footnote 2, with the voiceover “[AI is] inventing new ways to bring out the creative genius in us all". We presented the research at SIGGRAPH 2019 (Akten et al., 2019). The work has been included in MIT's Open Documentary LabFootnote 3, and many of the videos have been shared widely on social media and influential mainstream blogs and publications such as gizmodoFootnote 4, boingboingFootnote 5 and prostheticknowledgeFootnote 6. The works have also been shown in galleries, museums and cultural institutions such as The Barbican (London, UK), Ars Electronica Centre (Linz, AT), Moscow Museum of Modern Art (Moscow, RU), Itaú Cultural (Sao Paulo, BR), International Documentary Film Festival Amsterdam / IDFA (Amsterdam, NL) and many more.
We have also released a simplified version of our software as open-source software on github (Akten, 2017). This version contains a subset of the filters that we mention in this chapter, and lacks many of the advanced non-DL related options such as advanced screen layout options, changing and loading models at run-time, midi controller support etc. In simplifying the functionality and code, we hope that it will be more informative and educational, and can act as a base for others to build upon in the future. The github repository currently has 311 stars and 61 forks.
5.2 Overview
The key question that we seek to address in this chapter, is the exact question at the core of this thesis, applied to images: How can we design and develop interactive generative systems that exploit and leverage the capabilities of state-of-the-art Deep Learning algorithms, while allowing Meaningful Human Control over the generated images, in a Realtime Continuous manner?
When we train a generative Deep Neural Network on a large dataset of images — for example, of fire — the trained model is able to generate an infinite number of images of fire. However, instead of generating random images of fire, we wish to design a system in which a user is able to control the generated images in a meaningful way. If the user envisages a particular shape of flames, or fire of a particular intensity, or embers placed in particular layouts etc., they should be able to easily produce the types of images that they desire. Furthermore, the interaction with the system should be in realtime, and continuous. This would allow the user to experiment, explore, search and find configurations that produce desirable outcomes.
We present a method in this chapter, which tackles this question. The method that we present, is not specific to fire, or any specific domain of images. It is entirely generic, and automatically works with any categories of images, without the need for domain-specific customization. Furthermore, our method doesn't only operate on images, but on live video feeds, and thus we can produce videos in realtime, through performative and playful interaction.
At the heart of all of the works that we present in this chapter, is a realtime, interactive, video processing and transformation system. We utilize a highly customizable and parametrised image processing pipeline, combined with a generative Deep Neural Network which we train with a novel training and data augmentation system. This system that we've designed, is not specific to flames, or flowers, waves, images of space or any other of the examples that we present in this chapter. Instead, our system is very generic, and learns and exploits any types of regularities or diversity that may exist in a dataset.
We think of our system as a visual instrument that allows users to create, conduct and play with visual media, with realtime, expressive and playful interaction. Our system processes a live video feed — either from a camera or a video file — and reconstructs new images that resemble the input image in composition and overall shape and structure, but is comprised of the aesthetic characteristics determined by a large corpus of data. At first glance, this may sound similar to Neural Style TransferFootnote 7. However, our system uses a very different approach, in that while Style Transfer typically extracts ‘style' information from one or a few dozen images, we train our models on thousands of images. As a result, our models contain information from across a much larger domain. When combined with a parametrised image processing pipeline, this grants a user many opportunities for meaningfully controlling the images generated in a number of different ways. Building on this system, we provide three modes of interaction:
Digital puppetry
Directly controlling the contents of the video feed is one of the more performative and playful approaches that our system allows. By manipulating our hands, body or any kinds of objects in front of a camera, we can control the overall composition and structure of the generated images. We see this as a kind of digital puppetry. Examples of this can be seen in Fig. 5.1 and Fig. 5.2 and we discuss it in more depth in subsection 5.4.2: Digital puppetry.
Augmented drawing
In addition to puppeteering objects in front of a camera, we can also control the contents of the video feed by filming ourselves draw or paint on a piece of paper or any other surface. Examples of this can be seen in Fig. 5.3 and we discuss it in more depth in subsection 5.4.1: Augmented drawing.
Live parameter manipulation
A very powerful feature of our system, is that it has a number of human-understandable parameters that allow a user to control various characteristics of the output image in a meaningful way. For example, these include parameters to produce brighter or darker images. But instead of just brightening or darkening an image using a post-processing filter as Adobe Photoshop might do, our system is able to produce images which are naturally brighter or darker, by using appropriate features. This can be seen in Fig. 5.4 where our system gradually introduces clouds of nebulae to reconstruct an input image with brighter features.
These parameters can be adjusted in realtime via a Graphical User Interface (GUI), or a physical interface such as a hardware midi controller with dials and faders. We discuss these parameters in much more detail in subsection 5.4.3: Live parameter manipulation.
Providing a realtime, immediate feedback loop between the user's actions and the system's outputs, enables the user to experiment, improvise and perform the visual media. No laborious keyframe placements, no animation curve adjustments, no rendering options are necessary; everything is performed and captured live.






5.3 System description
Before we present more of our results, and demonstrate the full capabilities of our system in more detail, we will first discuss some of the key technical implementation details. This will allow us in later sections, to discuss our results in context of this technical information.
As we previously mentioned, in Learning to see, we do not use realtime learning. Instead, we first train a number of models on large datasets of images, in a separate training phase. Once the models are trained, we load them into our realtime inference software. This software feeds each frame from a live video feed – either from a camera or a video file — to the selected model(s), and displays the results in realtime. While this is happening, the user can also manipulate a number of human-understandable parameters in realtime via a GUI, or a physical interface such as a midi controller, to influence the output in a meaningful and expressive manner.
The Neural Network architecture we use is based on pix2pix image-to-image translation(Isola et al., 2016)Footnote 8. We add additional layers to provide up to 512x512 pixel resolution. At the time of our research in Learning to see, this architecture provided state of the art results in high resolution image-to-image translation. However a year later, researchers from Nvidia and UC Berkeley introduced a novel architecture allowing up to 2048x1024 pixel resolution image-to-image translation, colloquially known as pix2pixHD (T. C. Wang et al., 2018). The method and pipeline that we discuss below, can also be adapted to pix2pixHD. However, due to the increased complexity of the pix2pixHD architecture, the training times are drastically longer, and inference performance falls below interactive rates on our hardware (Nvidia GeForce 1080 Ti): ~5fps at 512x512 with pix2pixHD, vs ~15fps with our modified 512x512 pix2pix. Since our emphasis is on realtime, playful, expressive interaction, the results that we show in this thesis are from our original 2017 pix2pix models.
On top of the image-to-image translation network, there are two additional key aspects that we introduce, that allow our system to perform in the way that it does. The first of these, is the way in which we augment the data during training. The second, is a multi-stage parametrisable image processing pipeline. A very high level schematic of the system can be seen in Fig. 5.7. We will discuss these in more detail in the following sections.
5.3.1 Datasets
Our models are trained on datasets consisting of thousands of images that share a desired aesthetic or content type. In the examples that we present in this chapter, we will focus on five different models. These models are Waves, Fire, Clouds, Flowers and Deep space. We collected the data for these models by batch downloading images from the photo sharing website Flickr that were tagged with the respective categories. For the Deep space model, we also downloaded many images from the Hubble Space Telescope's website.
In addition to the motivations that we outlined above, and inline with the premise of this thesis, we also have additional, higher level conceptual motivations behind selecting these particular categories of images. However, as this is not relevant to the technical implementation details, we will leave that discussion for section 5.5: Conclusion.
5.3.2 Training
The pix2pix architecture is a conditional GAN, which we discuss in more detail in subsection 2.1.2: Conditional generative models. This model is designed for paired image-to-image translation. The generator network learns a mapping , where is a random noise vector within the latent distribution of the model, is an input image, and is the desired target image. For this reason, the training data for pix2pix models typically require image pairs.
For the training of the models in our system, we only explicitly provide images, and do not provide images. Instead, we implement an image processing pipeline that constructs images from the images, on the fly, during training. In addition, for each of the image transformations in the pipeline, we pre-define a range, within which the parameters are randomised on every training iteration, individually for each image. A summary of this training pipeline, including a typical stack of transformations with the pre-defined ranges can be seen in Alg. 2.
The image processing pipeline can be thought of as consisting of three stages: i) training only, ii) training & inference and iii) inference only. Training in this manner, with the images generated on the fly during training, and a three stage image processing pipeline, grants our system the flexibility and power that it needs in order to behave in the way that we desire.
Data augmentation
The training only stage of the image processing pipeline consists of transformations such as scale, crop, flip, rotate, as well as brightness and contrast adjustments. Every time a image is selected for a mini-batch during training, it is processed with these transformations, with parameters randomly sampled from within the pre-defined range. This ensures that the network will never see the same images, or even the same image patches, in the exact same way more than once. This encourages the network to generalize to novel inputs, instead of just memorising the training data.
Most of the datasets that we use and present in this chapter, contain images that have a sense of an absolute up and down direction, but not necessarily an absolute left or right direction. For example, images of the ocean, or fire, etc. For this reason, we randomly flip these images horizontally, but not vertically during training. This is denoted by the permit_horizontal_flip and permit_vertical_flip options in Alg. 2. Images of deep space however, have no absolute up or right directions. For this reason, we can randomly flip those images horizontally and/or vertically, and we can also randomly rotate them by 90, 180 or 270 degrees, to further augment the dataset. This is denoted by the permit_rotate option in Alg. 2.
It is important to remember, that each of these transformations of scale, crop, flip, rotate, brightness and contrast, are applied randomly and uniquely, to every image, at every training iteration. As a result, our model is exposed to novel inputs on each and every training iteration, and is able to generalise more effectively to the real world inputs that it will receive during inference.
Input abstraction
Our models are trained on datasets consisting of thousands of images that share a desired aesthetic or content type. In our realtime inference software, when we feed these trained models images from a video feed such as a camera, or an arbitrary video file, it is very unlikely that the video feed will resemble the training data in any way. For this reason, we apply filters to the images before they go into the Neural Network, both during training and during inference. We do this in order to abstract the input images to a degree, such that they will always share some kind of basic, abstract, aesthetic. In other words, at the end of this filtering stage, any images that are input to the models during inference, will always resemble the aesthetics of the filtered training inputs, to some degree.
The primary filters that we have tested and used for this purpose, include low-pass filters, median and edge detection (canny). Many of the examples that we present in this chapter use a low-pass filter, as we have found through many experiments, this provided the most useful and flexible results. More specifically, we downscale the input image 24x, and then upscale it to the original resolution. This acts as a heavy but cheap-to-compute blur. We settle on the value of 24x, after training hundreds of models, on various different datasets, trying out many values in the range 2x to 64x. We found 24x to provide a subjectively preferable balance, whereby an image input for inference can be abstracted to the extent such that the trained model can produce convincing output images, while the details of the input image are still preserved to some degree. We also desaturate the input image.
Using these particular filters on the Neural Network inputs effectively trains the model to unblur and colourize a very blurry, abstract, greyscale blobby image. The Neural Network learns to do this, and constructs a new image with the aesthetic qualities and details of the training data, and with the overall shape, structure and composition of the inference input. In other words, during inference, the video feed is first desaturated and blurred by the image processing pipeline, and then unblurred and colourized by the Neural Network. This can be seen quite clearly in Figures 5.8 and 5.9. Fig. 5.8 shows examples of the training data — both in its original form, and the processed versions generated on the fly during training. The model tries to learn to predict the first column from the middle column, and produces the results in the third column.
It is worth mentioning, that the image processing pipeline that we describe above, is what we use for most of the examples presented in this chapter. However, for the subsection 5.4.1: Augmented drawing examples, we instead use canny edge detection. In the original pix2pix (Isola et al., 2016), the authors demonstrate a similar image-to-image translation example whereby they translate outline drawings of handbags, to photographs of handbags. For this they use Holistically-Nested Edge Detection (HED) (Xie & Tu, 2017) to produce outline drawings of handbags. The internet famous edges2cats (Hesse, 2017) also uses HED to produce outline drawings of cats. We found that HED did in fact sometimes give subjectively preferable results over canny. However, this came at a very significant speed-performance cost. In other words, when using HED instead of canny, the framerate of our realtime inference software fell drastically, compromising the realtime, expressive nature of the interaction. Furthermore, we found that using canny, paired with the ability to adjust its parameters in realtime, and within an image processing pipeline consisting of other simple filters such as median, blur, gamma etc., provided infinitely more control over the output, without compromising speed or quality. We will discuss these in much more detail in subsection 5.4.3: Live parameter manipulation.
Live parameter manipulation during inference
The ability to manipulate the parameters of the image processing pipeline in realtime, is one of the most powerful aspects of our system. We discuss this in depth with many examples in subsection 5.4.3: Live parameter manipulation.


5.3.3 Inference
For this work, we have considerably built upon the realtime video processing software that we presented in the previous chapter chapter 4: Hello World: Realtime interactive training as an informative and performative tool. Even though this software is still capable of training in realtime, as we mentioned in the introduction of this chapter, for the purposes of this particular research, we have disabled realtime learning. For this reason, we think of this software now as a realtime inference software. In this application, we have implemented many features that vastly streamline our research. Some of these relate to graphics and screen layout options. We also have the ability to select between different input video feeds at runtime. Our software supports USB cameras, network IP cameras, video files, or folders of images. We also have the ability to load and switch between trained models at runtime. Our software can process the input video feed through a single model, and cycle through multiple models via a keyboard input, or automatically on a timer. Alternatively, the software can process the same input video feed through multiple models simultaneously, and display the results side by side (Fig. 5.5), or in a grid (Fig. 5.9). However, as these particular options do not directly relate to the focus of this thesis, we will not dwell on them in any more detail.
5.4 Experiments and results
5.4.1 Augmented drawing
Videos demonstrating augmented drawing were among the first of our Learning to see outputs that we shared publicly on social media. Figures 5.10 and 5.11 show examples from 2017 and 2018 respectively, with more examples in Fig. 5.3. We also shared the source code for this version of our training and realtime inference software on the code sharing platform githubFootnote 9.


In this mode of interaction, a user draws simple lines on a piece of paper, and an appropriately trained model will ‘colour in-between' the lines, or re-interpret them, with the aesthetic qualities and details of the dataset that the model was trained on. In this respect, it is similar to some of the examples presented in the original pix2pix research (Isola et al., 2016), for example edges-to-handbags, and the internet famous edges2cats (Hesse, 2017).
Our main point of focus however, is to integrate such a model, with a live camera feed. Most importantly, we prioritize instantaneously realtime, and continuous interaction. This provides immediately noticeable advantages compared to a screen-based and turn-based drawing interface such as the one provided in edges2cats. In a turn-based drawing interface, the user first makes a drawing, then they submit the drawing for processing, and then they can see the results after a second or so delay. After seeing these results, they can continue drawing to repeat this cycle. However, we believe that instantaneously realtime, and continuous interaction is essential to maximize expressivity, and we design our system with that in mind. In other words, every little action that a user makes, is instantly and continuously processed, and the results are displayed instantly and continuously.
It is possible of course, to implement instantaneously realtime and continuous interaction within a screen-based drawing interface. This would indeed improve the expressivity of the interaction. However, a live camera feed input provides additional benefits such as independence from the screen, greater analogue control, and potentially increased accessibility for people who have strong skills with pens and paper, but not computers.
Shortly after we shared our videos and code, artist and roboticist Patrick Tresset started experimenting with a similar system that he developed, quoting our work as inspiration. Tresset trained models on thousands of drawings that he had been collecting over the years, made by robots that he had built. In the videos that he produced Footnote 10 Footnote 11 Footnote 12 , it is particularly interesting to see Tresset layer many thin lines, continuously drawing over them, gradually thickening them, while he observes how his model responds to his actions, and he reacts accordingly. At times, he covers parts of his drawing with his hand, or a blank piece of paper, in order to observe how that section of his drawing influences the way that the model produces its results. In his video, Tresset explains “I found the results interesting as a way to to explore how the model works... Sketching with it is a fascinating process. It is a very good way to explore and try to understand the model. It gives ideas on how to curate/compose the dataset”. Stills from these videos can be seen in Fig. 5.12.

In 2019, the American artist and human anatomy expert Scott Eaton, further distilled this process, with models that he trained on thousands of photographs that he had taken of the human form over the years. In the videos that he has shared onlineFootnote 13, Eaton demonstrates remarkable results with regards to how his models have learnt to light and shade the shapes that they generate. Eaton sketches simple lines and curves on a piece of paper, and his system colours in the lines with human flesh-like textures, complete with lighting, shading and shadows. Eaton then further experiments with drawing additional lines to create creases, ledges, overhangs, indents and outdents, observing how his actions are impacting the lighting and shading of the models' output. Stills from some of Eaton's videos can be seen in Fig. 5.13. Notably, the last row of images, show Eaton experimenting with crumpling and twisting the piece of paper in front of the camera, and observing the results. This provides a nice transition to the next section, in which we will discuss the mode of interaction that we call subsection 5.4.2: Digital puppetry.

5.4.2 Digital puppetry
The mode of interaction that we call digital puppetry, is simply the act of manipulating objects, hands or other body parts, and even ones own face, in front of a camera. In this mode of interaction, the images are quite literally performed with the body.
Videos
We created and shared a number of videos online, to demonstrate the potential of such an approach. Frames from two of our more popular examples Gloomy Sunday (2017) and We are all made of star dust #2 (2017) can be seen in Figures 5.14 and 5.15. For the first video, we use a normal webcam as live video input. For the second video however, we use a USB microscope. We discuss the significance of this in section 5.5: Conclusion.
Interactive installation
In addition to sharing the videos online, we also designed an interactive installation which has been exhibited around the world, allowing the public to interact with the system. Photographs of the installation can be seen in Figures 5.16 to 5.20
In the installation, we replicate the setting of the Gloomy Sunday video. We provide a large surface, covered in a number of every day objects such as broken cables and pieces of cloth. Users can play with these objects, and observe the output of the system — along with the overhead camera feed — on a large projection in front of them. The installation uses the models that we discussed previously: Waves, Fire, Clouds, Flowers and Deep space, and automatically cycles between them every 30 seconds.
The selection of the objects that we provide for the users to interact with, is very deliberate (Fig. 5.16). We found that providing one dark coloured cloth and one light coloured cloth, allows a user a wide range of opportunities with respect to what they can create. The cloths can be spread out to cover the entire surface, or they can be crumpled up into small lumps, or they can be twisted and bent into thin and long strips. Furthermore, providing both dark and light coloured cloths, grants a user the flexibility to control the dark and light regions of the image that they are creating. These are essential cues for the Neural Network, when it is constructing the output image. Just these two objects, can be combined in infinitely different ways. And most crucially, in ways that have the potential to be visibly radically unique, and thus can be interpreted by our system in radically different ways.
The cables provide additional opportunities to sculpt fine detail. Again we provide a mixture of dark cables and light cables. This allows the user to add details that either lighten or darken the underlying area. We also provide a mixture of thick cables — such as ethernet cables — and thin cables such as headphones. We cut off one end of each cable, as we found that sometimes having a large shape at the end of the cable is useful, while other times it is not. For example, in Fig. 5.17, we use the white headphone earpiece to stand in as the lighter coloured central area of a flower, while the underlying cloth becomes the petals. And in Fig. 5.18, we use the black headphone earpieces to stand in as the darker coloured central areas of the flowers.








5.4.3 Live parameter manipulation
In addition to performing some kind of movement in front of a camera — whether it be with hands, body, objects, drawing or any other means — one of the most powerful ways of interacting with our system, that allows us to really finesse the output, is by manipulating a set of human-understandable parameters in realtime.
In the previous two modes of interaction subsection 5.4.1: Augmented drawing and subsection 5.4.2: Digital puppetry, the control exerted by a user, comes from what is placed directly in the video feed. This provides the overall shape and structure of the image that will be generated by our software. Through live parameter manipulation, we allow a user more fine control, over how that particular shape and structure will be interpreted by the system.
In this context, by human-understandable parameters we are referring to parameters which a non-specialist person, unaware of the internal workings of a system, can quickly see and understand the effects of. This can be contrasted with parameters that influence a large number of variables, in a very non-linear, complex fashion. Often such parameters are very difficult, if not impossible, to describe in a simple language, or be understood by people who are not familiar with the inner workings of the system. For an interactive system to provide meaningful human control, any parameters that are available for a user to play with, must be human-understandable.
To give an example, imagine that due to some configuration of inputs, a generative system such as ours, produces an image of a nebula. It is very natural for a human user to want to meaningfully modify the image in certain ways. For example, they might want to make the nebula larger, or make it stretch out more, or make it more dense, or less dense, or make the shape of it more irregular, or smoother etc. If we apply transformations to the final image, they will affect all of the details as well. However, we wish to apply these transformations to the structure of the image, not the detail. Furthermore, the transformations that we wish to apply, are not necessarily simple geometric transformations such as scale, but might be the density of a nebula, or the intensity of a flame. The software that we have developed is not specific to nebula, or waves, or fire etc per se, but it provides exactly these types of controls, that can act not only on images, but on live video feeds.
With the method that we describe in the subsection 5.3.2: Training section, we train our models to effectively construct detailed output images, from abstract, blurry, blobby, greyscale input images. The image processing pipeline that we implement in our realtime inference software, processes the live video feed into such abstract, blurry, greyscale images. This is what allows our system to translate images of cables and cloth, into images of flowers, waves or nebula. We discuss how this works in more detail in the subsection 5.3.2: Input abstraction section.
The true power of our system however, comes from the fact that we can manipulate the parameters of this image processing pipeline in realtime. This allows us to control the way in which this abstraction takes place. The filters that we use in the pipeline are relatively simple filters, such as blur, median, canny edge detection, adaptive threshold etc. This means that they have a negligible overhead with regards to performance, and we can stack a large number of these filters, without comprising the framerate of the system.
Furthermore, while we have not conducted user surveys with regards to this, we hypothesize that users would be able to build an understanding of the effects of these parameters relatively quickly. This is especially reinforced by the fact that the system runs in realtime, and provides instant and continuous interaction. This allows users to play with the parameters, and without necessarily having any knowledge of the operations a median or canny filter actually performs, they can observe the results of their interactions instantly.
On the next four pages, Figures 5.23 to 5.26 show a selection of outputs from the Waves, Fire, Clouds and Deep space models respectively. Every one of these outputs was generated from the same input video frame, which can be seen in Fig. 5.22. In other words, the variation in the outputs in this section is not due to a variation in the input video feed. It is due to the realtime manipulation of the image processing pipeline parameters via the GUI.
We have frozen the video feed, so that the same image is processed and fed into the models in every example. This allows us to more accurately evaluate the effects of each parameter. Alternatively, if the video feed itself was also updating dynamically, it would be difficult for us to isolate the impact of changing the parameter values. Under normal circumstances, since the software runs at interactive rates (15-60fps depending on hardware), we can manipulate each of these parameters in realtime, while the video feed is updating. We can do this either via the GUI, or using an input device such as a midi controller, to allow a more performative interaction.
On these first Figures 5.23 to 5.26, we have collated a large selection of outputs from each model into a single image to aid side-by-side visual comparison. In the following pages, we show in more detail, how outputs such as these can be shaped via the parameters. In the captions below, parameter(s) which are modified from the previous screenshot, are indicated in bold.





Gamma
As we increase gamma in Figures 5.27 to 5.29, the processed video feed capture_proc becomes darker. This results in the output images becoming darker as well. However, the darkening of the output, is visually very different from a simple post-processing effect. The content of the output is constructed by the Neural Networks in a manner that ensures the images are darker, while still maintaining the qualities of the training data. For example, the waves have less foam, fire becomes less intense, clouds become thinner, the nebula becomes sparser.



Invert
When we enable invert, the output images are constructed such that the light and dark areas are swapped. However, the details of the output images are not inverted, only the structure is. For example, what was previously foam becomes water, flames become ember, clouds become empty sky, nebulas become empty space, and vice versa (Fig. 5.30).

Median
We can use a median filter to smooth the outlines of the shapes in the processed video feed. This results in outputs that have smoother structures. Adjusting the amount of median controls the shapes of the structures in the output images. Increasing the amount, results in smoother structures. Since these filters apply to the input image only, they do not compromise the level of detail and quality of the output images. Examples can be seen in Figures 5.31 to 5.33.



Adaptive threshold
In the examples in Figures 5.34 and 5.35, we use an adaptive threshold to convert the input to a binary image, emphasizing the edges.


Post vs pre-median
In the examples in Figures 5.36 and 5.37, we apply a median filter after the adaptive threshold. Since the median is applied at the end of the image processing pipeline, we call it post_median.


The median filter can also be applied at the start of the image processing pipeline. We call this pre_median. Unsurprisingly, this has a significant effect on the images generated, as can be seen in Fig. 5.38.

Canny edge detection
We can also use a canny edge detection algorithm. The end result of this is similar to the adaptive threshold that we used in the previous examples, in that it produces a binary image emphasizing the edges. However, the resulting image has much greater detail and the lines are generally thinner. In Figures 5.39 to 5.43, we show the effects of playing with the canny thresholds, and simultaneously enabling other filters.





5.5 Conclusion
In this chapter, we presented a live video feed processing system which leverages the capabilities of generative Deep Neural Networks trained on large datasets of images, while allowing users to expressively interact with the system, and meaningfully control the output in realtime.
Our system allows interaction via the video feed, either through subsection 5.4.1: Augmented drawing or subsection 5.4.2: Digital puppetry. Interaction is also possible via subsection 5.4.3: Live parameter manipulation, which is an additional, very powerful aspect of our system. Through these modes of interaction, users can play with our system, to shape, conduct, steer, and create compositions, images and videos in a realtime, expressive manner. In this respect, the method that we demonstrate in this chapter, addresses every concern that we set out to investigate in this thesis.
It is worth noting that a user of our software does not have explicit control over how objects, or sections of objects, that are presented to the camera, are interpreted by the system. In other words, it is not possible to explicitly instruct the software, that a particular input object , should be interpreted by the system as a particular output object , and another particular input object , should be interpreted by the system as a particular output object . For example, we cannot instruct the software to treat large patches of cloth as flower petals, and headphone earpieces as the central area of the flower, as we mentioned in the subsection 5.4.2: Interactive installation section. Even as the developer of the software, we do not have this level of control. This is a decision that the Neural Network makes on its own, based on everything that it has been trained on, the entirety of the video feed that is being presented to it, and the configuration of the image processing pipeline. In fact, in the case of the headphones and flowers in Fig. 5.17 and Fig. 5.18, we did not know that this would happen. We discovered it, through playing with our software. We discuss this in more detail in the final chapter section 7.3: Summary of contributions and outcomes.
Furthermore, to provide this level of granular control is not our goal. To be able to provide that level of granular instructions to the software is not necessarily very difficult. But it would require domain-specific configurations, such as semantic color maps or similar. In other words, for every dataset and model, we would need to provide some kind of metadata, mapping characteristics of input objects and image features, to output objects and images features.
Instead, our aim is to devise a versatile prototype that can automatically work with and adapt to any dataset, with no additional configuration necessary. The most important aspect that we take into consideration, is the learning curve of the user. A user can start playing with our software, with zero knowledge to begin with. As the models automatically switch between Waves, Fire, Clouds, Flowers, Deep space, and potentially any other model, users do not need to relearn anything new. All of the knowledge and experience that they gained from working with one dataset and model, can be transferred and adapted to other datasets and models.
An additional feature that allows our system to express such a wide range of outputs with relative ease, is that the system provides realtime, continuous interaction and control. This allows us to experiment, observe and learn how the system responds to our actions. This in turn allows us to respond to the system accordingly, and shape the results as we desire. In the case of the headphone-flower example that we mention above, we instantly noticed how the system was creating flowers when the headphone earpiece was positioned in the centre of a large area of cloth. We were then able to exploit this knowledge to our advantage.
Observing the general public interacting with our interactive installation, we found that some people might spend just a few seconds playing with the objects, before smiling and walking away. However, many people also spent very long periods of time, many long minutes, as they meticulously arrange their perfect bouquet of flowers; or shape their perfect wave, or nebula.
It is also worth adding, that instead of cables and cloth, we could use objects especially designed for this purpose. For example, we could use objects that physically resemble flowers, even before they are processed by the Neural Network. Or we could use specially manufactured objects that are more malleable and provide greater opportunities to be bent and shaped by the user. Undoubtedly, this has the potential to provide more realistic outcomes. However, one of our aims with this work, is to demonstrate how the most mundane and ordinary house-hold objects, such as broken cables and used pieces of cloth, can become perfect tools of creativity, given the appropriate algorithmic treatment.
We produced many videos with our system, and we shared them online. These videos were widely circulated on both mainstream and social media. They were included in academic articles and books, and even shown during Nvidia CEO Jensen Huang's keynote at GTC (GPU Technology Conference) 2019Footnote 14. These videos captured the imagination of a diverse range of people from many different fields. These include AI researchers, artists, designers, architects, cognitive scientists, neuroscientists, physicists, journalists as well as members of the general public. Having presented this work at many cross-disciplinary conferences, and through informal conversations with many individuals from these fields, it is clear that there is a general interest in this kind of work that demonstrates the potential of human-AI collaborative co-creation. In other words, in AI-augmented human creativity. And expressive, continuous, realtime, meaningful interaction is at the heart of this human-AI creative relationship.
We would like to add, that we believe our primary contribution is not necessarily the technical specifics of what we presented in this chapter. In the realtime inference software that we developed, we hard-coded a particular image processing pipeline that we feel covers a wide range of use cases, and has allowed us to shape the output in a very diverse and meaningful way. We presented many examples of these in the section 5.4: Experiments and results section. We did spend significant amounts of time, trying to design an image processing pipeline and set of ‘magic values', that produced subjectively both the nicest looking, and most diverse results. We believe we have produced what we consider to be a very powerful and flexible system.
However, we present these details, as merely a starting point, which can undoubtedly be dramatically improved upon, especially when tailored to a user's specific needs or vision. For example, while we were developing and testing our software, we would often encounter situations where we envisaged a particular output image. Or to be more precise, we envisaged particular modifications to an image generated by our system at a particular moment in time. However, these modifications were not possible with the image processing pipeline that we had implemented at that point in time. We would often realize, that the desired modifications would be possible, by for example moving the median filter before the canny filter instead of after it. Since we are authors of the software, we could quickly make the required code modifications, and achieve the desired results within a few seconds. However, undoubtedly, a more powerful software tool, could have such capabilities to add, remove and even write new filters at runtime, built into the GUI. In that respect, we do not claim that the software tool that we have created, is ready to be deployed and used by artists and designers around the world, allowing them to create and shape any image that they can imagine. For our work in this thesis, as opposed to extensively developing one single software tool we prefer to investigate many different methods and develop each method enough to demonstrate its potential to the extent that it can ideally provide a foundation for future research. We believe that this may potentially have more impact and encourage more research in this particular field of continuous, Meaningful Human Control of Deep Neural Networks for creative expression.
One additional point worth discussing, is whether it's really necessary to have such a manually designed, hand-crafted image processing pipeline in front of the Deep Neural Network. After all, a Deep Neural Network is effectively a very deep image processing pipeline. And one of the major motivations behind Deep Learning, as we discussed in section 1.2: Why Deep Learning?, was to avoid hand-crafted feature engineering. So could we omit our hand-crafted image processing pipeline, and instead learn a desired pipeline end-to-end? In other words, could we train a Deep Neural Network in such a way, that it learns these meaningful, human-understandable parameters — and potentially many more? The short answer is yes, most probably, but there are some complications involved which we discuss with regards to potential future directions in chapter 7: Conclusion.
We would like to end this chapter with some reflections on higher level motivations behind this work, and in fact, also behind the work that we will present in the following chapter.
In addition to the primary questions that we seek to address in this thesis with regards to Realtime Continuous Meaningful Human Control, we are also interested in exploring computational models of intelligence and cognition, as an analog for how humans make meaning.
As we mentioned previously, we focus our examples on five models, trained on five specific datasets that we collected during our research. These are Waves, Fire, Clouds, Flowers and Deep space.
The selection of these particular datasets and models are very deliberate, and tie into this higher level motivation. These categories, represent the five classical elements of nature: water (waves), fire, air or sky (clouds), earth (flowers) and the aether or the void (deep space). While this list varies slightly from culture to culture, many ancient civilizations have constructed a list of very similar basic elements, which they use to try and make sense of the world. These basic elements are seen as the foundational building blocks of all of reality.
In the examples that we present in this chapter, Artificial Neural Networks look out onto the world, onto objects such as broken cables or pieces of cloth, or scribbles on a piece of paper. They try to ‘make sense‘ of what they are seeing. But they can only make sense of what they are seeing, in context of what they have seen before.
They can see only through the filter of what they already know.
Just like us.
Because we too, see things not as they are, but as we are.
A Deep Neural Network is effectively a highly complex filter that can receive any input — even white noise — and transform it into an output that resembles the data that it was trained on. The Artificial Neural Network, in effect, projects its life experience, onto the inputs that it is receiving.
And this is how we make meaning. We yearn structure. We look for patterns, and we find them, and we project what we know onto them. We look at stars in the night sky, and recognize familiar shapes. So we invent stories, and we believe them. We invent rituals. We see the future in coffee cups, in tea leaves, in crystal balls, in dreams. It’s how we deal with uncertainty, and how we connect with each other. We see things not as they are, but as we are. Our perception of the world is internal to us, and depends on who we are, where we’ve been and what we’ve done. And this is not limited to ancient superstitious practices. It happens every moment of every day of our lives.
In this context, the term seeing, refers to both the low level perceptual and phenomenological experience of vision, as well as the higher level cognitive act of making meaning, and constructing what we consider to be truth. Our self affirming cognitive biases and prejudices, define what we see, and how we interact with each other as a result, fuelling our inability to see the world from each others’ point of view, driving social and political polarization. The interesting question is not only “when you and I look at the same image, do we see the same colors and shapes?”, but also “when you and I read the same article, do we see the same story and perspectives?”.
Everything that we see, or read, or hear, we try to make sense of by relating to our own past experiences, filtered by our prior beliefs and knowledge. In fact, even these sentences that I’m typing right now, I have no idea, what any of it means to you. It’s impossible for me to see the world through your eyes, think what you think, and feel what you feel, without having read everything that you’ve ever read, seen everything that you’ve ever seen, and lived everything that you’ve ever lived.
Empathy and compassion are much harder than we might realize, and that makes them all the more valuable and essential.
Furthermore, when we consider the Deep space model, and that this Neural Network has been trained on images from the Hubble Space Telescope, we might be tempted to think that this model has learnt what deep space looks like. However, that is not entirely accurate. The Hubble Space Telescope, does not provide raw snapshot photographs, as objective visual representations of deep space. Rather, it streams numbers. And then those numbers are interpreted, by us, humans, by engineers, by scientists, even by artists. We stitch together patches, composite layers, and even add colours. We don’t necessarily know exactly what distant space actually looks like, or whether it is even possible for our minds to fathom those kinds of scales, hundreds of thousands of light years in diameter. This Neural Network is not learning what deep space really looks like. It is learning what we think deep space should look like, tainted with our assumptions, our biases, our romantic visions.
Speaking of romantic visions, there is one additional motivation specifically behind the “We are made of star dust” series of works, and in using a microscope (Fig. 5.15) with this particular model. It is fascinating to remind ourselves, that the atoms in our bodies, and in fact in everything that we see around us, were forged in the dying hearts of stars and supernova, billions of years ago, billions of light years away, and spewed across the galaxies, before they came together, for a very brief moment in time, to become you and me. To quote the astrophysicist Neil deGrasse Tyson: “We are all connected. To each other, biologically. To the earth, chemically. To the rest of the universe atomically.”. And Carl Sagan: “The cosmos is within us. We are made of star-stuff. We are a way for the universe to know itself”.
Footnotes
-
See subsection 2.3.13: Hyperparameter search for a discussion on hyperparameters and hyperparameter search. ↩
-
Nvidia GTC 2019 Keynote: https://www.youtube.com/watch?v=Z2XlNfCtxwI&t=32 ↩
-
https://gizmodo.com/trippy-magic-happens-when-ai-only-knows-about-flowers-1823900244 ↩
-
https://boingboing.net/2018/03/21/watch-neural-networks-see-only.html ↩
-
https://prostheticknowledge.tumblr.com/post/172012841001/gloomy-sunday-latest-addition-to-memo-aktens ↩
-
We discuss this in more detail in subsection 2.2.7: Neural Style Transfer (2015) ↩
-
Please see subsection 2.3.18: Deep Convolutional Generative Adversarial Networks (DCGAN) for details. ↩
-
Delusions #1 https://www.youtube.com/watch?v=9n65s88sFBo ↩
-
Delusions #2 https://www.youtube.com/watch?v=mQNj6–PcBw ↩
-
Delusions #3 https://www.youtube.com/watch?v=ojk9KAbqt1E ↩
-
Nvidia GTC 2019 Keynote: https://www.youtube.com/watch?v=Z2XlNfCtxwI&t=32 ↩