Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sivajyothi1 opened this issue Mar 5, 2019 · 2 comments

Comments

@sivajyothi1
Copy link

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???

@asciidiego
Copy link
Contributor

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?

@Einshowstank
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants