1

I'm currently trying to retrain Google's Tensorflow Object Detection

I followed the steps in sentdex's tutorial (and probably like many of you did).

After I generated the tf_records and moved them in the directory models/research/object_detection, everything should be set for the training.

To initialize the training process I used: python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/ssd_mobilenet_v1_pets.config

The result should be the command line printing the current step and accuracy reached, but instead i got:

Traceback (most recent call last):
  File "train.py", line 49, in <module>
    from object_detection import trainer
  File "/home/ubuntu/tensorflow/research/object_detection/trainer.py", line 27, in <module>
    from object_detection.builders import preprocessor_builder
  File "/home/ubuntu/tensorflow/research/object_detection/builders/preprocessor_builder.py", line 21, in <module>
    from object_detection.protos import preprocessor_pb2
  File "/home/ubuntu/tensorflow/research/object_detection/protos/preprocessor_pb2.py", line 71, in <module>
    options=None, file=DESCRIPTOR),
TypeError: __new__() got an unexpected keyword argument 'file'

I am working on Amazon's g2.2xlarge with Ubuntu 16.04 which came with tensorflow and nvidia cuda drivers ready (i suppose).

Any ideas why the error? Thanks a lot!

1 Answer 1

1

You somehow have different versions of google protocol buffer library at play. The preprocessor_pb2.py was generated with a new (past 3.5) version of protobuf, which introduced the file argument to generated code (https://github.com/google/protobuf/blob/9f80df026933901883da1d556b38292e14836612/CHANGES.txt#L74). And whatever it is calling on line 71 in /home/ubuntu/tensorflow/research/object_detection/protos/preprocessor_pb2.py must have been compiled with an earlier version of protoc, that does not have this field.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.