acdc_segmenter icon indicating copy to clipboard operation
acdc_segmenter copied to clipboard

RuntimeError: The second supplied array does not contain any binary object.

Open sivajyothi1 opened this issue 5 years ago • 2 comments

Traceback (most recent call last): File "evaluate_patients.py", line 400, in metrics_acdc.main(path_gt, path_pred, path_eval) File "/home/sivajyothi/acdc_segmenter/metrics_acdc.py", line 312, in main df = compute_metrics_on_directories_raw(path_gt, path_pred) File "/home/sivajyothi/acdc_segmenter/metrics_acdc.py", line 109, in compute_metrics_on_directories_raw hausdorff_list.append(hd(gt_binary, pred_binary, voxelspacing=zooms, connectivity=1)) File "/home/sivajyothi/acdc_segmenter/src/medpy/medpy/metric/binary.py", line 348, in hd hd1 = __surface_distances(result, reference, voxelspacing, connectivity).max() File "/home/sivajyothi/acdc_segmenter/src/medpy/medpy/metric/binary.py", line 1166, in __surface_distances raise RuntimeError('The second supplied array does not contain any binary object.')
RuntimeError: The second supplied array does not contain any binary object.

I'm getting this error while evaluating the model. As mentioned in the previous issue i reinstalled matplotlib, but i'm getting this error. Can you please help me to resolve this issue???

sivajyothi1 avatar Mar 05 '19 14:03 sivajyothi1

This probably does not have to do with the model, since it seems your problem comes from the fact that it asks you for binary data and you may be giving it, multi-class data maybe?

asciidiego avatar Mar 05 '19 17:03 asciidiego

It is because the hausdorff metric. One of the mask your model predict is maybe all zero.

Einshowstank avatar May 24 '21 03:05 Einshowstank