Skip to content

Commit

Permalink
1. use tqdm.auto instead of tqdm
Browse files Browse the repository at this point in the history
2. use param name for calc_fid_stats
  • Loading branch information
w86763777 committed Nov 9, 2022
1 parent e6aa44e commit d37e96a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ The results are slightly different from official implementations due to the fram
- [Download](https://drive.google.com/drive/folders/1UBdzl6GtNMwNQ5U-4ESlIer43tNjiGJC?usp=sharing) precalculated statistics or
- Calculate statistics for your custom dataset using command line tool
```bash
python -m pytorch_gan_metrics.calc_fid_stats path/to/images path/to/statistics.npz
python -m pytorch_gan_metrics.calc_fid_stats \
--path path/to/images \
--stats path/to/statistics.npz
```
See [calc_fid_stats.py](./pytorch_gan_metrics/calc_fid_stats.py) for details.

Expand Down
4 changes: 2 additions & 2 deletions pytorch_gan_metrics/calc_fid_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
parser = argparse.ArgumentParser(
"A handy cli tool to calculate FID statistics.",
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument("path", type=str,
parser.add_argument("--path", type=str, required=True,
help='path to image directory (include subfolders)')
parser.add_argument("output", type=str,
parser.add_argument("--output", type=str, required=True,
help="output path")
parser.add_argument("--batch_size", type=int, default=50,
help="batch size")
Expand Down
2 changes: 1 addition & 1 deletion pytorch_gan_metrics/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import numpy as np
import torch
from scipy import linalg
from tqdm import tqdm
from tqdm.auto import tqdm
from torch.utils.data import DataLoader

from .inception import InceptionV3
Expand Down

0 comments on commit d37e96a

Please sign in to comment.