DSE-skeleton-pruning icon indicating copy to clipboard operation
DSE-skeleton-pruning copied to clipboard

Exception has occurred: ValueError

Open lphilomena opened this issue 2 years ago • 5 comments

Hi, I met a new error when there is a ring-like object in the binary mask. The details are as follows:

Exception has occurred: ValueError Buffer has wrong number of dimensions (expected 2, got 1) File "/data/xxx/PyTorch_Tutorials/DSE-skeleton-pruning/dsepruning/dse_helper.pyx", line 68, in dsepruning.dse_helper.recnstrc_by_disk def recnstrc_by_disk(int[:,:] branches, int[:,:] dist, int[:,::1] recnstrc): File "/data/xxx/PyTorch_Tutorials/DSE-skeleton-pruning/dsepruning/dsepruning.py", line 100, in skel_pruning_DSE recnstrc_by_disk(np.array(pts, dtype=np.int32), dist, recnstrc) File "/data/xxx/PyTorch_Tutorials/DSE-skeleton-pruning/my_utils.py", line 698, in dse_pruning new_skel = skel_pruning_DSE(skel, dist, 100)

It seems the current code doesn't work for ring-like object? Looking forward for your reply and many thanks!

lphilomena avatar Sep 14 '23 06:09 lphilomena

Looks like there is a single dot in the skeleton mask that causes the problem. Not 100% sure, if you can dump the skel, dist arrays into npy/npz files and share them, it would be helpful for debugging it.

originlake avatar Sep 14 '23 15:09 originlake

I got same issue

hwanython avatar Sep 21 '23 05:09 hwanython

It would be helpful if you could provide the data so I can reproduce the issue

originlake avatar Sep 21 '23 14:09 originlake

Okay! Thank you! Could I send a email which explain my issue and the data ???

Let's me know your address or other way to cantact with you

before I get you know, yours is not working on the 3D volume!?

hwanython avatar Sep 21 '23 23:09 hwanython

I just need a PNG image or an npy/npz file that stores the binary mask of the input to reproduce the issue. You can send it to [email protected]

This implementation only works in 2D. The idea might be extended for 3D use, but I'm not interested in doing that at the moment, the time complexity would also be challenging.

originlake avatar Sep 22 '23 01:09 originlake