Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Add Kernel Inception Distance (KID) metric for model evaluation

未关闭
#9,151 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
74/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
python, pytorch

调研方向

Start by reading the existing FIDMetric implementation and the surrounding files in monai/metrics/, then use the requested monai/metrics/kid.py entry point. Add unit tests for known values, input validation, and agreement with a reference implementation; done means the metric computes the specified unbiased polynomial-kernel MMD² on generated and real feature vectors.

由索引模型根据 Issue 内容生成。

描述

Is your feature request related to a problem? Please describe.
FIDMetric and MMDMetric are provided for evaluating models, but no Kernel Inception Distance (KID). KID is widely reported alongside FID in image synthesis and image-to-image translation papers (papers like CUT, UNSB, Contourdiff). It is unbiased and more reliable than FID with small sample sizes, which is common in medical imaging test sets.

Describe the solution you'd like
A KIDMetric in monai/metrics/kid.py following the same design as FIDMetric:

  • Takes pre-extracted feature vectors (N x F) for generated and real images, so any feature extractor (ImageNet, RadImageNet, MedicalNet) can be used.
  • Computes the unbiased MMD^2 with a polynomial kernel k(x, y) = (x·y / d + 1)^3.
  • Unit tests checking known values, input validation, and agreement with a reference implementation.

Describe alternatives you've considered
Using torchmetrics' KernelInceptionDistance, but it bundles an Inception feature extractor, while MONAI's FIDMetric works on arbitrary features, which suits medical images better.

Additional context
Reference: Bińkowski et al., "Demystifying MMD GANs", ICLR 2018.
I'm happy to implement this and open a PR if maintainers agree.

主要语言
Python
星标
8.8k
派生
1.6k
平均合并
3 天 10 小时
30 天内合并 PR
13

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Project-MONAI/MONAI 的其他 Issue

查看 Project-MONAI/MONAI 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。