Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
sarthakpati authored Aug 28, 2023
2 parents 36cf4ea + 72eb99f commit a963f86
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions GANDLF/cli/generate_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,18 +253,20 @@ def __percentile_clip(input_tensor, reference_tensor=None, p_min=0.5, p_max=99.5
] = structural_similarity_index(gt_image_infill, output_infill, mask).item()

# ncc metrics
overall_stats_dict[current_subject_id]["ncc_mean"] = ncc_mean(
gt_image_infill, output_infill
)
overall_stats_dict[current_subject_id]["ncc_std"] = ncc_std(
gt_image_infill, output_infill
)
overall_stats_dict[current_subject_id]["ncc_max"] = ncc_max(
gt_image_infill, output_infill
)
overall_stats_dict[current_subject_id]["ncc_min"] = ncc_min(
gt_image_infill, output_infill
)
compute_ncc = parameters.get("compute_ncc", True)
if compute_ncc:
overall_stats_dict[current_subject_id]["ncc_mean"] = ncc_mean(
gt_image_infill, output_infill
)
overall_stats_dict[current_subject_id]["ncc_std"] = ncc_std(
gt_image_infill, output_infill
)
overall_stats_dict[current_subject_id]["ncc_max"] = ncc_max(
gt_image_infill, output_infill
)
overall_stats_dict[current_subject_id]["ncc_min"] = ncc_min(
gt_image_infill, output_infill
)

# only voxels that are to be inferred (-> flat array)
# these are required for mse, psnr, etc.
Expand Down

0 comments on commit a963f86

Please sign in to comment.