Cartoonize yourself using Python and AI
I Spent 10 hours studying the Cartooning Toonify library, here are my insights and learning in a super simple format in a 5-minute read.
Have you ever wondered what would you look like as a Disney Character? Let’s find out!

Artificial Intelligence (AI) has been able to do a lot of things lately, This field is developing at a rapid pace. It is able to detect objects in images and videos, detect actions, summarize articles, write articles and lately generate images and videos.

But can it fulfill your dream of what you would look like in a Disney movie? Can it convert your images to a Disney princess or a prince? Let’s Find Out!
We will be using the magic of GANs, using a model called VToonify (which can cartoonize videos as well).
Note: Even if you don’t understand GANs or are a beginner in Python, You can still Play around with code very easily.
The repository link is https://github.com/williamyang1991/VToonify.

Let’s use the open in Colab button to run the model in Colab. After clicking the button you should see something like this. A notebook called inference_playground.ipynb should open in colab.
Run the first cell which installs gradio and huggingface_hub library. This

Run the second and third cell which setup CUDA and clone the Vtoonify library from github. The fourth cell will cd into the ‘DEMO_DIR’ where the repository is cloned.

The next cell imports gradio and model from vtoonify_model. It also sets limits for GPU and CPU. Running this cell will setup gradio and show one example

Run the next two cells and you should see something like this. This is the Gradio UI inside the colab notebook.

This is the gradio UI with the model loaded. You can upload videos and images and play around with the model. Select the model and upload the image you want to cartoonize.

You should see something like this when the model outputs. This is the result of the image and model we used as an example.

The Vtoonify model has multiple models which support comics and illustrations. You can select it when loading the model.

Here are some other outputs of the model with parameter tuning. You can tune the parameters and try it yourself.

If you do not want the trouble of running the google colab notebook, you can run the model directly using the following link https://huggingface.co/spaces/PKUWilliamYang/VToonify It will look something like this.(NO Code Involved)

So here you have it an AI model to cartoonize your images.

Are you passionate about artificial intelligence and machine learning? Do you want to stay up-to-date on the latest advancements and insights in the field?
Then subscribing to Medium is a must. For just $5 a month, you’ll have access to a wealth of knowledge and insights from experts in the field.
Plus, your subscription helps support independent writers and researchers like myself. And with the rapid pace of change in the world of AI, staying informed is crucial. Don’t miss out — join Medium today and become a part of the AI revolution. It’s the best decision you’ll ever make. Subscribe to Medium today using this link.