Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Add Kernel Inception Distance (KID) metric for model evaluation

Abierto
#9,151 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 4 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
74/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python, pytorch

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
8.7k
Forks
1.6k
Merge medio
5 d 20 h
PR fusionados (30 d)
12

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Project-MONAI/MONAI

Todos los issues de Project-MONAI/MONAI

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.