0

目前我正在尝试在安装了摄像头的 RPi 零上运行暗流。

使用暗流检测有点慢,但在 pi 3 上运行良好。(虽然编译 opencv3 需要几个小时)所以我认为它在 pi 零上很相似,但事实并非如此。

我设法安装了 opencv 3.3.1(花了一天时间来构建)和 tensorflow(使用
tensorflow-1.4.0-cp35-none-any.whl 从 tensorflow-1.4.0-cp34-none-any.whl 重命名),并且他们工作正常(有点......由于python版本不兼容,tensorflow显示了一些警告 - 但根据Pete Warden的博客它无论如何都可以工作:https ://petewarden.com/2017/08/20/cross-compiling-tensorflow-为树莓派

python setup.py build_ext --inplace

没有任何问题。(它实际上是 python3,因为我在 venv 和 python3 上)

但是当我尝试检查检测是否适用于以下命令时:

./flow --imgdir=sample_img --model cfg/tiny-yolo-voc.cfg --load bin/tiny-yolo-voc.weights --gpu 0

它给出了错误:

Traceback (most recent call last):
  File "./flow", line 4, in <module>
    from darkflow.cli import cliHandler
  File "/home/pi/tensor/darkflow/darkflow/cli.py", line 3, in <module>
    from .net.build import TFNet
  File "/home/pi/tensor/darkflow/darkflow/net/build.py", line 5, in <module>
    from .ops import op_create, identity
  File "/home/pi/tensor/darkflow/darkflow/net/ops/__init__.py", line 1, in <module>
    from .simple import *
  File "/home/pi/tensor/darkflow/darkflow/net/ops/simple.py", line 1, in <module>
    import tensorflow.contrib.slim as slim
  File "/home/pi/tensor/lib/python3.5/site-packages/tensorflow/contrib/__init__.py", line 82, in <module>
    from tensorflow.contrib.eager.python import tfe as eager
  File "/home/pi/tensor/lib/python3.5/site-packages/tensorflow/contrib/eager/python/tfe.py", line 76, in <module>
    from tensorflow.contrib.eager.python.datasets import Iterator
  File "/home/pi/tensor/lib/python3.5/site-packages/tensorflow/contrib/eager/python/datasets.py", line 23, in <module>
    from tensorflow.contrib.data.python.ops import prefetching_ops
  File "/home/pi/tensor/lib/python3.5/site-packages/tensorflow/contrib/data/python/ops/prefetching_ops.py", line 25, in <module>
    resource_loader.get_path_to_datafile("../../_prefetching_ops.so"))
  File "/home/pi/tensor/lib/python3.5/site-packages/tensorflow/contrib/util/loader.py", line 55, in load_op_library
    ret = load_library.load_op_library(path)
  File "/home/pi/tensor/lib/python3.5/site-packages/tensorflow/python/framework/load_library.py", line 56, in load_op_library
    lib_handle = py_tf.TF_LoadLibrary(library_filename, status)
  File "/home/pi/tensor/lib/python3.5/site-packages/tensorflow/python/framework/errors_impl.py", line 473, in __exit__
    c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.NotFoundError: /home/pi/tensor/lib/python3.5/site-packages/tensorflow/contrib/data/python/ops/../../_prefetching_ops.so: undefined symbol: _ZN6google8protobuf8internal26fixed_address_empty_stringE

我不知道出了什么问题以及如何解决这个问题。你能帮忙吗?

4

1 回答 1

0

我有同样的问题。在浪费了 4 天之后,我决定尝试旧版本,因为它们可能会起作用。我发现一个没有这个错误的构建。它适用于 python 2.7,所以我不得不更改我的一些代码。http://ci.tensorflow.org/view/Nightly/job/nightly-pi/78/artifact/output-artifacts/tensorflow-1.3.0-cp27-none-any.whl

于 2018-01-09T08:21:43.123 回答