explaingit

tachibanayoshino/animegan

4,601PythonAudience · developerComplexity · 3/5LicenseSetup · hard

TLDR

A TensorFlow project that converts real photos and videos into anime-style images using a generative adversarial network, producing output in the visual style of Hayao Miyazaki films.

Mindmap

mindmap
  root((repo))
    What it does
      Photo to anime style
      Video animation
    Input types
      Still photos
      Video files
    Versions
      AnimeGAN original
      AnimeGANv2
      AnimeGANv3
    Tech stack
      Python
      TensorFlow
      NVIDIA GPU
    Usage
      Pretrained model
      Custom retraining
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Convert a landscape photo into an anime-style image using the pretrained model from the command line

USE CASE 2

Process a video file frame by frame to produce an anime-style animated clip

USE CASE 3

Retrain the model on portrait photos to get better results on people rather than landscapes

USE CASE 4

Try photo-to-anime conversion in a browser using the community-contributed web version without installing anything

Tech stack

PythonTensorFlow

Getting it running

Difficulty · hard Time to first run · 1h+

Requires Python 3.7 with TensorFlow 1.15 and a compatible NVIDIA GPU, modern TensorFlow versions are not supported.

Free for academic and non-commercial use only, commercial use requires contacting the authors for an authorization letter.

In plain English

AnimeGAN is a Python project that converts ordinary real-world photos into anime-style images using an AI technique called a generative adversarial network. You give it a photograph, and it outputs a version of that image that looks like it was drawn in the visual style of Japanese animated films, particularly the style associated with director Hayao Miyazaki. It can also process video files frame by frame to produce animated anime-style clips. The project is a TensorFlow implementation based on an academic paper titled "AnimeGAN: a novel lightweight GAN for photo animation." The network was trained on landscape photographs paired with frames extracted from anime films. The README notes that the original training set consists mostly of landscape photos, so users who want better results with portraits of people are advised to add at least 3,000 people photos to the training set and retrain the model themselves. Using the pretrained model is straightforward from the command line: one script handles still images and another handles video files. Training your own model involves downloading a base neural network, downloading the provided dataset, running a smoothing step on the training images, then running the training script. Pretrained weights are available as downloads from the repository's releases page. Two improved follow-up versions exist in separate repositories: AnimeGANv2, which reduces image artifacts and uses higher-quality style data from Blu-ray film sources, and AnimeGANv3. A community-contributed browser-based version also exists, letting users try photo animation without installing any software. The code is free for academic and non-commercial use. Commercial use requires contacting the authors for an authorization letter. It runs on Python 3.7 with TensorFlow 1.15 and a compatible NVIDIA GPU.

Copy-paste prompts

Prompt 1
I want to convert a photo to anime style using tachibanayoshino/animegan. Show me the exact command to run the pretrained model on a single image file.
Prompt 2
Using AnimeGAN from tachibanayoshino/animegan, walk me through processing a short video clip so I get an anime-style version as output.
Prompt 3
I want to retrain AnimeGAN on portrait photos so it works better on people. Walk me through the steps from dataset prep to running the training script.
Prompt 4
Help me set up tachibanayoshino/animegan on a machine with an NVIDIA GPU, what Python version, TensorFlow version, and CUDA version do I need?
Open on GitHub → Explain another repo

← tachibanayoshino on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.