Skip to content

Commit

Permalink
Update generate_metrics.py for usage of the unified PSNR signature
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixSteinbauer authored Jul 29, 2023
1 parent 3ffbaa7 commit af8c12d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions GANDLF/cli/generate_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
structural_similarity_index,
mean_squared_error,
peak_signal_noise_ratio,
peak_signal_noise_ratio_eps,
mean_squared_log_error,
mean_absolute_error,
ncc_mean,
Expand Down Expand Up @@ -263,8 +262,8 @@ def __fix_2d_tensor(input_tensor):
gt_image_infill, output_infill
).item()

overall_stats_dict[current_subject_id]["psnr_range_eps"] = peak_signal_noise_ratio_eps(
gt_image_infill, output_infill
overall_stats_dict[current_subject_id]["psnr_eps"] = peak_signal_noise_ratio(
gt_image_infill, output_infill, epsilon=sys.float_info.epsilon
).item()

pprint(overall_stats_dict)
Expand Down

0 comments on commit af8c12d

Please sign in to comment.