Narco pelicula, Robert Risko, Linear atrophoderma of Moulin
This commit is contained in:
parent
b976f2526b
commit
e151fffd17
5 changed files with 121 additions and 9 deletions
|
@ -7,3 +7,65 @@ various loose ends of the generative card making approach
|
|||
|
||||
setup script for linode GPU instances
|
||||
- from debian 10 starting point ⟶ various GAN stuff
|
||||
|
||||
* lightweight & styleGAN
|
||||
|
||||
backups are on posthoc
|
||||
|
||||
* * styleGAN2-ADA
|
||||
|
||||
ongoing experiments with styleGAN2
|
||||
|
||||
current staging on Linode GPU instances (aka grapheme )
|
||||
|
||||
#+BEGIN_SRC shell :dir /ssh:grapheme:. :results raw :wrap SRC text :async
|
||||
ps ax | grep train.py
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
|
||||
** generate and mix
|
||||
|
||||
#+BEGIN_SRC shell :dir /ssh:grapheme:/root/stylegan2-ada-pytorch/ :results raw replace :wrap SRC text :async
|
||||
python3 style_mixing.py \
|
||||
--outdir=/root/results/flickr6/generated/001600 \
|
||||
--network=/root/results/flickr6/00003-512x512-auto1-resumecustom/network-snapshot-001600.pkl \
|
||||
--rows=6000-6020 \
|
||||
--cols=600-620
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
|
||||
|
||||
#+BEGIN_SRC shell :dir /ssh:grapheme:/root/stylegan2-ada-pytorch/ :results raw replace :wrap SRC text :async
|
||||
python3 generate.py \
|
||||
--outdir=/root/results/flickr6/generated/001600 \
|
||||
--network=/root/results/flickr6/00003-512x512-auto1-resumecustom/network-snapshot-001600.pkl \
|
||||
--seeds=3300-3900
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
|
||||
** projection
|
||||
|
||||
image projection to explore latent space
|
||||
|
||||
|
||||
--target=https://live.staticflickr.com/65535/50698595796_8accf83473_k_d.jpg \
|
||||
|
||||
#+BEGIN_SRC shell :dir /ssh:grapheme:/root/stylegan2-ada-pytorch/ :results raw replace :wrap SRC text :async
|
||||
python3 projector.py --outdir=/root/results/flickr6/generated/101405 \
|
||||
--target=/root/data/_transfer_test/50698595796_8accf83473_k.jpg \
|
||||
--network=/root/results/flickr6/00003-512x512-auto1-resumecustom/network-snapshot-001440.pkl \
|
||||
--num-steps=5000
|
||||
#+END_SRC
|
||||
|
||||
|
||||
#+RESULTS:
|
||||
: 5efe249760c6a25a5188c67816b13ed4
|
||||
|
||||
|
||||
#+BEGIN_SRC shell :results raw replace :wrap SRC text :async
|
||||
rsync -av grapheme:results/ \
|
||||
/Users/zzk/code/foam-repo/superject/cards/neural/styleGAN2-ADA/results
|
||||
#+END_SRC
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
# - copy ssh keys via -> ssh-copy-id -i ~/.ssh/id_rsa root@grapheme
|
||||
# - copy scripts -> scp *.sh grapheme:
|
||||
# - sshfs grapheme:/tmp/neural /Volumes/
|
||||
# -
|
||||
|
||||
# on grapheme
|
||||
|
||||
|
@ -32,7 +33,7 @@ _EOL_
|
|||
apt-get update
|
||||
apt-get upgrade -y
|
||||
|
||||
apt-get install nvidia-driver firmware-misc-nonfree python3-pip emacs-nox nvidia-cuda-dev nvtop screen rsync -y &> /dev/null | echo 'Installing packaged gunk...'
|
||||
apt-get install git nvidia-driver firmware-misc-nonfree python3-pip emacs-nox nvidia-cuda-dev nvidia-cuda-toolkit nvtop screen rsync -y &> /dev/null | echo 'Installing packaged gunk...'
|
||||
|
||||
apt purge linux-image-4.19.0-13-amd64
|
||||
|
||||
|
@ -47,13 +48,17 @@ echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf
|
|||
|
||||
echo "partial attention..."
|
||||
|
||||
pip3 install deep-daze &> /dev/null | echo 'Installing deep-daze...'
|
||||
git clone https://github.com/NVlabs/stylegan2-ada-pytorch
|
||||
|
||||
pip3 install big-sleep &> /dev/null | echo 'Installing big-sleep...'
|
||||
pip3 install torch==1.7.1 pycuda psutil Pillow scipy click requests tqdm pyspng ninja tensorboard imageio imageio-ffmpeg==0.4.3
|
||||
|
||||
#pip3 install stylegan2_pytorch &> /dev/null | echo 'Installing styleGAN2...'
|
||||
#pip3 install lightweight-gan &> /dev/null | echo 'Installing lightweight GAN...'
|
||||
#pip3 install deep-daze &> /dev/null | echo 'Installing deep-daze...'
|
||||
#pip3 install big-sleep &> /dev/null | echo 'Installing big-sleep...'
|
||||
|
||||
mkdir -p /tmp/neural
|
||||
|
||||
echo "you are now asleep."
|
||||
|
||||
|
||||
# make new users if reqd?
|
||||
|
|
31
cards/neural/flickrGAN2.sh
Normal file
31
cards/neural/flickrGAN2.sh
Normal file
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
|
||||
# a simple script run stylegan2_pytorch on a linode GPU instance
|
||||
|
||||
# PLACE=/tmp/neural/
|
||||
# mkdir -p $PLACE
|
||||
# cd $PLACE
|
||||
|
||||
echo "using stlyeGAN2..."
|
||||
|
||||
phrases=("An energetic nomad on a long hike with wooden staff a green leaf and a small dog." "At the beginning of a magical quest for wisdom an animus of a conman hide beneath the table." "A charismatic female figure meditates on the book of flesh in isolation, oval and white." "Fertility of nature in small green leaves, adam's apple, a pyramid and a baby eagle's wing." "The alchemical gold adorns the throne in a powerful house rooted in matter.")
|
||||
|
||||
echo "cosmic entanglement..."
|
||||
|
||||
cd /root
|
||||
|
||||
# transfer learning using ffhq model for sytleGAN2
|
||||
|
||||
stylegan2_pytorch --name flickr3 \
|
||||
--data data/1024x1024 \
|
||||
--models_dir models/ffhq-foam \
|
||||
--results_dir results/flickr3 \
|
||||
--multi-gpus \
|
||||
--batch-size 16 --network-capacity 64 \
|
||||
--aug-prob 0.25 --attn-layers 1
|
||||
|
||||
# note in big-sleep.py -> torch,cuda.set_device(1)
|
||||
# and/or CUDA_VISIBLE_DEVICES=1,2 python myscript.py
|
||||
|
||||
|
||||
# ffmpeg -r 24 -f image2 -s 1920x1080 -i The_Grand_Evocateur_of_intensity.%d.png -vcodec libx264 -crf 25 -pix_fmt yuv420p The_Grand_Evocateur_of_intensity_m3.mp4
|
|
@ -2,8 +2,9 @@
|
|||
# via https://github.com/huggingface/pytorch-pretrained-BigGAN
|
||||
|
||||
import torch
|
||||
from pytorch_pretrained_biggan import (BigGAN, one_hot_from_names, truncated_noise_sample,
|
||||
save_as_images, display_in_terminal)
|
||||
from pytorch_pretrained_biggan import (BigGAN, one_hot_from_names, one_hot_from_int, truncated_noise_sample, save_as_images, display_in_terminal)
|
||||
|
||||
from PIL import Image
|
||||
|
||||
# OPTIONAL: if you want to have more information on what's happening, activate the logger as follows
|
||||
import logging
|
||||
|
@ -13,11 +14,15 @@ logging.basicConfig(level=logging.INFO)
|
|||
model = BigGAN.from_pretrained('biggan-deep-512')
|
||||
|
||||
# Prepare a input
|
||||
truncation = 0.4
|
||||
class_vector = one_hot_from_names(['soap bubble', 'coffee', 'mushroom'], batch_size=3)
|
||||
noise_vector = truncated_noise_sample(truncation=truncation, batch_size=3)
|
||||
truncation = 0.001
|
||||
class_vector = one_hot_from_int([22, 65, 555, 333], batch_size=4)
|
||||
#class_vector = one_hot_from_names(['soap bubble', 'coffee', 'mushroom', 'daisy'], batch_size=4)
|
||||
noise_vector = truncated_noise_sample(truncation=truncation, batch_size=4)
|
||||
|
||||
# All in tensors
|
||||
# noise_vector = torch.from_numpy(noise_vector)
|
||||
# class_vector = torch.from_numpy(class_vector)
|
||||
|
||||
noise_vector = torch.from_numpy(noise_vector)
|
||||
class_vector = torch.from_numpy(class_vector)
|
||||
|
||||
|
|
|
@ -741,6 +741,15 @@ improve the instuctions
|
|||
|
||||
|
||||
|
||||
* and 2021-02-09
|
||||
|
||||
via adam
|
||||
|
||||
»
|
||||
|
||||
Superject is an experiment. It is an experiment that is bold and humble at the same time. It mixes philosophy and design but is neither one of them. Philosophers would certainly object that Superject is not philosophy, while designers would likely balk at its many metaphysical conceits. It weaves philosophy and non-philosophy, or perhaps better: design and non-design; but then again, this experiment is not particularly interested in knowledge hierarchies. Alternatively, we could say that mixing philosophy and design creates an emergent species, something altogether different and unrecognizable, but then what of its components? Maybe it’s better not to worry about the dialectical essence of Superject and simply focus on its appearance: it’s a game.
|
||||
|
||||
|
||||
* other games, gameplay and/or narrative tangents
|
||||
|
||||
Looking at various cards, decks and games in an attempt understand our possibility space, focus and intent, through the lens of Whitehead's propositions....
|
||||
|
|
Loading…
Reference in a new issue