Skip to main content

Minimalistic wrapper around cleanfid to make the api more user friendly. Calculates FID and KID from sets of images.

Project description

nicefid

Minimalistic wrapper around cleanfid to make the api more user friendly. Calculates FID and KID from sets of images.

On Aliased Resizing and Surprising Subtleties in GAN Evaluation

Install

poetry add nicefid

Or, for the old timers:

pip install nicefid

API

nicefid.Features.from_directory(path: Union[str, Path])
nicefid.Features.from_iterator(iterator: Iterator[torch.Tensor])  # NCHW
nicefid.Features.from_path(path: Union[str, Path])
features.save(path: Union[str, Path])

nicefid.compute_fid(features_a, features_b)
nicefid.compute_kid(features_a, features_b)

Usage

Comparing directory with generated images.

import nicefid

features_generated = nicefid.Features.from_iterator(...)
features_real = nicefid.Features.from_directory(...)

fid = nicefid.compute_fid(features_generated, features_real)
kid = nicefid.compute_kid(features_generated, features_real)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nicefid-2.0.0.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

nicefid-2.0.0-py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page