The second episode of our podcast, "Machine Learning made Known." Here, Ola, Andrew and Megan have a short interview with the machine learning engineer, Michael Jamroż. He talks about image generation with Deep Learning, particularly Generative Adversarial Networks.
“Radio Craftinity” – Episode 2: Image Generation
Hosts: Ola, Megan, Andrew
Andrew: Hey everyone! It’s Radio Craftinity and your beloved hosts, Megan and Ola!
Andrew: In today’s episode of our podcast, “Machine Learning Made Known’’ we present you our guest – a machine learning engineer, software developer and Craftinity’s Co-Founder: Michael Jamroż.
Michael: Yo everyone!
Ola: Okay, let’s start from the beginning. Deep learning is your main field of interest and quite a popular topic nowadays.
Michael: Deep learning undoubtedly is one of the biggest buzzwords related to artificial intelligence used contemporarily in mass-media, reporting publications, and novelties from the science field. Journalists present so many opportunities and possibilities of using deep learning that one may think that scientists finally found a way to create machines which will subjugate humanity and will rule the world, which is preposterous, obviously.
The reason for its popularity primarily is the fact that deep learning seems to work well in many areas. For instance, thanks to these methods we’ve experienced great progress in computer vision-related tasks.
Megan: Vision-related tasks, like what, for example?
Michael: There are traditional ones such as image classification, image segmentation and object detection. Progress related to these tasks made image analysis, in general, more accurate and hence more applicable in production systems.
Andrew: Besides these three aforementioned computer vision tasks, there is another one: image generation. Deep learning has made quite a large impact here, wouldn’t you say?
Michael: That’s true. Image generation - or data generation, to be more exact - is a kind of task where we require the model to generate a sample of the data, whether image or text, that is almost indistinguishable from the data which it has seen during the learning process.
Megan: Could you walk us through an example?
Michael: Sure - for instance - let’s say we’re working in the domain of images containing handwritten digits and we want our model to..
Ola: Can we work in the domain containing male supermodel photos?
Meg: Jeez, Ola.
Michael: Sure! But why don’t we leave that for the next time? I’ll try to make a "hand-written digits" example interesting enough for you.
Ola: Well let’s see what you got!
Michael: So, let’s say we’re working in the domain of images containing handwritten digits and we would like our model to learn how to generate such images. In the learning process, we feed the model with the digits and later expect that it will generate something very similar to the digits.
A well-trained model won’t generate an image containing random noise. What’s more is that we won’t get either a cat, dog, or character. Thanks to recent developments in this field, there are plenty of generative models that can generate very high quality images coming from much more difficult domains than hand-written digits-- so in that case, male supermodel photos are perfectly feasible.
Andrew: And how do you formulate your image generation task more formally? How can you ensure high quality of results?
Michael: Well, formally, we’d like to have a good probability distribution over our data; we need a function that assigns relatively high values to images from our domain and low values to other ones. Images usually contain millions of pixels and therefore are extremely high-dimensional data, so the space of all 1-million pixel images is very large.
Images of our interest (eg. hand-written digits) occupy a very small subspace of the whole image space. Hence learning a distribution that will assign a high probability to this subspace, and low elsewhere, is definitely not an easy task. Deep models become useful here, because of their big capacity and ability to represent very complex mappings.
Andrew: And how exactly does the model extract desirable results during the learning process?
Michael: There are two most popular classes of deep generative models nowadays - these using Variational Autoencoders (VAEs) and Generative Adversarial Networks (GANs) frameworks. Variational Autoencoders framework is very elegant and well mathematically described, but the analysis behind it is quite difficult to convey without referencing mathematical tools.
Luckily the second framework - GANs is more intuitive. The whole model consists of two components: generator and discriminator. During the learning process the role of the generator is to generate the data, while the discriminator tries to find the difference between these generated “fake” samples and the real examples coming from the dataset. We hope that over time the generator will generate examples that will become harder and harder to distinguish from real examples and the discriminator will improve its skills in distinguishing. As a result, the whole model will become an expert in the domain where it’s being trained.
Megan: Your example involves data generation. Are GANs useful for any other machine learning-related tasks?
Michael: Yes, they can be useful. The ability of a model to generate the data well from some domain means that a model has a general good understanding of this domain. We can leverage it to solve other tasks emerging in Supervised, Semi-Supervised and Unsupervised learning fields. Some additional, scientific work is required to adjust GANs models to deal with these tasks, but this is exactly what’s happening right now. GANs are being heavily researched and we can expect a lot of achievements here.
Ola: It sounds like there’s still a lot of work to be done.
Michael: Yeah, sure, but nothing worth our effort comes easily, right?
Megan: That’s why we work so tirelessly at Craftinity, isn’t that right Andrew?
Andrew: Sure, you’re indispensable.
Ola: And with this sincere and kind accent, we have reached the end of our episode!
Michael, thank you very much for coming here and sharing your wisdom...
Michael: Was my handwritten digit example satisfying enough for you?
Ola: Well sure, but if you have male supermodels involved with the next task, I won’t complain, you know.
Megan: And thank you, our dear listeners, for joining us here at Radio Craftinity! We hope you join us next time.
Andrew: See you!