georgesung / ssd_tensorflow_traffic_sign_detection

Implementation of Single Shot MultiBox Detector in TensorFlow, to detect and classify traffic signs
MIT License
530 stars 222 forks source link

Expected int32, got list containing Tensors of type '_Message' instead error. #11

Closed cooliscool closed 7 years ago

cooliscool commented 7 years ago

Hello :) I'm getting the following error while trying to run the demo by using the command : python inference.py -m demo

ajmal@darkcow:~/Documents/ssd_tensorflow_traffic_sign_detection$ python inference.py -m demo
2017-06-28 14:52:35.472959: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-06-28 14:52:35.472990: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-06-28 14:52:35.472997: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-06-28 14:52:35.473003: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2017-06-28 14:52:35.473013: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
Traceback (most recent call last):
  File "inference.py", line 190, in <module>
    generate_output(input_files, mode)
  File "inference.py", line 126, in generate_output
    model = SSDModel()
  File "/home/ajmal/Documents/ssd_tensorflow_traffic_sign_detection/model.py", line 178, in SSDModel
    model = AlexNet()
  File "/home/ajmal/Documents/ssd_tensorflow_traffic_sign_detection/model.py", line 159, in AlexNet
    final_pred_conf = tf.concat(1, preds_conf)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/array_ops.py", line 1043, in concat
    dtype=dtypes.int32).get_shape(
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 676, in convert_to_tensor
    as_ref=False)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 741, 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 113, 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 102, in constant
    tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape, verify_shape=verify_shape))
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_util.py", line 374, in make_tensor_proto
    _AssertCompatible(values, dtype)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_util.py", line 302, in _AssertCompatible
    (dtype.name, repr(mismatch), type(mismatch).__name__))
TypeError: Expected int32, got list containing Tensors of type '_Message' instead.

Please help me to sort this out. Thankyou.

cooliscool commented 7 years ago

Above error disappeared after installing a proper version of Tensorflow. ( v 0.12 as specified in the readme.)