It’s the weekend and time for more machine learning fun!
This time, we’re going to do some celebrity style transfer – neural style transfer is a machine learning technique for recomposing images in the style of other images.
Take a reference style image, such as an artwork by a famous painter. Then find a suitable content photograph that we will transfer the style onto using some deep learning magic – it’s that simple.
So, we are going to need some celebrities – it turns out I’m not really up on celebrity culture. A quick trawl of IMDB tells me Jonny Depp is the world’s most famous celeb. Who else? Kim Kardashian, she’s everywhere… How about Donald Trump and, while we’re at it, Theresa May? If we’re doing the UK government, then we must include the photogenic Michael Gove. Who else? Lewis Hamilton, he’s cool… and, erm, Batman – he’s really cool!
Now for style – how about Van Gogh, Leonardo da Vinci (Mona Lisa) and someone modern… Banksy?
Great, now we’ve got that out of the way, let’s train a network. No need to reinvent the wheel – a chap called Anish Athalye from MIT has published a nice open source TensorFlow neural style transfer library which we can use.
Download a few copyright free images and after a couple of hours we have the following results…
|Van Gogh||Da Vinci||Banksy|
I really like the Banksy Batman, but the overall winner has to be Michael Gove – I said he was photogenic!
Contact us if you would like to learn more about using AI and machine learning in your business.