Skip to main content

Package for calculating Frechet CLIP Distance (FCD) using PyTorch

Project description

FCD_Score

Fréchet CLIP Distance Score: Fréchet CLIP Distance Score calculate Fréchet Distance based on features from CLIP image encoder.
FCD measure similarity between generated images and the dataset.

Installation

Install from pip:
pip install pytorch-fcd
Requirements:
ftfy
regex
numpy
pillow
scipy
torch>=1.7.1
torchvision>=0.8.2
clip

Usage

calculate and save statistics for datasest:
pytorch-fcd --model-name "ViT-B/32" --savepath path_to_image_dataset path_to_save_file

calculate FCD score for image dataset and generated image dataset:
pytorch-fcd --model-name "ViT-B/32" --paths path_to_image_dataset path_to_generated_image_dataset

Citing

If you use this repository in your research, consider citing it using the following Bibtex entry:
@misc{ShanYang2023FCD,
author={Shan Yang},
title={{pytorch-fcd: FCD Score for PyTorch}},
month={Nov},
year={2023},
note={Version 1.0.0.dev1},
howpublished={\url{https://github.com/syang-lab/FCD_Score}} }

License

This implementation is licensed under the Apache License 2.0.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytorch_fcd-1.0.1.dev1-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file pytorch_fcd-1.0.1.dev1-py3-none-any.whl.

File metadata

File hashes

Hashes for pytorch_fcd-1.0.1.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 3c0b98e3347fc51b4f7845a230fa793009e6fe12c0b7a6a4079ea41423d5473f
MD5 e40996f533676a776ac500c268de63f3
BLAKE2b-256 abc4378d04b77c0fc03e4f9285f6a1fe3a521c4950f7971626501e064d146034

See more details on using hashes here.

Supported by

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