You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add Kernel Inception Distance (KID) metric for model evaluation #9151
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.
changed the title [-]Add Kernel Inception Distance (KID) metric formodel evaluation[/-][+]Add Kernel Inception Distance (KID) metric for model evaluation[/+]on Oct 3, 2026
Hi, I’m interested in working on this issue. I have experience with PyTorch, mathematical modelling, model evaluation and medical computer vision. I plan to review the existing FIDMetric and MMDMetric implementations, implement the unbiased polynomial-kernel MMD² calculation, and add tests covering known values, validation and agreement with an independent reference implementation.
Could you please confirm that the proposed API and scope are still available before I begin?
Activity
[-]Add Kernel Inception Distance (KID) metric formodel evaluation[/-][+]Add Kernel Inception Distance (KID) metric for model evaluation[/+]adebowalep commentedon Oct 12, 2026
Hi, I’m interested in working on this issue. I have experience with PyTorch, mathematical modelling, model evaluation and medical computer vision. I plan to review the existing FIDMetric and MMDMetric implementations, implement the unbiased polynomial-kernel MMD² calculation, and add tests covering known values, validation and agreement with an independent reference implementation.
Could you please confirm that the proposed API and scope are still available before I begin?