meddlr.metrics#

Meddlr metrics extend the torchmetrics interface to support tracking and reporting metrics on a per-example, per-channel basis. This can be useful for more nuanced model monitoring, such as determining which set of examples is the model underperforming on or which categories have the least accuracy.

Because these metrics are based on the torchmetrics interface, they are compatible everywhere where torchmetrics metrics are used.

Base#

meddlr.metrics.Metric

Interface for new metrics.

meddlr.metrics.MetricCollection

The class that manages multiple metrics.

Image Metrics#

meddlr.metrics.MSE

Mean squared error with complex-valued support.

meddlr.metrics.NRMSE

Normalized root-mean-squared error with complex-valued support.

meddlr.metrics.PSNR

Peak signal-to-noise ratio with complex-valued support.

meddlr.metrics.RMSE

Root-mean-squared error with complex-valued support.

meddlr.metrics.SSIM

Structural similarity index measure with complex-valued support.

Segmentation Metrics#

meddlr.metrics.ASSD

Average symmetric surface distance.

meddlr.metrics.CV

Coefficient of variation.

meddlr.metrics.DSC

Dice score coefficient.

meddlr.metrics.VOE

Volumetric overlap error.

Functional#

All metrics in Meddlr are also available as functions in the meddlr.metrics.functional module.

meddlr.metrics.functional.mse

Computes mean square error.

meddlr.metrics.functional.nrmse

Computes normalized root mean squared error.

meddlr.metrics.functional.psnr

Computes peak signal-to-noise ratio.

meddlr.metrics.functional.rmse

Computes root mean square error.

meddlr.metrics.functional.ssim

Computes structural similarity index (SSIM).

meddlr.metrics.functional.assd

Computes average symmetric surface distance.

meddlr.metrics.functional.cv

Computes coefficient of variation.

meddlr.metrics.functional.dice

Computes dice score coefficient.

meddlr.metrics.functional.voe

Computes volumetric overlap error.