naisy / train_ssd_mobilenet

Train ssd_mobilenet of the Tensorflow Object Detection API with your own data.
MIT License
61 stars 24 forks source link

ImportError: No module named object_detection #3

Closed scbean closed 5 years ago

scbean commented 5 years ago

I seem to have a problem at the very end, I am assuming I did something wrong but this is what happens when I run the final command to create the frozen graph

Traceback (most recent call last):
  File "/home/r/github/models/research/object_detection/export_inference_graph.py", line 71, in <module>
    from object_detection import exporter
ImportError: No module named object_detection

I then went through and tried to rename the different import settings and got it to work up until I got this:

Traceback (most recent call last):
  File "/home/r/github/models/research/object_detection/export_inference_graph.py", line 71, in <module>
    import exporter
  File "/home/r/github/models/research/object_detection/exporter.py", line 28, in <module>
    from builders import model_builder
  File "/home/r/github/models/research/object_detection/builders/model_builder.py", line 25
    builders import region_similarity_calculator_builder as sim_calc
                  ^
SyntaxError: invalid syntax

I saw something suggested this : protoc object_detection/protos/*.proto --python_out=.

But that didn't seem to do anything...

Its possible I installed something like TensorFlow wrong so I was thinking I should go back and re-install everything, although everything seemed to train just fine so... Any ideas?

scbean commented 5 years ago

After double checking that I did everything correct it looks like I missed this command:

export PYTHONPATH=$PYTHONPATH:pwd:pwd/slim

And that seems to have done it, although I don't have my xavier with me to verify it works there I am sure it will. Thanks for the great instructions, I just need to follow them better!