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

时间:2017-11-09 14:51:07

标签: python tensorflow object-detection tensorflow-slim

我正在研究一种具有张量流物体检测器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

1 个答案:

答案 0 :(得分:0)

错误消息表明找不到文件 tensorflow / contrib / image

由于您使用的是Tensorflow版本0.12.1,查看tensorflow/contrib内部, image 文件夹尚不存在。这是从版本1.0引入的here

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

相关问题