Hello i am trying to calculate average surface distance (asd) using Medpy with latest libraries of keras and tensorflow. Any help in this regard is appreciated. Here is my code and error:
from medpy import metric as M
asd=M.binary.asd(tf.cast(y_pred, np.float32),tf.cast(y_true, np.float32),voxelspacing=None,connectivity=1)
Error:
File "/home/rak038/Segmentation/U-net/noGPU/noGPU/lib/python3.7/site-packages/medpy/metric/binary.py", line 1200, in __surface_distances
result = numpy.atleast_1d(result.astype(numpy.bool))
AttributeError: 'Tensor' object has no attribute 'astype'