mit-han-lab / data-efficient-gans

[NeurIPS 2020] Differentiable Augmentation for Data-Efficient GAN Training
https://arxiv.org/abs/2006.10738
BSD 2-Clause "Simplified" License
1.27k stars 175 forks source link

Inception Score with evaluate function #75

Closed iumyx2612 closed 3 years ago

iumyx2612 commented 3 years ago

In your Colab tutorial, I found your evaluate function and you use that to calculate FID Can I use it to calculate IS also? If not, how can I calculate IS?

zsyzzsoft commented 3 years ago

Yes, you can use the evaluate function with metric='is10k'

iumyx2612 commented 3 years ago

I used it like this: evaluate('results/xxx/network-snapshot-xxxxxx.pkl', dataset='path/to/my/dataset', resolution=64, metric='is10k') And here's the message I got: Traceback (most recent call last): File "/usr/lib/python3.7/multiprocessing/pool.py", line 121, in worker result = (True, func(*args, *kwds)) File "", line 42, in _evaluate metric_group.run(network_name, dataset_args=dataset_args, log_results=False) File "/content/drive/My Drive/folder/data-efficient-gans/DiffAugment-stylegan2/metrics/metric_base.py", line 161, in run metric.run(args, kwargs) File "/content/drive/My Drive/folder/data-efficient-gans/DiffAugment-stylegan2/metrics/metric_base.py", line 59, in run self._get_dataset_obj() File "/content/drive/My Drive/folder/data-efficient-gans/DiffAugment-stylegan2/metrics/metric_base.py", line 123, in _get_dataset_obj self._dataset_obj = dataset.load_dataset(data_dir=self._data_dir, split=self.split, repeat=False, self._dataset_args) File "/content/drive/My Drive/folder/data-efficient-gans/DiffAugment-stylegan2/training/dataset.py", line 238, in load_dataset dataset = dnnlib.util.get_obj_by_name(class_name)(**kwargs) File "/content/drive/My Drive/folder/data-efficient-gans/DiffAugment-stylegan2/training/dataset.py", line 59, in init assert len(tfr_files) >= 1 AssertionError """ I was running evaluate fine with metrics='fid5k-train Do you know how to resolve this?

zsyzzsoft commented 3 years ago

Can you try the latest code? I've updated the code to address this issue.

iumyx2612 commented 3 years ago

Can you try the latest code? I've updated the code to address this issue.

great, it's working now. Thanks a lot