Closed shonenkov closed 9 months ago
Do you get different FID values using the way you calculate FID in this pull request? How different are they?
yes, 8.1 (with bug in sqrt root matrix) vs 7.3 (clean-fid / fix) -- I am not comparing with official FID implementation
also I would like to mention, that "clean-fid" is not so clean (maybe I was mistaken): see: https://github.com/GaParmar/clean-fid/blob/main/cleanfid/inception_torchscript.py#L52-L53 it is supposed to be 127.5 (expected image 255), but it doesnt affect too much;
anyway thanks for both repos (clean-fid and yours) - I like them - it contains unique authentic parts of code
execution speed via torch.linalg.eig
is much slower torch.linalg.eigh
-- so this PR is not good idea to use for training; only to calculate correct final metrics
maybe I was mistaken, I checked tests for the calculation sqrt root matrix, FID in k-diffusion didnt work how I expected: https://docs.scipy.org/doc/scipy/reference/generated/scipy.linalg.sqrtm.html
and made some fixes for torch implementation according to diagonalization method: https://en.wikipedia.org/wiki/Square_root_of_a_matrix