Home / Tools / CartoonGAN

CartoonGAN

Test code for the CVPR 2018 photo cartoonizer

CartoonGAN preview
github.com Open Source

Upvotes

0

Pricing

Open Source

Category

Cartoon Generators

In the database since

Oct 2026

Overview

About CartoonGAN

CartoonGAN is a test code repo on GitHub for the CartoonGAN model from a 2018 CVPR paper by Chen and others. It turns ordinary photos into cartoons in the style of anime directors. The repo ships with pretrained models converted from Torch to PyTorch, so you can test it right away. You run a single Python script on a folder of images. It needs Linux, an NVIDIA GPU, and PyTorch 0.3. Two styles are included: Hayao Miyazaki and Mamoru Hosoda.

Key Features

1. Pretrained Models Included

The author converted the original Torch models to PyTorch, layer by layer. A download script fetches the weights. You test styles without training anything yourself.

2. Two Director Styles

The test command takes a style flag. Run it once for the Hayao look, again for Hosoda. Each run writes its own output files.

3. Torch Version Included

The repo keeps the original Torch test code. Its weights were changed so cuDNN is not needed. This helps users who still work with Torch.

4. Simple Command-Line Testing

Point the script at a folder and pick a style. Output lands in the test_output folder. The README shows side-by-side examples of each style.

5. Built on the CVPR 2018 Paper

Testing code for the paper's model only, no training code. The repo is a fast way to try the published CartoonGAN results yourself.

Frequently Asked Questions (FAQ)

Which style should I pick: Hayao or Hosoda?

Both are included and switch with one flag. Hayao gives the Miyazaki look, Hosoda gives the Mamoru Hosoda look. Try both on your photo and keep the one you like.

Do I need to train the model myself?

No. The repo has no training code, only testing code with pretrained weights. Download the models with the included script and run test.py on your images.

Can this cartoonize videos?

The repo is built for still images only. There is no video script here. For videos, look at AnimeGANv2 or VToonify instead.

Conclusion

CartoonGAN suits anyone curious about the 2018 paper who has a Linux box with an NVIDIA GPU. It is the simplest test route for that model, with no training to wrestle. Video makers should look at VToonify instead, and modern setups may fight the old PyTorch version. Still, for still images it remains a charming, fast experiment.

Newsletter

Tools like this change fast

New Cartoon Generators tools launch every week — the newsletter keeps you ahead of what's worth trying.

Keep exploring

Similar AI tools

Ranked by the job they do, their capabilities, and how closely they fit this workflow.