我正在尝试安装 tensorflow 对象检测 API。我已按照此处的所有安装步骤进行操作。但是,当我尝试运行时python3 object_detection/builders/model_builder_test.py
,出现此错误:
Traceback (most recent call last):
File "object_detection/builders/model_builder_test.py", line 21, in <module>
from object_detection.builders import model_builder
File "/Users/stanleynguyen/Documents/Projects/tf-models/research/object_detection/builders/model_builder.py", line 17, in <module>
from object_detection.builders import anchor_generator_builder
File "/Users/stanleynguyen/Documents/Projects/tf-models/research/object_detection/builders/anchor_generator_builder.py", line 20, in <module>
from object_detection.protos import anchor_generator_pb2
File "/Users/stanleynguyen/Documents/Projects/tf-models/research/object_detection/protos/anchor_generator_pb2.py", line 16, in <module>
from object_detection.protos import grid_anchor_generator_pb2 as object__detection_dot_protos_dot_grid__anchor__generator__pb2
File "/Users/stanleynguyen/Documents/Projects/tf-models/research/object_detection/protos/grid_anchor_generator_pb2.py", line 41, in <module>
options=None, file=DESCRIPTOR),
我还尝试将我的模型部署到 Google Cloud ML Engine。但是,作业未能输出此跟踪:
The replica worker 4 exited with a non-zero status of 1.
Termination reason: Error.
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals
File "/root/.local/lib/python2.7/site-packages/object_detection/train.py", line 49, in <module> from object_detection import trainer
File "/root/.local/lib/python2.7/site-packages/object_detection/trainer.py", line 27, in <module> from object_detection.builders import preprocessor_builder
File "/root/.local/lib/python2.7/site-packages/object_detection/builders/preprocessor_builder.py", line 21, in <module> from object_detection.protos import preprocessor_pb2
File "/root/.local/lib/python2.7/site-packages/object_detection/protos/preprocessor_pb2.py", line 71, in <module> options=None, file=DESCRIPTOR),
TypeError: __new__() got an unexpected keyword argument 'file'
谁能帮我理解发生了什么?有没有人见过这个错误?