How to Run stargan2 on Google Colab

0xkoji

0xkoji

Posted on July 20, 2021

How to Run stargan2 on Google Colab

example

Alt Text

gist

The steps you need are very simple.

Step1. clone repo

Step2. install packages

Step3. download pre-trained model

Step4. run a script

https://colab.research.google.com/gist/koji/b02b81ef5cdf0b9a6a69cd26a8f62bf5/stargan2.ipynb

Original repo

GitHub logo eps696 / stargan2

StarGAN2 for practice

StarGAN2 for practice

Open In Colab

This version of StarGAN2 (coined as 'Post-modern Style Transfer') is intended mostly for fellow artists, who rarely look at scientific metrics, but rather need a working creative tool. At least, this is what I use nearly daily myself.
Here are few pieces, made with it: Terminal Blink, Ghosts, Occurro, etc.
Tested on Pytorch 1.4-1.8. Sequence-to-video conversions require FFMPEG. For more explicit details refer to the original implementation.

Features

  • streamlined workflow, focused on practical tasks
  • cleaned up and simplified code for better readability
  • stricter memory management to fit bigger batches on consumer GPUs
  • models mixing (SWA) for better stability

Presumed file structure

stargan2 root
├  _in input data for processing
├  _out generation output (sequences & videos)
├  data datasets for training
│  └  afhq [example] some dataset
│     ├  cats [example] images for training
│     │  └  test [example] images for validation
💖 💪 🙅 🚩
0xkoji
0xkoji

Posted on July 20, 2021

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related