ImportError: No module named object_detection.builders in colab google

假如想象 提交于 2019-12-08 08:09:45

问题


I have this error when i run

%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 

I got this

/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

Someone can help me please, i've working a lot of time in this


回答1:


Python is unable to find the module "object_detection". Solution:

  • Get the module
  • Fix(include) the path to the module.

See if this helps:
https://github.com/tensorflow/models/issues/1832



来源:https://stackoverflow.com/questions/53599174/importerror-no-module-named-object-detection-builders-in-colab-google

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!