Evaluation error (Task 1) - Failed Tolerance

Evaluation error (Task 1) - Failed Tolerance  

  By: SenticLab.UAIC on May 19, 2022, 7:27 a.m.

Hello,

I got the following error on evaluation - Failed Tolerance: 9.6100003e-07

Do you have any idea why I'm receiving this?

 Last edited by: SenticLab.UAIC on Aug. 15, 2023, 12:56 p.m., edited 1 time in total.

Re: Evaluation error (Task 1) - Failed Tolerance  

  By: wilkiema on May 19, 2022, 8:20 a.m.

HI, Can you try to save your prediction as the below and submit your result again?

label = label.astype(np.uint8) label = sitk.GetImageFromArray(label) label.CopyInformation(image) # image loaded by "sitk.ReadImage" sitk.WriteImage(label, filename)

Re: Evaluation error (Task 1) - Failed Tolerance  

  By: SenticLab.UAIC on May 19, 2022, 9:07 a.m.

Thank you, using the same header as the original image did the trick. I used nibabel and bellow is my code. Maybe it will help others who use the same library.

img = nib.load(3d_volume_path) seg = nib.load(seg_path).get_fdata() # segmentation numpy array seg = nib.Nifti1Image(seg, img.affine, img.header) nib.save(img, save_path)