wasr_network icon indicating copy to clipboard operation
wasr_network copied to clipboard

Inferencing error

Open fbarilla opened this issue 3 years ago • 1 comments

Hi Borja, your obstacle detection approach looks so promising that I decided to give it a try on a maritime dataset I sued to train some object detection and classification models. Unfortunately running the example command: 'python wasr_inference_noimu_general.py --img-path example_1.jpg'
fails with the following error:

File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1224, in internal_convert_to_tensor ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/constant_op.py", line 305, in _constant_tensor_conversion_function return constant(v, dtype=dtype, name=name) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/constant_op.py", line 246, in constant allow_broadcast=True) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/constant_op.py", line 284, in _constant_impl allow_broadcast=allow_broadcast)) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_util.py", line 562, in make_tensor_proto "supported type." % (type(values), values)) TypeError: Failed to convert object of type <type 'tuple'> to Tensor. Contents: (1, 1, 2048, Dimension(2048)). Consider casting elements to a supported type.

I'm running Python 2.7.17, Tensorflow 1.14.0 and OpenCV 4.5.3-dev.
Any idea ?
I read that your code has been ported to Python 3. Is it available somewhere ? Thanks for any advice/action that could help me to bypass this issue.

fbarilla avatar Jul 14 '21 23:07 fbarilla

Hi, This seems like a TensorFlow specific error. I suggest asking this question on the TF forum/git. Alternatively, you could try downgrading the TF version to match the one used in this project.

bborja avatar Jul 23 '21 21:07 bborja