Skip to content

A wrapper for stylegan2 with ada. You can train a model with just six lines of code.

License

Notifications You must be signed in to change notification settings

blobfish2000/sgan

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SGAN

Easy impelementation of stylegans2. You can literally train a stylegan2 in less than 10 lines of code.

Notebooks

Name Notebook
Training
Visualization

Tranining

In just a few lines you can use style tranfer or train a stylegan from scratch.

from datasets import Dataset
from sgan import SGAN

dataset = Dataset('/path/to/dataset')
dataset.prepare('path/to/records')

model = SGAN()
model.train(data_path = 'path/to/records', out_dir = 'path/to/out')

Visualization

A set of functions for vis, interpolation and animation. Mostly tested in colab notebooks.

Load Model

from sgan import SGAN
model = SGAN(pkl_path = '/path/to/pkl')

Generate random

sgan.generate_randomly()

Generate grid

model.generate_grid()

Generate animation

model.generate_animation(size = 2, steps = 20)

Sample Models

Mosaics

alt text

Medusas

alt text

Cats

alt text

Jellfish

alt text

Celebs

alt text

References

About

A wrapper for stylegan2 with ada. You can train a model with just six lines of code.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 96.9%
  • Python 3.0%
  • Other 0.1%