models icon indicating copy to clipboard operation
models copied to clipboard

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

Open mattdingmeng opened this issue 9 years ago • 10 comments

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

mattdingmeng avatar Aug 01 '17 19:08 mattdingmeng

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

heroinlin avatar Aug 02 '17 06:08 heroinlin

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

shivaniag avatar Aug 02 '17 20:08 shivaniag

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 models\slim and copy them over to Python35\Lib\site-packages

aoancea avatar Sep 01 '17 10:09 aoancea

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

heroinlin avatar Sep 02 '17 03:09 heroinlin

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

aoancea avatar Sep 02 '17 06:09 aoancea

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

2017-09-02 14:10 GMT+08:00 Alex Oancea [email protected]:

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 .

heroinlin avatar Sep 02 '17 06:09 heroinlin

@aoancea what are this packages ?

ghost avatar Oct 12 '17 13:10 ghost

@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 :)

aoancea avatar Oct 19 '17 11:10 aoancea

from slim.deployment import model_deploy

Viveco avatar Dec 18 '17 03:12 Viveco

This work for me in windows:

  • Copy relevant deployment files from the \models\slim directory
  • paste it to Python\Lib\site-packages directory

then run again.It will work!

CHAMOD avatar Jan 21 '18 14:01 CHAMOD