Skip to content

Commit

Permalink
update readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
takerum committed Apr 5, 2018
1 parent d8ba067 commit 6bdbbf6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
8 changes: 3 additions & 5 deletions README.md
Expand Up @@ -75,23 +75,21 @@ python train.py --config=$CONFIG --results_dir=$LOGDIR --data_dir=$PREPROCESSED_
```

## Evaluation examples
(If you want to use pretrained models for the image generation, please download the model from [link](https://drive.google.com/drive/folders/1xZoL48uFOCnTxNGdknEYqE5YX0ZyoUej?usp=sharing) and set the `snapshot` argument to the path to the downloaded pretrained model file (.npz).)

### Generate images
```
python evaluations/gen_images.py --config=$CONFIG --snapshot=${LOGDIR}/ResNetGenerator_<iterations>.npz --results_dir=${LOGDIR}/gen_images
```

### Generate category morphing images
Regarding the index-category correspondence, please see [1K ImageNet](https://drive.google.com/drive/u/1/folders/1Mr-fYW0-9QbwKYlIaiFUtgcN6n9qhY8l), [143 dog and cat ImageNet](https://drive.google.com/drive/u/1/folders/1yA3xWJqWRvhnhkvJsKF3Xbb-2LO4JrJw).
Regarding the index-category correspondence, please see [1K ImageNet](https://drive.google.com/drive/u/1/folders/1Mr-fYW0-9QbwKYlIaiFUtgcN6n9qhY8l) or [143 dog and cat ImageNet](https://drive.google.com/drive/u/1/folders/1yA3xWJqWRvhnhkvJsKF3Xbb-2LO4JrJw).
```
python evaluations/gen_interpolated_images.py --n_zs=10 --n_intp=10 --classes $CATEGORY1 $CATEGORY2 --config=$CONFIG --snapshot=${LOGDIR}/ResNetGenerator_<iterations>.npz --results_dir=${LOGDIR}/gen_morphing_images
```


### Calculate inception score (with the original OpenAI implementation)
```
python evaluations/calc_inception_score.py --config=$CONFIG --snapshot=${LOGDIR}/ResNetGenerator_<iterations>.npz --results_dir=${LOGDIR}/inception_score --splits=10 --tf
```




18 changes: 12 additions & 6 deletions README_paper.md
Expand Up @@ -86,18 +86,24 @@ python train.py --config=$CONFIG --results_dir=$LOGDIR --data_dir=$PREPROCESSED
- [pretrained models](https://drive.google.com/drive/folders/1wKMG6ontP8ZKdBYOA8l-z_JQUUpuA7XA)
- [generated images](https://drive.google.com/drive/folders/1yA3xWJqWRvhnhkvJsKF3Xbb-2LO4JrJw?usp=sharing) (Inception score: 28.2)

## Evaluations
## Evaluation examples
(If you want to use pretrained models for the image generation, please download the model from [link](https://drive.google.com/drive/folders/1xZoL48uFOCnTxNGdknEYqE5YX0ZyoUej?usp=sharing) and set the `snapshot` argument to the path to the downloaded pretrained model file (.npz).)

### Calculate inception score (with the original OpenAI implementation)
### Generate images
```
python evaluations/calc_inception_score.py --config=./configs/sn_projection.yml --snapshot=${LOGDIR}/ResNetGenerator_<iterations>.npz --results_dir=${LOGDIR}/inception_score --splits=10 --tf
python evaluations/gen_images.py --config=$CONFIG --snapshot=${LOGDIR}/ResNetGenerator_<iterations>.npz --results_dir=${LOGDIR}/gen_images
```

### Generate images and save them in `${LOGDIR}/gen_images`
### Generate category morphing images
Regarding the index-category correspondence, please see [1K ImageNet](https://drive.google.com/drive/u/1/folders/1Mr-fYW0-9QbwKYlIaiFUtgcN6n9qhY8l) or [143 dog and cat ImageNet](https://drive.google.com/drive/u/1/folders/1yA3xWJqWRvhnhkvJsKF3Xbb-2LO4JrJw).
```
python evaluations/gen_interpolated_images.py --n_zs=10 --n_intp=10 --classes $CATEGORY1 $CATEGORY2 --config=$CONFIG --snapshot=${LOGDIR}/ResNetGenerator_<iterations>.npz --results_dir=${LOGDIR}/gen_morphing_images
```

### Calculate inception score (with the original OpenAI implementation)
```
python evaluations/gen_images.py --config=./configs/sn_projection.yml --snapshot=${LOGDIR}/ResNetGenerator_<iterations>.npz --results_dir=${LOGDIR}/gen_images
python evaluations/calc_inception_score.py --config=$CONFIG --snapshot=${LOGDIR}/ResNetGenerator_<iterations>.npz --results_dir=${LOGDIR}/inception_score --splits=10 --tf
```
(If you want to use the pretrained model for the image generation, please download the pretraind model from [link](https://drive.google.com/drive/folders/1xZoL48uFOCnTxNGdknEYqE5YX0ZyoUej?usp=sharing) and set the `snapshot` argument to the path to the downloaded pretrained model file (.npz).)


[sngans]: https://openreview.net/forum?id=B1QRgziT-
Expand Down

0 comments on commit 6bdbbf6

Please sign in to comment.