Generating social media cover pictures from my followers’ ones
I wanted to change my social media channels cover pictures, so instead of thinking what to put there, I delegated this task into a neural network, feeding it with all the cover pictures of my followers.
Neural networks are hungry, you need to feed them
First I needed to extract thousands of cover pictures, so I wrote a script using Python and the Tweepy library to scrape all the cover pictures of my Twitter followers + my Facebook friends. Here is an screenshot of the script doing its work:
And the result below is going to be the input of the neural network, as we see, there are some pictures about landscapes, text, people, random objects, colors… a very diverse input, so it shouldn’t be easy for an AI to create a meaningful output, but let’s see!
How the neural network learns
I have chosen a GAN, cause this type of neural networks are very efficient learning patterns with a good grade of abstraction.
GAN, Generative Adversarial Networks learn like a baby, it is like giving some colored pencils to a 1 year old baby, he will start painting random stuff, and his parents will say: “this painting is ok!” and “this is not!”.
The GAN has a generator (the baby!) that draws random pictures from random noise, and it has a discriminator (the parents) that compares the paintings from the generator with real pictures, after some iterations, the “baby-generator” will learn how to create new meaningful paintings.
Neural network trying to imitate text
In the outputs we can find that, surprisingly, the neural newtork has detected the text patterns in some of the covers of my followers, cause it is trying to imitate some kind of messages in a language I don’t understand. Maybe it is trying to tell us something? :-)
Top 3 Most Popular Ai Articles:
If we return to the screenshot of the inputs images below, we see that people like to have a landscape as their cover picture:
That’s why the neural network has become a very decent landscape painter, it draws better than me, it is awesome how well is the light represented in some of these mountains and sunsets images.
I bet you that if you put any of these images in a modern art gallery, visitors would like them, and even buy some of them. These paints are so abstract because between texts and landscapes there are a lot of different contents being used in cover pictures, that’s why the neural network is getting a certain level of randomness, and “creativity”:
This is art. But, who is the owner?
It is crazy how a neural network by analyzing only a few thousands of cover pictures, has learn to create this meaningful and beautiful patterns.
This is art! But who is the artist? The one that put all the pieces together? The followers that fed the neural network? The neural network designer? The author of the first paper speaking about GANs?
We are now speaking about images, but also it is perfectly possible to teach a neural network to be a creative architect, or music composer, etc.
What is going to happen with art in the future?
In the very near future, we are going to have art exhibitions made by machines, and machines usually are better than us detecting if something has liked us or not. Also they are better generating new artworks from the things we liked, cause we are in the era in which art is being transferred to the machines. Enjoy it!