目标跟随

参考:https://community.bwbot.org/topic/500/%E4%BD%BF%E7%94%A8xiaoqiang_track%E8%BF%9B%E8%A1%8C%E4%BA%BA%E4%BD%93%E8%B7%9F%E9%9A%8F%E5%92%8C%E8%BF%BD%E8%B8%AA
进行人体跟随和追踪
1、环境配置
在ubuntu 16.04 kinetic版本
安装相关依赖程序
sudo apt-get install libjsoncpp libcurl3 libcurl4-openssl-dev openssl
安装CPU版本的Tensorflow 离线安装:
下载:tensorflow-1.4.0-cp27-cp27mu-linux_x86_64.whl 安装包
安装软件包相关依赖

sudo pip install scipy scikit-image matplotlib pyyaml easydict cython munkres

下载相关模型

git clone https://github.com/BluewhaleRobot/body_pose
# 单人模型
cd src/models/mpii
./download_models.sh

# 多人模型

./compile.sh
cd models/coco
./download_models.sh

“`

这里
2018-09-11 16:31:16.515141: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.519132: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.520818: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.521704: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.523221: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.532401: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.533464: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.536087: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.544432: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.546988: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.548728: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.550271: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.551803: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.552319: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.554066: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.554609: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.555059: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.556428: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.557084: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.558702: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.560149: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.560992: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.562615: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.564422: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.566469: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.568057: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.569097: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.570711: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.572849: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.574278: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.575418: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.579831: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.581471: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.583615: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.586010: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
2018-09-11 16:31:16.591716: W tensorflow/core/framework/op_kernel.cc:1192] Out of range: Read less bytes than requested
Traceback (most recent call last):
File “/home/XXX/pose/src/body_pose/src/body_pose_node.py”, line 62, in
sess, inputs, outputs = predict.setup_pose_prediction(cfg)
File “/home/XXX/pose/src/body_pose/src/nnet/predict.py”, line 21, in setup_pose_prediction
restorer.restore(sess, cfg.init_weights)
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py”, line 1666, in restore
{self.saver_def.filename_tensor_name: save_path})
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py”, line 889, in run
run_metadata_ptr)
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py”, line 1120, in _run
feed_dict_tensor, options, run_metadata)
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py”, line 1317, in _do_run
options, run_metadata)
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py”, line 1336, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.OutOfRangeError: Read less bytes than requested
[[Node: save/RestoreV2_525 = RestoreV2[dtypes=[DT_FLOAT], _device=”/job:localhost/replica:0/task:0/device:CPU:0”](_arg_save/Const_0_0, save/RestoreV2_525/tensor_names, save/RestoreV2_525/shape_and_slices)]]

Caused by op u’save/RestoreV2_525’, defined at:
File “/home/XXX/pose/src/body_pose/src/body_pose_node.py”, line 62, in
sess, inputs, outputs = predict.setup_pose_prediction(cfg)
File “/home/XXX/pose/src/body_pose/src/nnet/predict.py”, line 13, in setup_pose_prediction
restorer = tf.train.Saver()
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py”, line 1218, in init
self.build()
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py”, line 1227, in build
self._build(self._filename, build_save=True, build_restore=True)
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py”, line 1263, in _build
build_save=build_save, build_restore=build_restore)
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py”, line 751, in _build_internal
restore_sequentially, reshape)
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py”, line 427, in _AddRestoreOps
tensors = self.restore_op(filename_tensor, saveable, preferred_shard)
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py”, line 267, in restore_op
[spec.tensor.dtype])[0])
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_io_ops.py”, line 1021, in restore_v2
shape_and_slices=shape_and_slices, dtypes=dtypes, name=name)
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/op_def_library.py”, line 787, in _apply_op_helper
op_def=op_def)
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py”, line 2956, in create_op
op_def=op_def)
File “/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py”, line 1470, in init
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access

OutOfRangeError (see above for traceback): Read less bytes than requested
[[Node: save/RestoreV2_525 = RestoreV2[dtypes=[DT_FLOAT], _device=”/job:localhost/replica:0/task:0/device:CPU:0”](_arg_save/Const_0_0, save/RestoreV2_525/tensor_names, save/RestoreV2_525/shape_and_slices)]]
写代码片

这里写图片描述

已入坑。。。从坑里爬出来了,
继续下一步。。。

还在学习,后续会继续添加

猜你喜欢

转载自blog.csdn.net/ailianda/article/details/82589993