目前我正试图在安装了它的相机的情况下在RPi零上运行暗流。
使用暗流检测有点慢,但在pi 3上工作得很好。 (花了几个小时来编译opencv3) 所以我认为它在pi 0上类似,但它不是。
我设法安装了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-for-the-raspberry-pi)
使用
构建暗流python setup.py build_ext --inplace
没有任何问题。 (它实际上是python3,因为我在使用python3的venv上)
但是当我尝试使用以下命令检查检测是否有效时:
./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
我不知道出了什么问题以及如何解决这个问题。你能帮忙吗?
答案 0 :(得分:0)
我有同样的问题。在浪费了4天后,我决定尝试更旧的版本,因为它们可能会起作用。我找到了一个没有这个错误的构建版本。它适用于python 2.7,所以我不得不改变我的一些代码。 Picture of "Open Website"