All Projects → chaiyujin → Glow Pytorch

chaiyujin / Glow Pytorch

Licence: mit
pytorch implementation of openai paper "Glow: Generative Flow with Invertible 1×1 Convolutions"

Programming Languages

python
139335 projects - #7 most used programming language
flow
126 projects

Projects that are alternatives of or similar to Glow Pytorch

pollinations
Generate Art
Stars: ✭ 100 (-74.42%)
Mutual labels:  generative
midio
midio will work really hard to generate you endlessly interesting audio on the fly.
Stars: ✭ 21 (-94.63%)
Mutual labels:  generative
idealingua-v1
IdeaLingua RPC for Scala, TypeScript, C#, Go
Stars: ✭ 13 (-96.68%)
Mutual labels:  generative
corruption-loops
Digitally disintegrating music
Stars: ✭ 37 (-90.54%)
Mutual labels:  generative
samila
Generative Art Generator
Stars: ✭ 750 (+91.82%)
Mutual labels:  generative
OpenDialog
An Open-Source Package for Chinese Open-domain Conversational Chatbot (中文闲聊对话系统,一键部署微信闲聊机器人)
Stars: ✭ 94 (-75.96%)
Mutual labels:  generative
book-mdpc
Il cinema tra le righe... di codice!
Stars: ✭ 59 (-84.91%)
Mutual labels:  generative
Spriteworld
Spriteworld: a flexible, configurable python-based reinforcement learning environment
Stars: ✭ 337 (-13.81%)
Mutual labels:  generative
ws-ldn-10
Generative design workshop (Clojure/ClojureScript)
Stars: ✭ 26 (-93.35%)
Mutual labels:  generative
desert
A fast (?) random sampling drawing library
Stars: ✭ 61 (-84.4%)
Mutual labels:  generative
SuperformulaSVG
2D superformula line-art generator built in Processing, with SVG export for use in digital fabrication workflows.
Stars: ✭ 40 (-89.77%)
Mutual labels:  generative
elm-generative
Making generative art in Elm
Stars: ✭ 23 (-94.12%)
Mutual labels:  generative
anton
anton is an open-source generative design framework built on Blender, the open-source 3D creation suite.
Stars: ✭ 82 (-79.03%)
Mutual labels:  generative
GenerativeArtists
No description or website provided.
Stars: ✭ 22 (-94.37%)
Mutual labels:  generative
Sand Spline
generative algorithm
Stars: ✭ 261 (-33.25%)
Mutual labels:  generative
Processing-Posters
A collection of generative posters I designed with p5.js
Stars: ✭ 96 (-75.45%)
Mutual labels:  generative
sqair
Implementation of Sequential Attend, Infer, Repeat (SQAIR)
Stars: ✭ 96 (-75.45%)
Mutual labels:  generative
Three.terrain
A procedural terrain generation engine for use with the Three.js 3D graphics library for the web.
Stars: ✭ 353 (-9.72%)
Mutual labels:  generative
Generativeart
Generative Art in Go
Stars: ✭ 313 (-19.95%)
Mutual labels:  generative
glitch-image
🖼 Generate and save unique glitchy images
Stars: ✭ 46 (-88.24%)
Mutual labels:  generative

Glow

This is pytorch implementation of paper "Glow: Generative Flow with Invertible 1x1 Convolutions". Most modules are adapted from the offical TensorFlow version openai/glow.

TODO

  • [x] Glow model. The model is coded as described in original paper, some functions are adapted from offical TF version. Most modules are tested.
  • [x] Trainer, builder and hparams loaded from json.
  • [x] Infer after training
  • [ ] Test LU_decomposed 1x1 conv2d

Scripts

  • Train a model with
    train.py <hparams> <dataset> <dataset_root>
    
  • Generate z_delta and manipulate attributes with
    infer_celeba.py <hparams> <dataset_root> <z_dir>
    

Training result

Currently, I trained model for 45,000 batches with hparams/celeba.json using CelebA dataset. In short, I trained with follwing parameters

HParam Value
image_shape (64, 64, 3)
hidden_channels 512
K 32
L 3
flow_permutation invertible 1x1 conv
flow_coupling affine
batch_size 12 on each GPU, with 4 GPUs
learn_top false
y_condition false
  • Download pre-trained model from Dropbox

Reconstruction

Following are some samples at training phase. Row 1: reconstructed, Row 2: original.

Manipulate attribute

Use the method decribed in paper to calculate z_pos and z_neg for a given attribute. And z_delta = z_pos - z_neg is the direction to manipulate the original image.

  • manipulate Smiling (from negative to positive):

  • manipulate Young (from negative to positive):

  • manipulate Pale_Skin (from negative to positive):

  • manipulate Male (from negative to positive):

Issues

There might be some errors in my codes. Please help me to figure out.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].