Models: When fine tune Pet dataset. ImportError: No module named deployment

Created on 1 Aug 2017  Â·  10Comments  Â·  Source: tensorflow/models

I follow the instruction to fine tune the PET dataset.
In the /tensorflow/models, I used 'python object_detection/train.py --logtostderr --pipeline_config_path=${} ......'
But I got the ImportError:
Traceback (most recent call last):
File "object_detection/train.py", line 51, in
from object_detection import trainer
File "/home/aaa/tensorflow/models/object_detection/trainer.py", line 33, in
from deployment import model_deploy
ImportError: No module named deployment

Most helpful comment

see models/object_detection/g3doc/installation.md
image
the deployment folder belong to slim folder.
image
you should add slim to PYTHONPATH .

All 10 comments

see models/object_detection/g3doc/installation.md
image
the deployment folder belong to slim folder.
image
you should add slim to PYTHONPATH .

Please reopen this issue if the above mentioned solution didn't work for you.

I'm not quite sure how you run this on Windows.

What I did was to copy over all packages that appeared to be missing when running tensorflow. Basically you can look up the those packages inside modelsslim and copy them over to Python35Libsite-packages

I used PyCharm to run the project. Add model/slim to Interpreter Paths,
like this
image

Is that a global fix for when you run it from command line(cmd) as well?

It's not a global fix, only run in PyCharm.

2017-09-02 14:10 GMT+08:00 Alex Oancea notifications@github.com:

Is that a global fix for when you run it from command line(cmd) as well?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/models/issues/2088#issuecomment-326725002,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AQrfnvg1ipIMZan6i6wQ2ddY6E4AQ1LMks5sePFHgaJpZM4OqNoT
.

@aoancea what are this packages ?

@madekwe probably some libraries needed to run object_detection. They might also be required to be in PATH but it seemed to be a better idea to just copy them over :)

from slim.deployment import model_deploy

This work for me in windows:

  • Copy relevant deployment files from the modelsslim directory
  • paste it to PythonLibsite-packages directory

then run again.It will work!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

25b3nk picture 25b3nk  Â·  3Comments

nmfisher picture nmfisher  Â·  3Comments

frankkloster picture frankkloster  Â·  3Comments

kamal4493 picture kamal4493  Â·  3Comments

airmak picture airmak  Â·  3Comments