MarvinTeichmann / KittiBox

A car detection model implemented in Tensorflow.
MIT License
401 stars 169 forks source link

demo.py error #22

Closed wuyuzaizai closed 7 years ago

wuyuzaizai commented 7 years ago

Traceback (most recent call last): File "demo.py", line 206, in tf.app.run() File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 44, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "demo.py", line 135, in main image=image) File "incl/tensorvision/core.py", line 137, in build_inference_graph logits = modules['arch'].inference(hypes, image, train=False) File "RUNS/KittiBox_pretrained/model_files/architecture.py", line 22, in inference vgg_fcn = fcn8_vgg.FCN8VGG(vgg16_npy_path=vgg16_npy_path) File "/home/zjj/KittiBox/incl/tensorflow_fcn/fcn8_vgg.py", line 33, in init self.data_dict = np.load(vgg16_npy_path, encoding='latin1').item() File "/home/zjj/.local/lib/python2.7/site-packages/numpy/lib/npyio.py", line 406, in load pickle_kwargs=pickle_kwargs) File "/home/zjj/.local/lib/python2.7/site-packages/numpy/lib/format.py", line 637, in read_array array = pickle.load(fp, **pickle_kwargs) EOFError

I need your help

MarvinTeichmann commented 7 years ago

There was propaly an error downloading ftp://mi.eng.cam.ac.uk/pub/mttt2/models/vgg16.npy. Try to download that file again.

wuyuzaizai commented 7 years ago

@MarvinTeichmann I download vgg16.npy again, then the error has changed.

Traceback (most recent call last): File "demo.py", line 206, in tf.app.run() File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 44, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "demo.py", line 135, in main image=image) File "incl/tensorvision/core.py", line 137, in build_inference_graph logits = modules['arch'].inference(hypes, image, train=False) File "RUNS/KittiBox_pretrained/model_files/architecture.py", line 28, in inference random_init_fc8=True) File "/home/zjj/KittiBox/incl/tensorflow_fcn/fcn8_vgg.py", line 67, in build ], 3) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/util/deprecation.py", line 117, in new_func return func(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/array_ops.py", line 1123, in concat return concat_v2(values, concat_dim, name) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/array_ops.py", line 1057, in concat_v2 dtype=dtypes.int32).get_shape( File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 651, in convert_to_tensor as_ref=False) File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 716, 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 176, 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 165, 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 367, 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.

MarvinTeichmann commented 7 years ago

Which tensorflow version are you using? Looks like a compatibility error with the old concat function. Make sure you are using tensorflow 1.0 as well as the newest KittiBox version. Follow this steps to checkout the newest version.

MarvinTeichmann commented 7 years ago

Close for now. Feel free to reopen if you made any progress / tested with newest Version of KittiBox, tensorflow-fcn etc