DiffBIR icon indicating copy to clipboard operation
DiffBIR copied to clipboard

How to calculate FID in BFR task?

Open EternalEvan opened this issue 2 years ago • 4 comments

Hi, thanks for your wonderful work which inspires us so much. However, we wonder how to calculate the FID metric in your paper. In other word, which reference dataset did you choose when computing the results' FID. We reproduct your results which are visually amazing but cannot achieve the FID around 20 in your paper.

EternalEvan avatar Oct 09 '23 09:10 EternalEvan

Hi. For evaluation on CelebA-Test (synthetic dataset), CelebA-Test-HQ is used as our reference dataset. For evaluation on real-world datasets, FFHQ is used as our reference dataset.

0x3f3f3f3fun avatar Oct 10 '23 07:10 0x3f3f3f3fun

Thank you for your prompt response! I have another question regarding the FID library you utilized. I've noticed that many projects focusing on image restoration tasks often employ the pytorch-fid repository for calculating FID. Could you please confirm whether you also used this library, either with default settings or any other codes?

I'm eager to replicate your methodology, and aligning with your quantitative metrics is my initial step. Your understanding is greatly appreciated! : )

EternalEvan avatar Oct 13 '23 04:10 EternalEvan

We use pytorch-fid to calculate FID :)

0x3f3f3f3fun avatar Oct 14 '23 13:10 0x3f3f3f3fun

A follow-up question, if I may – which layer of the inception network did you use?

As both LFW and WIDER have less than 2048 images, we cannot compute FID using the default layer (as mentioned here: https://github.com/mseitzer/pytorch-fid?tab=readme-ov-file#using-different-layers-for-feature-maps).

man-sean avatar Jul 04 '24 13:07 man-sean