本文介绍了对象检测API错误:"ImportError:无法导入名称anchor_generator_pb2".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使Tensorflow的新对象检测API 正常工作.我已遵循安装说明,但是在运行时命令

I'm trying to get Tensorflow's new Object Detection API working. I've followed the installation instructions, but when running the command

python object_detection/builders/model_builder_test.py

我收到以下错误

from object_detection.protos import anchor_generator_pb2
ImportError: cannot import name anchor_generator_pb2

我已经查看了 object_detection.protos ,里面没有似乎没有任何名为anchor_generator_pb2的东西.还有其他人设法使该命令运行或解决了此问题吗?

I've looked inside object_detection.protos, and there doesn't seem to be anything named anchor_generator_pb2. Has anyone else managed to get this command to run, or solved this issue?

推荐答案

安装说明中缺少步骤,需要在 models/research 中运行以下操作:

Missed a step in the installation instructions, where the following needs to be run from models/research:

protoc object_detection/protos/*.proto --python_out=.

之后,您需要重新运行以下命令:

You need to rerun the below command after that:

pip install .

这篇关于对象检测API错误:"ImportError:无法导入名称anchor_generator_pb2".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 19:15
查看更多