Skip to content

Commit

Permalink
add stddev to phase prediction output
Browse files Browse the repository at this point in the history
  • Loading branch information
wasserth committed Jul 18, 2024
1 parent 832ccf1 commit 3af0160
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions totalsegmentator/bin/totalseg_get_phase.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,13 @@ def get_ct_contrast_phase(ct_img: nib.Nifti1Image, model_file: Path = None):
# print(f"mean: {pi_time} [{preds.min():.1f}-{preds.max():.1f}]")
phase, probability = pi_time_to_phase(pi_time)

return {"pi_time": pi_time, "phase": phase, "probability": probability,
"pi_time_min": round(float(preds.min()), 2), "pi_time_max": round(float(preds.max()), 2)}
return {"pi_time": pi_time,
"phase": phase,
"probability": probability,
"pi_time_min": round(float(preds.min()), 2),
"pi_time_max": round(float(preds.max()), 2),
"stddev": pi_time_std # measure of uncertainty
}


def main():
Expand Down

0 comments on commit 3af0160

Please sign in to comment.