Skip to content

Commit

Permalink
Change 'label = 0' to 'label = 1' when both the reference and predict…
Browse files Browse the repository at this point in the history
…ion images are empty.

The original 'label = 0' caused that the metrics were corresponding to background and were not easy to aggregate across subjects.
Now, with 'label = 1', even cases with both empty reference and prediction are considered when computing group mean and std.
  • Loading branch information
valosekj committed Feb 29, 2024
1 parent f1faffa commit a23b81b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compute_metrics/compute_metrics_reloaded.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def compute_metrics_single_subject(prediction, reference, metrics):
break # break to loop to avoid processing the background label ("else" block)
# Special case when both the reference and prediction images are empty
else:
label = 0
label = 1
print(f'Processing label {label} -- both the reference and prediction are empty')
bpm = BPM(prediction_data, reference_data, measures=metrics)
dict_seg = bpm.to_dict_meas()
Expand Down

0 comments on commit a23b81b

Please sign in to comment.