2

I am using Tensorflow Object Detection API to train my own object detector. After preparing everything needed: I put data/train.record, test.record, training/object-detection.pbtxt, faster_rcnn_inception_resnet_v2_atrous_pets.config into the folder of object_detection. Run

python train.py --logtostderr --train_dir = training/ --pipeline_config_path = training/faster_rcnn_inception_resnet_v2_atrous_pets.config

I got error:

`
username@host:~/Documents/tensorflowModels/object_detection$ python train.py --logtostderr --train_dir = training/ --pipeline_config_path = training/faster_rcnn_inception_resnet_v2_atrous_pets.config
Traceback (most recent call last):
  File "train.py", line 198, in <module>
    tf.app.run()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "train.py", line 143, in main
    model_config, train_config, input_config = get_configs_from_pipeline_file()
  File "train.py", line 103, in get_configs_from_pipeline_file
    text_format.Merge(f.read(), pipeline_config)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/lib/io/file_io.py", line 118, in read
    self._preread_check()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/lib/io/file_io.py", line 78, in _preread_check
    compat.as_bytes(self.__name), 1024 * 512, status)
  File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
    self.gen.next()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/errors_impl.py", line 466, in raise_exception_on_not_ok_status
    pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.NotFoundError: =`

Any idea what is wrong in the process?

2
  • 1
    Did you append the direcotries ´tensorflow/models´ and ´tensorflow/models/slim´ to your PYTHONPATH Environment Variable? If so, try launching your command without spaces in front and after the "="s. Commented Sep 8, 2017 at 6:19
  • @ITiger, Thank you very much! I did have appended the direcotries ´tensorflow/models´ and ´tensorflow/models/slim´ before running. Surprisingly, after removing spaces before and after the "=", it runs. Why is it? Commented Sep 8, 2017 at 13:36

1 Answer 1

5

To summerize my comment:

  • Remove the spaces in front and behind the equal sign. The spaces cause the argument parser of Tensorflow (which is based on the argparse module) to parse the '=' as argument, which is obviously wrong. You can see this confusion in the error message:

tensorflow.python.framework.errors_impl.NotFoundError: =`

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.