loading...
Cover image for My Foray into Machine Learning with Style Transfer and Spell

My Foray into Machine Learning with Style Transfer and Spell

nprimak profile image Nadya Primak Updated on ・3 min read

Machine learning and artificial intelligence have been on my radar for years now, but more as a concept and "thing I should know about" rather than something I felt I had the free time or the skills to truly dig into. However, my attitude about machine learning has changed in the past few months as I have seen new and easier tools become accessible to the public.

One such tool is called Spell (https://www.spell.run/). Last week I spent days trying to set up Tensorflow on my laptop with the correct dependencies to run a Style Transfer algorithm (see http://genekogan.com/works/style-transfer/ for some examples). As someone who thought they would grow up to be an artist, learning how to transfer the art style of an artist I admire to my photography seemed like one of the coolest things I could possibly do. However after traversing several levels of dependency hell and realizing that my machine could take days or weeks to train on a single artwork, I decided to outsource the tedium and frustration of dependency management as well as the expense/speed of the GPU to Spell.

What's great about Spell is it is absolutely free to sign up, and when you run commands they run remotely on Spell's many CPU's and GPU's so you don't have to keep your machine on for days at a time. They do charge you when you use their GPU's, but the prices are very reasonable, and you are only charged for the time that the GPU was actually training your model (the one I paid for was $0.90 per hour, and training the model took 8 hours). They have good documentation and a very user friendly design, just to sweeten the deal.

Spell also had wonderful tutorials, one which actually included the Style Transfer training that I had been trying to execute. See it for yourself here: https://learn.spell.run/transferring_style

After some debate I decided to train my model on one of Edvard Munch's paintings (No not "The Scream"). I wasn't as happy with it as I hoped to be, because I did not adjust any of the parameters for color and abstraction which are offered when you train the model. Still, it was an exciting moment when I finally got the style transfer to work, and I am even more excited to keep experimenting with it.

If you are interested in experimenting with AI and Machine Learning yourself, I highly recommend trying out Spell.

Below is the selfie I used for the style transfer, as well as the Munch painting and the final image (which is also the cover image, surprise :D) .

Photo I applied the style to

Edvard Munch painting that AI was trained on

Final result

If you enjoyed this article, consider following me on Twitter @nadyaprimak or if you need more tips on breaking into the tech industry, you can read my book Foot in the Door in paperback or Kindle now.

Posted on by:

nprimak profile

Nadya Primak

@nprimak

I am a full stack developer by day, experimental game developer and indie hacker by night. Blogging at www.nadyaprimak.com/blog

Discussion

markdown guide