Pix2Pix: Edges to Pikachu

Screen-Shot-2018-06-17-at-11-06-09-PM.png

Pix2Pix: Edges to Pikachu

It is an interactive drawing tool that automatically colors your Pikachu drawings in real time. It’s built with tensorflow.js.

See a live demo here: https://yining1023.github.io/pix2pix_tensorflowjs_lite. Code is here.

eges2pikachu demo

Here is a tutorial about how can you train your own pix2pix edges to XXX model with Tensorflow from scratch.

You can also read more about pix2pix from my Machine Learning for the Web class - week 4 (Class Slides).

How to train a pix2pix(edges2xxx) model from scratch

1. Prepare the data

1.1 Scrape images from google search

1.2 Remove the background of the images

1.3 Resize all images into 256x256 px

1.4 Detect edges of all images

1.5 Combine input images and target images

1.6 Split all combined images into two folders: `train` and `val`

2. Train the model

3. Test the model

4. Export the model

5. Port the model to tensorflow.js / ml5.js

6. Create an interactive interface in the browser