mridc.collections.reconstruction.metrics package
Submodules
mridc.collections.reconstruction.metrics.evaluate module
- class mridc.collections.reconstruction.metrics.evaluate.Metrics(metric_funcs, output_path, method)[source]
Bases:
object
Maintains running statistics for a given collection of metrics.
- mridc.collections.reconstruction.metrics.evaluate.evaluate(arguments, reconstruction_key, mask_background, output_path, method, acc, no_params, slice_start, slice_end, coil_dim)[source]
Evaluates the reconstructions.
- Parameters
arguments (The CLI arguments.) –
reconstruction_key (The key of the reconstruction to evaluate.) –
mask_background (The background mask.) –
output_path (The output path.) –
method (The reconstruction method.) –
acc (The acceleration factor.) –
no_params (The number of parameters.) –
slice_start (The start slice. (optional)) –
slice_end (The end slice. (optional)) –
coil_dim (The coil dimension. (optional)) –
- Returns
dict
- Return type
A dict where the keys are metric names and the values are the mean of the metric.
- mridc.collections.reconstruction.metrics.evaluate.mse(gt: ndarray, pred: ndarray) float [source]
Compute Mean Squared Error (MSE)
- mridc.collections.reconstruction.metrics.evaluate.nmse(gt: ndarray, pred: ndarray) float [source]
Compute Normalized Mean Squared Error (NMSE)