0

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

2 Answers 2

4

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

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks.But train.py itself present in object_detection folder.
I know but you can take the train.py and place it into the higher level folder. The project folder will have train.py and object_detection folder. You also can edit the import part of the code but it will take a few more minutes than just copy and paste. Your problem is just a path location error. Place the file or folder in the right place, and your script will run without problem.
1

Move the object_detection folder to upper folder

cp /models/research/object_detection object_detection

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.