Search code examples
objecttensorflowdetection

Tensorflow: Object detection api error-no module named object_detection


I am using python 3.5 and Anaconda 4.2 and ubuntu 16.04. I get an error in train.py file (from object_detection import trainer: no module named object_detection).But I think that i have problem in python 3.5. Can anyone help me with this error?

enter image description here


Solution

  • It happened to me. Just copy the "object_detection" folder from "models" folder into the folder where you are running the train.py. I posted the link to the folder from github but you better copy the folder from your local files so it will match with your code perfectly in case you are using an older version of the object detection api.

    There are more professional ways to solve the problem I think but I just used the easiest way to solve the problem.

    Link to object_detection folder from tensorflow github: https://github.com/tensorflow/models/tree/master/research/object_detection