Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FID计算时无参考 #169

Open
sacred178953 opened this issue Jul 16, 2024 · 4 comments
Open

FID计算时无参考 #169

sacred178953 opened this issue Jul 16, 2024 · 4 comments

Comments

@sacred178953
Copy link

作者,您好!我对生成的一组图片和ground truth做FID计算时,评估模型默认是无参考的,即使我将metric_mode设置为全参考FR,但计算时还是无参考的,这个问题怎么解决

@chaofengc
Copy link
Owner

FID是单独处理的,不受metric_mode影响。请参考forward 函数的参数列表,分别传入参数fdir1fdir2

def forward(self,
fdir1=None,
fdir2=None,
mode='clean',
dataset_name=None,
dataset_res=1024,
dataset_split='train',
num_workers=12,
batch_size=32,
device=torch.device('cuda'),
verbose=True,
**kwargs
):

@sacred178953
Copy link
Author

FID是单独处理的,不受metric_mode影响。请参考forward 函数的参数列表,分别传入参数fdir1fdir2

def forward(self,
fdir1=None,
fdir2=None,
mode='clean',
dataset_name=None,
dataset_res=1024,
dataset_split='train',
num_workers=12,
batch_size=32,
device=torch.device('cuda'),
verbose=True,
**kwargs
):

fdir1和fdir2分别是什么参数,FID是通过计算两个分布之间的Fréchet距离来衡量生成模型和真实数据分布之间的差异,它不应该是有参考的吗?

@chaofengc
Copy link
Owner

fdir1fdir2分别是生成的文件夹以及ground truth文件夹,即两个数据分布,FID计算两个分布之间的距离

@sacred178953
Copy link
Author

fdir1fdir2分别是生成的文件夹以及ground truth文件夹,即两个数据分布,FID计算两个分布之间的距离

我复现了一个图像超分辨率生成模型,并使用真实图像数据集DrealSR测试了FID分数,我计算得到的数值是14.58,但原论文中的数值为156.13,数值结果相差如此之大,这是为什么?为了排除自己训练的原因,我下载了原作者预训练好的模型并进行了测试,但数值结果还是相差了一个数量级,这是什么原因导致的呢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants