mseitzer / pytorch-fid

Compute FID scores with PyTorch.
Apache License 2.0
3.22k stars 497 forks source link

added function to compute likelihood between sample and target distri… #90

Open LucaCellamare opened 1 year ago

LucaCellamare commented 1 year ago

Hello, It would be useful to compute the likelihood of a single sample under a specified target distribution (LLID) and I believe this is a significant missing feature.

I create a pull request to add the implementation of a function to compute the likelihood between a sample under a target distribution.

Usage

The usage is very similar to when you compute the FID score between two Gaussian multivariate distribution. To compute the LLID score between a sample and a dataset, where images of the sample and the target dateset are contained in an individual folder:

python -m pytorch_llid path/to/target/dataset path/to/sample