Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix an error in calculating SIFID #156

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions SIFID/sifid_score.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def tqdm(x): return x
parser.add_argument('--images_suffix', default='jpg', type=str, help='image file suffix')


def get_activations(files, model, batch_size=1, dims=64,
def get_activations(files, model, batch_size=1, dims=192,
cuda=False, verbose=False):
"""Calculates the activations of the pool_3 layer for all images.

Expand Down Expand Up @@ -183,7 +183,7 @@ def calculate_frechet_distance(mu1, sigma1, mu2, sigma2, eps=1e-6):


def calculate_activation_statistics(files, model, batch_size=1,
dims=64, cuda=False, verbose=False):
dims=192, cuda=False, verbose=False):
"""Calculation of the statistics used by the FID.
Params:
-- files : List of image files paths
Expand Down Expand Up @@ -255,7 +255,7 @@ def calculate_sifid_given_paths(path1, path2, batch_size, cuda, dims, suffix):
path2 = args.path2fake
suffix = args.images_suffix

sifid_values = calculate_sifid_given_paths(path1,path2,1,args.gpu!='',64,suffix)
sifid_values = calculate_sifid_given_paths(path1,path2,1,args.gpu!='',192,suffix)

sifid_values = np.asarray(sifid_values,dtype=np.float32)
numpy.save('SIFID', sifid_values)
Expand Down