Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with newest version #4810

Closed
usamahjundia opened this issue Jul 18, 2018 · 6 comments
Closed

Problem with newest version #4810

usamahjundia opened this issue Jul 18, 2018 · 6 comments
Assignees
Labels
stat:awaiting maintainer Waiting on input from the maintainer type:feature

Comments

@usamahjundia
Copy link

I am omitting the obligatory format because this has nothing to do with them.

I am working with the newest version, where train.py is no longer used

The thing is, when i tried to run the training with model_main.py, with this exact command:

python model_main.py \
  --pipeline_config_path=data/ssd_inception_v2_pets.config \
  --model_dir=training \
  --num_train_steps=100000 \
  --num_eval_steps=4000 \
  --alsologtostderr

it gave me errors because apparently, i need to install pycocotools and the code was meant for python 2

Is it possible to decouple pycocotools from the training code, and update the code to be suitable for both python 2 and 3 ?

Thank you.

@MonkeyWithAComputer
Copy link

Running it from the research dir fixed that issue for me.
The current code has syntax that is not compatible with python 3. I haven't tried changing that, but it might work. I think its mostly print statements that cause an issue.

@cbolles
Copy link

cbolles commented Jul 18, 2018

I was able to install pycocotools with and make the necessary changes to run in python3. pycocotools was fine for python3 for me when installed and I used 2to3 on models/research/object_detection/utils/object_detection_evaluation.py
and
models/research/object_detection/model_lib.py
After that everything seemed to work ok.

@karmel
Copy link
Contributor

karmel commented Jul 18, 2018

@jch1 - more py2/3 compatibility questions.

@karmel karmel assigned jch1 and unassigned karmel Jul 18, 2018
@karmel karmel added stat:awaiting maintainer Waiting on input from the maintainer type:feature labels Jul 18, 2018
@usamahjundia
Copy link
Author

as a quick fix, i did what @skagraDragneel suggested. Others having the same problem would find it a good temporary fix.

Thanks everyone!

@yuezhilanyi
Copy link

commant line 26 'from object_detection import eval_util' in model_lib.py if you do not need eval operations
for python 2 to 3, reference EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10#11

@ymodak
Copy link
Contributor

ymodak commented Nov 9, 2018

Closing this issue since workaround has been provided. Feel free to reopen if the issue still persists. Thanks!

@ymodak ymodak closed this as completed Nov 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat:awaiting maintainer Waiting on input from the maintainer type:feature
Projects
None yet
Development

No branches or pull requests

7 participants