io icon indicating copy to clipboard operation
io copied to clipboard

tfio.image.decode_dicom_image() not working

Open spike-h opened this issue 3 years ago • 6 comments

I’m unable to read DICOM files using tfio.image.decode_dicom_image(). It was working at least a couple months ago. Even the tutorial page on tensorflow hub has stopped working.

It gives the following error: NotImplementedError: unable to open file: libtensorflow_io.so, from paths: ['/usr/local/lib/python3.7/dist-packages/tensorflow_io/python/ops/libtensorflow_io.so'] caused by: ['/usr/local/lib/python3.7/dist-packages/tensorflow_io/python/ops/libtensorflow_io.so: undefined symbol: _ZN10tensorflow4data11DatasetBase8FinalizeEPNS_15OpKernelContextESt8functionIFNS_8StatusOrISt10unique_ptrIS1_NS_4core15RefCountDeleterEEEEvEE']

spike-h avatar Feb 09 '22 00:02 spike-h

I got the same issue on Google Colab Notebooks with the function tfio.audio.AudioIOTensor(file_path) The notebokk works fine in the past (December 2020)

unable to open file: libtensorflow_io.so, from paths: ['/usr/local/lib/python3.7/dist-packages/tensorflow_io/python/ops/libtensorflow_io.so'] caused by: ['/usr/local/lib/python3.7/dist-packages/tensorflow_io/python/ops/libtensorflow_io.so: undefined symbol: _ZN10tensorflow4data11DatasetBase8FinalizeEPNS_15OpKernelContextESt8functionIFNS_8StatusOrISt10unique_ptrIS1_NS_4core15RefCountDeleterEEEEvEE']

ghost avatar Feb 14 '22 10:02 ghost

@SebBaeck @spike-h This is likely caused by version mismatch of tensorflow-io vs. tensorflow when C++ kernel ops is used. We maintain backward compatibility for file system ops (C API) but image processing ops relies on C++ ops. Which version of the tensorflow and tensorflow-io are you using?

yongtang avatar Feb 14 '22 16:02 yongtang

Tensorflow Version: 2.7.0 Tensorflow-io Version: 0.24.0

ghost avatar Feb 15 '22 14:02 ghost

@SebBaeck Can you try 2.7.0+0.23.0, or 2.8.0+0.24.0?

yongtang avatar Feb 15 '22 22:02 yongtang

Yep, the following worked fine for me: Tensorflow Version: 2.7.0 Tensorflow-io Version: 0.23.1

Tensorflow Version: 2.8.0 Tensorflow-io Version: 0.24.0

Thank you @yongtang for your fast and helpful replies!

ghost avatar Feb 17 '22 16:02 ghost

No solution to this problem ? I am facing the same issue trying to opem DICOM image

jthibaut avatar Dec 14 '22 17:12 jthibaut