Skip to content

Commit 7e1336c

Browse files
authored
Add files via upload
1 parent a453e4a commit 7e1336c

File tree

1 file changed

+26
-54
lines changed

1 file changed

+26
-54
lines changed

README.md

Lines changed: 26 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ GC/DC indicates the way how we inject label information to the Generator or Disc
103103

104104
We check the reproducibility of GANs implemented in StudioGAN by comparing IS and FID with the original papers. We identify our platform successfully reproduces most of representative GANs except for PD-GAN, ACGAN, LOGAN, SAGAN, and BigGAN-Deep. FQ means Flickr-Faces-HQ Dataset (FFHQ). The resolutions of ImageNet, AFHQv2, and FQ datasets are 128, 512, and 1024, respectively.
105105

106-
<p align="center">
107-
<img width="55%" src="https://raw.githubusercontent.com/POSTECH-CVLab/PyTorch-StudioGAN/master/docs/figures/Reproducibility.png" />
106+
<p align="left">
107+
<img width="50%" src="https://raw.githubusercontent.com/POSTECH-CVLab/PyTorch-StudioGAN/master/docs/figures/Reproducibility.png" />
108108
</p>
109109

110110
# Requirements
@@ -306,39 +306,9 @@ CUDA_VISIBLE_DEVICES=0,...,N python3 src/main.py -sefa -sefa_axis SEFA_AXIS -sef
306306
# Training GANs
307307

308308
StudioGAN supports the training of 30 representative GANs from DCGAN to StyleGAN3-r.
309-
310309
We used different scripts depending on the dataset and model, and it is as follows:
311310

312-
### CIFAR10
313-
```bash
314-
CUDA_VISIBLE_DEVICES=0 python3 src/main.py -t -hdf5 -l -std_stat -std_max STD_MAX -std_step STD_STEP -metrics is fid prdc -ref "train" -cfg CONFIG_PATH -data DATA_PATH -save SAVE_PATH -mpc --post_resizer "friendly" --eval_backbone "InceptionV3_tf"
315-
```
316-
317-
### CIFAR10 using StyleGAN2/3
318-
```bash
319-
CUDA_VISIBLE_DEVICES=0 python3 src/main.py -t -hdf5 -l -metrics is fid prdc -ref "train" -cfg CONFIG_PATH -data DATA_PATH -save SAVE_PATH -mpc --post_resizer "friendly" --eval_backbone "InceptionV3_tf"
320-
```
321-
322-
### Baby/Papa/Grandpa ImageNet and ImageNet
323-
```bash
324-
CUDA_VISIBLE_DEVICES=0,1,2,3 python3 src/main.py -t -hdf5 -l -sync_bn -std_stat -std_max STD_MAX -std_step STD_STEP -metrics is fid prdc -ref "train" -cfg CONFIG_PATH -data DATA_PATH -save SAVE_PATH -mpc --pre_resizer "lanczos" --post_resizer "friendly" --eval_backbone "InceptionV3_tf"
325-
```
326-
327-
### AFHQv2
328-
```bash
329-
export MASTER_ADDR="localhost"
330-
export MASTER_PORT=8888
331-
CUDA_VISIBLE_DEVICES=0,1,2,3 python3 src/main.py -t -metrics is fid prdc -ref "train" -cfg CONFIG_PATH -data DATA_PATH -save SAVE_PATH -mpc --pre_resizer "lanczos" --post_resizer "friendly" --eval_backbone "InceptionV3_tf"
332-
```
333-
334-
### FFHQ
335-
```bash
336-
export MASTER_ADDR="localhost"
337-
export MASTER_PORT=8888
338-
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python3 src/main.py -t -metrics is fid prdc -ref "train" -cfg CONFIG_PATH -data DATA_PATH -save SAVE_PATH -mpc --pre_resizer "lanczos" --post_resizer "friendly" --eval_backbone "InceptionV3_tf"
339-
```
340-
341-
# Metrics
311+
# Metrics
342312

343313
StudioGAN supports Inception Score, Frechet Inception Distance, Improved Precision and Recall, Density and Coverage, Intra-Class FID, Classifier Accuracy Score. Users can get ``Intra-Class FID, Classifier Accuracy Score`` scores using ``-iFID, -GAN_train, and -GAN_test`` options, respectively.
344314

@@ -364,31 +334,31 @@ Density and coverage metrics can estimate the fidelity and diversity of generate
364334

365335
We report the best IS, FID, Improved Precision & Recall, and Density & Coverage of GANs.
366336

367-
To download all checkpoints reported in StudioGAN, Please [click here](https://drive.google.com/drive/folders/1CDM96Ic-99KdCDYTALkqvoAliprEnltC?usp=sharing) (will be ready soon).
337+
To download all checkpoints reported in StudioGAN, Please [**click here**](https://drive.google.com/drive/folders/1CDM96Ic-99KdCDYTALkqvoAliprEnltC?usp=sharing) (will be ready soon).
338+
339+
You can evaluate the checkpoint by adding ``-ckpt CKPT_PATH`` option with the corresponding configuration path ``-cfg CORRESPONDING_CONFIG_PATH``.
368340

369341
### 1. GANs from StudioGAN
370342

371343
The resolutions of CIFAR10, Baby ImageNet, Papa ImageNet, Grandpa ImageNet, ImageNet, AFHQv2, and FQ are 32, 64, 64, 64, 128, 512, and 1024, respectively.
372344

373345
We use the same number of generated images as the training images for Frechet Inception Distance (FID), Precision, Recall, Density, and Coverage calculation. For the experiments using Baby/Papa/Grandpa ImageNet and ImageNet, we exceptionally use 50k fake images against a complete training set as real images.
374346

375-
All features and moments of reference datasets can be downloaded via [Google Drive](https://github.com/POSTECH-CVLab/PyTorch-StudioGAN) (will be ready soon).
347+
All features and moments of reference datasets can be downloaded via [**Google Drive**](https://github.com/POSTECH-CVLab/PyTorch-StudioGAN) (will be ready soon).
376348

377349
<p align="center">
378350
<img width="95%" src="https://raw.githubusercontent.com/POSTECH-CVLab/PyTorch-StudioGAN/master/docs/figures/StudioGAN_Benchmark.png"/>
379351
</p>
380-
381352
### 2. Other generative models
382353

383354
The resolutions of ImageNet-128 and ImageNet 256 are 128 and 256, respectively.
384355

385-
All images used for Benchmark can be downloaded via [Google Drive](https://github.com/POSTECH-CVLab/PyTorch-StudioGAN) (will be ready soon).
356+
All images used for Benchmark can be downloaded via [**Google Drive**](https://github.com/POSTECH-CVLab/PyTorch-StudioGAN) (will be ready soon).
386357

387358
<p align="center">
388359
<img width="95%" src="https://raw.githubusercontent.com/POSTECH-CVLab/PyTorch-StudioGAN/master/docs/figures/Other_Benchmark.png"/>
389360
</p>
390-
391-
# Evaluating pre-saved image folders
361+
# Evaluating pre-saved image folders
392362

393363
* Evaluate IS, FID, Prc, Rec, Dns, Cvg (``-metrics is fid prdc``) of image folders (already preprocessed) saved in DSET1 and DSET2 using GPUs ``(0,...,N)``.
394364

@@ -412,36 +382,38 @@ CUDA_VISIBLE_DEVICES=0,...,N python3 src/evaluate.py -metrics is fid prdc --post
412382

413383
## StudioGAN thanks the following Repos for the code sharing
414384

415-
Implementation Details: https://github.com/ajbrock/BigGAN-PyTorch
385+
Exponential Moving Average: https://github.com/ajbrock/BigGAN-PyTorch
416386

417-
Architecture Details: https://github.com/google/compare_gan
387+
Synchronized BatchNorm: https://github.com/vacancy/Synchronized-BatchNorm-PyTorch
418388

419-
Tensorflow IS: https://github.com/openai/improved-gan
389+
Self-Attention module: https://github.com/voletiv/self-attention-GAN-pytorch
420390

421-
Tensorflow FID: https://github.com/bioinf-jku/TTUR
391+
Implementation Details: https://github.com/ajbrock/BigGAN-PyTorch
422392

423-
Tensorflow Precision and Recall: https://github.com/msmsajjadi/precision-recall-distributions
393+
Architecture Details: https://github.com/google/compare_gan
424394

425-
[[MIT license]](https://github.com/POSTECH-CVLab/PyTorch-StudioGAN/blob/master/src/sync_batchnorm/LICENSE) Synchronized BatchNorm: https://github.com/vacancy/Synchronized-BatchNorm-PyTorch
395+
StyleGAN2: https://github.com/NVlabs/stylegan2
426396

427-
[[MIT license]](https://github.com/POSTECH-CVLab/PyTorch-StudioGAN/blob/master/src/utils/ops.py) Self-Attention module: https://github.com/voletiv/self-attention-GAN-pytorch
397+
DiffAugment: https://github.com/mit-han-lab/data-efficient-gans
428398

429-
[[MIT license]](https://github.com/POSTECH-CVLab/PyTorch-StudioGAN/blob/master/src/utils/diffaug.py) DiffAugment: https://github.com/mit-han-lab/data-efficient-gans
399+
Adaptive Discriminator Augmentation: https://github.com/NVlabs/stylegan2
430400

431-
[[MIT_license]](https://github.com/POSTECH-CVLab/PyTorch-StudioGAN/blob/master/src/metrics/prdc.py) PyTorch Improved Precision and Recall: https://github.com/clovaai/generative-evaluation-prdc
401+
Tensorflow IS: https://github.com/openai/improved-gan
402+
403+
Tensorflow FID: https://github.com/bioinf-jku/TTUR
432404

433-
[[MIT_license]](https://github.com/POSTECH-CVLab/PyTorch-StudioGAN/blob/master/src/metrics/prdc.py) PyTorch Density and Coverage: https://github.com/clovaai/generative-evaluation-prdc
405+
Pytorch FID: https://github.com/mseitzer/pytorch-fid
434406

435-
[[MIT license]](https://github.com/POSTECH-CVLab/PyTorch-StudioGAN/blob/master/src/utils/resize.py) PyTorch clean-FID: https://github.com/GaParmar/clean-fid
407+
Tensorflow Precision and Recall: https://github.com/msmsajjadi/precision-recall-distributions
436408

437-
[[NVIDIA source code license]](https://github.com/POSTECH-CVLab/PyTorch-StudioGAN/blob/master/LICENSE-NVIDIA) StyleGAN2: https://github.com/NVlabs/stylegan2
409+
PyTorch Improved Precision and Recall: https://github.com/clovaai/generative-evaluation-prdc
438410

439-
[[NVIDIA source code license]](https://github.com/POSTECH-CVLab/PyTorch-StudioGAN/blob/master/LICENSE-NVIDIA) Adaptive Discriminator Augmentation: https://github.com/NVlabs/stylegan2
411+
PyTorch Density and Coverage: https://github.com/clovaai/generative-evaluation-prdc
440412

441-
[[Apache License]](https://github.com/POSTECH-CVLab/PyTorch-StudioGAN/blob/master/src/metrics/fid.py) Pytorch FID: https://github.com/mseitzer/pytorch-fid
413+
PyTorch clean-FID: https://github.com/GaParmar/clean-fid
442414

443415
## License
444-
PyTorch-StudioGAN is an open-source library under the MIT license (MIT). However, portions of the library are avaiiable under distinct license terms: StyleGAN2, StyleGAN2-ADA, and StyleGAN3 are licensed under [NVIDIA source code license](https://github.com/POSTECH-CVLab/PyTorch-StudioGAN/blob/master/LICENSE-NVIDIA), and PyTorch-FID is licensed under [Apache License](https://github.com/POSTECH-CVLab/PyTorch-StudioGAN/blob/master/src/metrics/fid.py).
416+
PyTorch-StudioGAN is an open-source library under the MIT license (MIT). However, portions of the library are avaiiable under distinct license terms: StyleGAN2, StyleGAN2-ADA, and StyleGAN3 are licensed under [NVIDIA source code license](https://github.com/POSTECH-CVLab/PyTorch-StudioGAN/blob/master/LICENSE-NVIDIA), Synchronized batch normalization is licensed under [MIT license](https://github.com/POSTECH-CVLab/PyTorch-StudioGAN/blob/master/src/sync_batchnorm/LICENSE), HDF5 generator is licensed under [MIT license](https://github.com/POSTECH-CVLab/PyTorch-StudioGAN/blob/master/src/utils/hdf5.py), differentiable SimCLR-style augmentations is licensed under [MIT license](https://github.com/POSTECH-CVLab/PyTorch-StudioGAN/blob/master/src/utils/simclr_aug.py), and clean-FID is licensed under [MIT license](https://github.com/POSTECH-CVLab/PyTorch-StudioGAN/blob/master/src/utils/resize.py).
445417

446418
## Citation
447419
StudioGAN is established for the following research projects. Please cite our work if you use StudioGAN.

0 commit comments

Comments
 (0)