使用 Tensorflow 的对象检测使用我自己的数据集训练对象检测器时出错 API

Error while training an object detector with my own dataset using Tensorflow's Object Detection API

我正在使用张量流的对象检测器训练对象检测器 API。我正在关注 this link 使用我自己的数据集训练对象检测器。在我开始训练过程(本地)之前一切似乎都很好:

python /Users/vinayakpahalwan/models/research/object_detection/train.py --logtostderr --train_dir=/Users/vinayakpahalwan/Desktop/ObjectDetection/training/ --pipeline_config_path=/Users/vinayakpahalwan/Desktop/ObjectDetection/training/ssd_mobilenet_v1_coco.config

我收到以下 错误

Traceback (most recent call last):
  File "builders/model_builder_test.py", line 21, in <module>
    from object_detection.builders import model_builder
  File "/Users/vinayakpahalwan/models/research/object_detection/builders/model_builder.py", line 23, in <module>
    from object_detection.builders import matcher_builder
  File "/Users/vinayakpahalwan/models/research/object_detection/builders/matcher_builder.py", line 19, in <module>
    from object_detection.matchers import bipartite_matcher
  File "/Users/vinayakpahalwan/models/research/object_detection/matchers/bipartite_matcher.py", line 20, in <module>
    from tensorflow.contrib.image.python.ops import image_ops
ImportError: No module named 'tensorflow.contrib.image'

我现在有点卡在这里了,有什么解决方法吗?

我想我已经按照 this link 正确安装了对象检测 API :

Vinayaks-MacBook-Air:object_detection vinayakpahalwan$ python builders/model_builder_test.py
...........
----------------------------------------------------------------------
Ran 11 tests in 0.070s

OK

错误消息说它找不到文件 tensorflow/contrib/image

由于您使用的是 Tensorflow 版本 0.12.1,请查看内部 tensorflow/contrib, the folder image does not exist yet. This is introduced from version 1.0 as seen here

此时您的解决方法是更新 TS。