DEV Community


🤦‍♂️ Cartoonify Yourself!

Harrison Reid
My side projects haunt my dreams.
Updated on ・1 min read

Last week I wrote up a post about how I'd trained a neural network to "cartoonify" pictures of peoples faces.

I also made it available as a twitter bot (so you could tweet at me and have your profile pic cartoonified). I think about 30 or 40 people ended up using it to cartoonify their profile pics, which was a lot of fun 😀

Anyhow, I'm planning to retire the twitter bot soon (because 💸) - but I've now converted the code to run entirely in the browser using tensorflow.js, and made it available online.

Check it out here.

Note: Currently doesn't seem to work reliably (or possibly at all) on mobile browsers - working on fixing this. Also, the cartoonifying effect tends to only work on relatively close up pictures of faces (presumably as thats what it was trained on). So feel free to play around with other kinds of images, but the results probably won't be great.*

Discussion (8)

rahuldkjain profile image
Rahul Jain

Hi Harrison, I used Cartoonify on mobile phone. I uploaded an image and it got stuck showing cartoonifying. I waited for 4 mins, still no output. Please have a look into that

sagartyagi121 profile image
harrison_codes profile image
Harrison Reid Author

Thanks for the heads up! Will look into this...

devhammed profile image
Hammed Oyedele

I was about to say this too.

pandaquests profile image
sachinjain024 profile image
Sachin Jain

Hey Harrison, I uploaded a pic and it just kinda blurred the image. Nothing else.

harrison_codes profile image
Harrison Reid Author

Hmmm interesting - was the picture you selected a portrait style image of a face? As a general rule, it seems to perform best with well lit, relatively close up portrait style images of faces (Presumably because I trained the model with faces). It generally doesn't seem to do much to other styles of image unfortunately...

herawais profile image
Muhammad Awais

Chrome Tab Crashes

Forem Open with the Forem app