Style transfer with a Google Colab Notebook and cloud GPU

Photo by Kaushik Panchal on Unsplash

No fancy GPU processor? No time to leave your machine crunching for endless hours on a single machine learning task? Problems installing the endless dependencies your model requires? No problem.

Google Colab Notebooks are Jupyter Notebooks that run in the browser, using $10/month cloud GPU infrastructure from Google. This article will show you why and how to use them, implementing a style transfer example.

TLDR: Work Your Way Through This Colab Notebook.

Why Would I Use Colab?

Two reasons:

Training a style transfer model with satisfactory results might typically cost between $15-$20 on cloud GPU architecture for a single training job. …


Train a machine learning model using TensorFlow and DeepLab to perform image segmentation and separate your chosen subject from its background in any photo

Image Source

Summary

This tutorial covers how to set up DeepLab within TensorFlow to train your own machine learning model, with a focus on separating humans from the background of a photograph in order to perform background replacement—also known as image segmentation.


CSS for :visited links is restricted to a few select properties for security reasons. Is there a way to style these properties without introducing complex state-management to a vanilla javascript app?

Utilize HTML local storage to store visited links in an array, and apply a javascript class accordingly to give it the desired CSS

JUMP TO: Background | Stylable Properties | Alternatives | Drawbacks | Implementing Local Storage

I recently had what seemed like a very simple request on a project — given a gallery of projects, place a semi-transparent black overlay above any project the user had visited.

The…


How to create an endless loop of synthetically-generated StyleGAN landscapes with smooth transitions using RunwayML and P5.js

Image Source

An Example of What You’ll Be Making:


This article shows how to log contact form data that a user submits through your website into a Google Spreadsheet.

While a Google Spreadsheet is not the place most people would recommend you store important data — it can be a handy way for a lean organization to avoid dealing with databases, CMS, CRMs, etc…


TLDR: OpenCV’s camera doesn’t handle a mobile device’s portrait mode well by default. Grab the code below and drop it into CameraBridgeViewBase to utilize the OpenCV rear and front facing Camera in full screen portrait orientation.

Jump to:

The Issue with OpenCV’s Camera Module on Mobile

Even with all of the recent developments in Android’s ARCore, there are plenty of reasons you might need OpenCV in your mobile Augmented Reality project. …


TLDR: Download the course material for: Visual Machine Learning, Machine Learning in Writing and Speech, and Machine Learning in Audio/Music.

Goals for this course material

I recently taught a series of workshops on Machine Learning at Pacific Northwest College of the Art’s Make+Think+Code program, and thought I’d make my course materials available online, with 3 goals in mind:

  • Make the material available to a wider audience of artists looking for a code-minimal, broad overview of machine learning
  • Provide a starting point for those wishing to teach their own Machine Learning workshops (it’s a lot of work to generate all this stuff from scratch!)
  • Get feedback…


This is part 1 of my art focused Machine Learning Course. Click here to access the overview, which provides links to the other workshops in the series.

In this class we will be looking at Machine Learning as it relates to visuals: images, videos, etc. We’ll examine a few practical applications:

Image Classification

  • Allowing ML models to distinguish between one class of images and another
  • Training a model through transfer learning to understand new images through our own guidance.
  • Real-time classification of recognized objects in video using pre-trained models such as imagenet.

Image Regression

Utilizing a value-based system to interpolate…


This is part 2 of my art focused Machine Learning Course. Click here to access the overview, which provides links to the other workshops in the series.

Machine learning models within the context of language can operate quite differently than those used in Image Processing and other applications. For starters, because language follows such specific rules, when processing series of words, our ML models need to have some concept of what has come before them, what comes after them, and in what sort of context they are operating. …


This is part 3 of my art focused Machine Learning Course. Click here to access the overview, which provides links to the other workshops in the series.

In this class we’ll look at Machine Learning as it relates to Sound and Music. Many of the principles you learned in the previous classes will apply here, but manifest themselves in different ways.

We’ll look at a few concrete examples:

Pitch Detection

Using ML5, we’ll examine a user’s voice through the computer microphone and try to correctly identify musical notes. We’ll look at an example that makes a game of it, trying…

Mike Heavers

Freelance Creative Coder

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store