ImportError:Colab Google中没有名为object_detection.builders的模块

时间:2018-12-03 17:50:57

标签: python tensorflow object-detection google-colaboratory

我跑步时遇到此错误

%cd

!git clone --quiet https://github.com/tensorflow/models.git

!apt-get install -qq protobuf-compiler python-tk

!pip install -q Cython contextlib2 pillow lxml matplotlib PyDrive

!pip install -q pycocotools

%cd ~/models/research
!protoc object_detection/protos/*.proto --python_out=.

import os
os.environ['PYTHONPATH'] += ':/content/models/research/:/content/models/research/slim/'

!python object_detection/builders/model_builder_test.py 

我明白了

/root/models/research
Traceback (most recent call last):
  File "object_detection/builders/model_builder_test.py", line 23, in <module>
    from object_detection.builders import model_builder
ImportError: No module named object_detection.builders

有人可以帮助我,我为此工作了很多时间

2 个答案:

答案 0 :(得分:1)

Python无法找到模块“ object_detection”。 解决方案:

  • 获取模块
  • 修复(包括)模块的路径。

看看是否有帮助:
https://github.com/tensorflow/models/issues/1832

答案 1 :(得分:0)

pip install tensorflow-object-detection-api