Skip to content

Commit

Permalink
add inference test - add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
wasserth committed Dec 17, 2024
1 parent 507abd2 commit 1e35d43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nnunetv2/tests/integration_tests/run_nnunet_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def run_tests_and_exit_on_failure():
img_gt = nib.load(f"nnunetv2/tests/example_data/example_ct_sm_T300_output.nii.gz").get_fdata()
img_pred = nib.load(f"nnunetv2/tests/github_actions_output/example_ct_sm.nii.gz").get_fdata()
dice = dice_score(img_gt, img_pred)
images_equal = dice > 0.99
images_equal = dice > 0.99 # allow for a small difference in the segmentation, otherwise the test will fail often
assert images_equal, f"The nnunet segmentation is not correct (dice: {dice:.5f})."

# Clean up
Expand Down

0 comments on commit 1e35d43

Please sign in to comment.