• Stars
    star
    318
  • Rank 131,872 (Top 3 %)
  • Language
    Python
  • License
    MIT License
  • Created over 8 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

plat (v): plan out or make a map of

Utilities for exploring generative latent spaces as described in the Sampling Generative Networks paper.

Quickstart

Install this library, code supporting a model type, and go.

$ pip install plat
$ plat sample
Saving image file plat_20180401_NoModel_01.png

output image

Sampling Examples

By default, plat does a random sampling. The output file will be automatically generated, or can be given explicitly. To make the results repeatable, you can also specify a random seed.

$ plat sample \
  --seed 1 \
  --outfile examples/random_sample.jpg

output image

The number of rows and columns can be specified. Interpolation is done by specifying the spacing between samples.

$ plat sample \
  --seed 1 \
  --rows 1 --cols 7 \
  --spacing 6 \
  --outfile examples/random_interpolation.jpg

output image

Interpolation can be done across multiple points in two dimensions to create a mine grid (details in paper).

$ plat sample \
  --seed 1 \
  --rows 4 --cols 7 \
  --spacing 3 \
  --outfile examples/random_mine_grid.jpg

output image

There are many more options to explore. When experimenting, it can be useful to use a templated output filename.

$ plat sample \
  --seed 17 \
  --tight \
  --rows 3 --cols 7 \
  --spacing 2 \
  --outfile examples/%DATE%_experiment_s%SEED%_%SEQ%.jpg

output image

Model types

plat comes with access to a growing list of models and model types in its model zoo. Each model type will have separate dependencies.

It's also possible to run plat on new types of models by providing a simple plat interface. There are a few examples and a template to get started. Here's an example of how to use plat sample with a manually specified model interface to generate a (random) mine grid from an iGAN model:

PYTHONPATH=. plat sample \
  --model-interface plat.interface.igan.IganModel \
  --model-file models/shoes_64.dcgan_theano \
  --uniform \
  --rows 4 --cols 10 \
  --tight --spacing 3 \
  --image-size 64 \
  --seed 1

output image

More Repositories

1

pixray

neural image generation
Python
402
star
2

strokes

Let's pretend d3 was written in ClojureScript.
JavaScript
379
star
3

clipit

CLIP + VQGAN / PixelDraw
Python
282
star
4

mrhyde

clojurescript ))<= interop =>(( javascript
JavaScript
61
star
5

perceptionengines

Perception Engines
Python
54
star
6

portrain-gan

torch code to decode (and almost encode) latents from art-DCGAN's Portrait GAN
Python
40
star
7

kerosene

Clean Burning Fuel
Python
29
star
8

lfw_fuel

Labeled Faces in the Wild dataset, converted to fuel
Python
28
star
9

acute

Let's pretend angular was written in ClojureScript
JavaScript
28
star
10

blade

let's pretend leaflet was written in cljs
JavaScript
14
star
11

acu

ACU Toolkit (partial history)
C
14
star
12

dbn

Design By Numbers (archives from acg)
Java
12
star
13

mantel

p5 restoration of Manolo's Mantel generator
JavaScript
7
star
14

ArrayLike.js

specification and polyfill for allowing any JavaScript object to function as an array
JavaScript
7
star
15

dopes

drawing on perception engine systems
Python
6
star
16

strokes-examples

example clojurescript projects for using the strokes library
JavaScript
5
star
17

dbn101

Design By Numbers 1.0.1 (First runnable version of DBN)
Java
4
star
18

sumdroppings

attemps at summingbird examples
Scala
4
star
19

dribbot

Examples of using tweepy to perform various bot actions
Python
3
star
20

victory

A design landscape inspired by Mondrian
JavaScript
2
star
21

gobpixray

gob site for pixray
JavaScript
2
star
22

imagespawn

Clojure
2
star
23

defmain

simple clojure executables, stolen from from cascalog.core
Clojure
2
star
24

substrate

Substrate by Jared Tarbell (2003)
JavaScript
1
star
25

nnp

Python
1
star
26

js-literal

#js tagged literal for compile time javascript data structures
Clojure
1
star