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
平均合併
2 天 19 小時
30 天內合併 PR
12

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

Project-MONAI/MONAI 的其他 Issue

查看 Project-MONAI/MONAI 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。