Pix2pix Post-Mortem Week 7

Paul G
Tribe Bytes
Published in
2 min readSep 22, 2019

For the past two weeks, I have been learning about machine learning. Specifically ml5 pix2pix, the pix2pix model works by training on pairs of images such as building facade labels to building facades and then attempts to generate the corresponding output image from any input image you give it. I coded a program that set up a canvas that transferred what a user draws into a unique image of Kirby (a game character). To get thousands of images quickly I downloaded a file from Google Quick Draw, which collects drawings from a game. Later I learned that the .ndjson file could not be used with Pix2pix and that our computers couldn’t transform the file into .json. This was a serious roadblock for the program. It eventually caused the project to not be completed in time, which

Without the necessary network of input images, the program couldn’t work. I realized that the computer needed thousands of possible drawings, that would be impossible for one person to make in three hours, all the time we had left. While the project failed miserably, the amount of knowledge I gained about how to use ml5’s extensive machine learning programs. I learned how to work with GitHub and console. It is easier for me to write code now because I’ve written so much. In the end, the project helped me learn about coding and Websites.

One of the coolest things I learned was how to draw on the canvas in Javascript. I’m very sure it is basic, but I figured out how to do it so it makes me feel good. Here is the code I used:

What pix2pix looks like, drawing of cat on left and picture of cat on right
What pix2pix looks like.

It was something I had wanted to know and tried to make since we started coding. Learning how to draw made this project an overall win. However, I do believe if my computer had been able to get the network without having to use an admin password to be able to do anything. If this was possible the project would have been an even greater learning experience.

In the end, the Pix2pix software is a great idea for a project if you have the ability to pull it off. I learned you need to make more of a plan to see if you can actually see it through. But like I said earlier it was an overall win because I more than tripled my knowledge about Javascript.

--

--