DEV Community

loading...

How to Run stargan2 on Google Colab

Koji (he/him)
Never lose curiosity Software Engineer in NYC/Research Resident@NYU-ITP18-19 Mostly I work with typescript, javascript, react, and python. code to do something weird/useless/helpful
・1 min read

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

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, 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 [TBA]
  • cleaned up and simplified code for better readability
  • stricter memory management to fit bigger batches on consumer GPUs
  • models mixing (SWA) for better stability

NB: In the meantime here's only training code and some basic inference (processing). More various methods & use cases may be added later.

Presumed file structure

stargan2 root
├  _in input data for processing
├  _out generation output (sequences & videos)
├  data datasets for

Discussion (0)