Problem with newest version
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.
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.
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.
@jch1 - more py2/3 compatibility questions.
as a quick fix, i did what @skagraDragneel suggested. Others having the same problem would find it a good temporary fix.
Thanks everyone!
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 https://github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10/issues/11
Closing this issue since workaround has been provided. Feel free to reopen if the issue still persists. Thanks!