参考:https://github.com/lucidrains/lightweight-gan
1 |
pip install lightweight-gan |
1 2 3 4 5 6 |
lightweight_gan \ --data ./path/to/images \ --name {name of run} \ --batch-size 16 \ --gradient-accumulate-every 4 \ --num-train-steps 200000 |
1 |
lightweight_gan --data ./path/to/images --aug-prob 0.25 --aug-types [translation,cutout,color] |
学習済みモデルから生成(jpg)。チェックポイントを指定することもできる。
1 2 3 4 5 6 |
lightweight_gan \ --name {name of run} \ --load-from {checkpoint num} \ --generate \ --generate-types {types of result, default: [default,ema]} \ --num-image-tiles {count of image result} |
学習済みモデルから連続出力(gif)。GANによくあるごにょごにょ画像。
1 |
lightweight_gan --name {name of run} --generate-interpolation |
学習済みモデルのチェックポンとごとに生成(jpg)。
1 2 3 4 5 |
lightweight_gan \ --name {name of run} \ --show-progress \ --generate-types {types of result, default: [default,ema]} \ --num-image-tiles {count of image result} |
1 2 |
#disc output size is by default 1x1 lightweight_gan --data ./path/to/art --image-size 512 --disc-output-size 5 |
1 2 |
#make sure there are no spaces between the values within the brackets [] lightweight_gan --data ./path/to/images --image-size 512 --attn-res-layers [32,64] --aug-prob 0.25 |
透過画像で学習
1 |
lightweight_gan --data ./path/to/images --transparent |
グレースケールで学習
1 |
lightweight_gan --data ./path/to/images --greyscale |