nicefid
Minimalistic FID and KID implementation. Reference checked against cleanfid. Code is a mix between crowsonkb's implementation and cleanfid.
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)
Release files for nicefid 2.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nicefid-2.1.1.tar.gz | 7.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nicefid-2.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.6 kB
Release files / nicefid-2.1.1.tar.gz
| Download URL | nicefid-2.1.1.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f623dbd8a5a3b8498dd97dfbb15927418cbb25360e554a81ff25567b2f65290d
|
|
BLAKE2b-256 checksum How to use checksums |
4853459fc7e075d2d6539e7bbf2fb465ae15a1edf0d6db76904c75b1673e7ad6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.8.8 Linux/5.13.0-51-generic
|
Release files / nicefid-2.1.1-py3-none-any.whl
| Download URL | nicefid-2.1.1-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8bdcb74c6baece3d424bdb8b0781fa01f6ab6a97aa15da573a333bb4477e922d
|
|
BLAKE2b-256 checksum How to use checksums |
ac52b44940a6e9c01188ee0a63ab3f75679e6e5af5b1bcc57c92b78c5eca6dbd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.8.8 Linux/5.13.0-51-generic
|