Home | Blog | GitHub | Twitter | RSS

Generating Deal-with-it GIFs with deep learning compiled to WebAssembly

Date: 07/2018
URL: https://tkv.io/posts/dealer-webapp

The prototype of our Deal-wit-it meme generator is now live at https://demos.tkv.io/dealer/. You can use it to produce such GIFs:

deal with it!

Give it a try, it should be fun. This is especially true if you are accessing the webapp with your smartphone as you can experiment with selfies.

Note that the applications is still just a prototype and thus you should expect occasional glitches.

Additional information

The Know your Meme website, the authoritative source on these matters, defines the Deal-with-it meme as "an expression used as a retort in response to someone's disapproval that is often associated with image macros and animated GIFs in which the subject wears a pair of sunglasses."

The https://demos.tkv.io/dealer/ web application automatically finds human faces in the provided input image and places Thug Life sunglasses in the correct position and scale on each frontal face.

Building the application took around 1.5 months of casual programming, done after work and over the weekends.

Technology

The core of the application is an accurate fully convolutional neural network compiled to WebAssembly. The basic idea is to segment a line from one eye corner to the other for each face in the image. Next, the program works out the positions and scales of the Thug Life glasses based on this segmentation mask. In the previous blog post we described a similar aproach, so the interested reader can find more information there. For now, we do not plan to release the code for running the neural network since it needs quite some polishing.

The application also relies on these third-party libraries:


Home | Blog | GitHub | Twitter | RSS