3
votes

When I use ssd_mobilenet_v1_coco_11_06_2017 model to train myself data set,

I use google TensorFlow detection API to train that

There are some problems will arise. my os: ubuntu 16.04

./train.sh
Traceback (most recent call last): File "../../train.py", line 167, in tf.app.run() File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 126, in run _sys.exit(main(argv)) File "../../train.py", line 163, in main worker_job_name, is_chief, FLAGS.train_dir) File "/home/feng/project/models/research/object_detection/trainer.py", line 240, in train detection_model = create_model_fn() File "/home/feng/project/models/research/object_detection/builders/model_builder.py", line 98, in build add_background_class) File "/home/feng/project/models/research/object_detection/builders/model_builder.py", line 166, in _build_ssd_model is_training=is_training) File "/home/feng/project/models/research/object_detection/builders/model_builder.py", line 129, in _build_ssd_feature_extractor feature_extractor_config.override_base_feature_extractor_hyperparams)

AttributeError: 'SsdFeatureExtractor' object has no attribute 'override_base_feature_extractor_hyperparams'

What kind of question is that?

2

2 Answers

0
votes

I reccomend you check out the below issue reported on the TensorFlow Object Detection API Git:

https://github.com/tensorflow/models/issues/4121

0
votes

I ran into this recently after upgrading my TensorFlow Object Detection API and fixed it by refreshing the protobuf bindings.

This kind of error message can happen why you have the wrong protobuf bindings installed, since the new bindings may be incompatible with the old version bindings that are still being referenced. You can fix this by downloading the newest version of protobuf and compiling the new bindings.

To do this follow the instructions for "Manual protobuf-compiler installation and usage" found here: Section Link, but to future proof this against a future broken link, I will note that they currently instruct you to:

  1. Make tensorflow/models/research the current directory
  2. Download and install the latest version of protoc (aka protobuf)
    • wget -O protobuf.ziP
    • https://github.com/google/protobuf/releases/download/v3.0.0/protoc-3.0.0-linux-x86_64.zip
    • unzip protobuf.zip
  3. Run the compilation process with the downloaded version (the old version may still be in your path and you might need it elsewhere).
    • ./bin/protoc object_detection/protos/*.proto --python_out=.
  4. Add libraies to PYTHONPATH
    • export PYTHONPATH=$PYTHONPATH: `pwd` : `pwd` /slim
  5. Test the installation
    • python object_detection/builders/model_builder_test.py