tensorflow / tensorflow/models

ERROR: google.protobuf.text_format.ParseError: 11:5 : Message type "object_detection.protos.BoxCoder" has no field named "box_coder"

Open
#10,277 2 comments 0 reactions 3 assignees View on GitHub

@pkulzc is already working on this.

Since Sep 28, 2021.

models:research:odapi type:support
Dominant language
Python
Stars
77.7k
Forks
44.8k
PR merge metrics
No merged PRs in 30d

Description

I am trying to use a pre-trained model for object detection where I have followed all the steps presented on other sites (like https://pylessons.com/Tensorflow-object-detection-installation/ and https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/tensorflow-1.14/install.html#tf-models-install-coco ).

However, even though I was able to successfully run the files "models/research/object_detection/object_detection_tutorial.ipynb" and "models/research/object_detection/builders/model_builder_test.py", when I try to run the training have this error message:

(obj_detect_4) D:\Obj_detection_3\training>python model_main.py --logtostderr --train_dir=results/ --pipeline_config_path=ssd_inception_v2_coco.config

Instructions for updating:
Use object_detection/model_main.py.
Traceback (most recent call last):
  File "train.py", line 184, in <module>
    tf.app.run()
  File "C:\Users\vincentrm\Miniconda3\envs\obj_detect_4\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run
    _sys.exit(main(argv))
  File "C:\Users\vincentrm\Miniconda3\envs\obj_detect_4\lib\site-packages\tensorflow\python\util\deprecation.py", line 306, in new_func
    return func(*args, **kwargs)
  File "train.py", line 93, in main
    FLAGS.pipeline_config_path)
  File "C:\Users\vincentrm\Miniconda3\envs\obj_detect_4\lib\site-packages\object_detection-0.1-py3.6.egg\object_detection\utils\config_util.py", line 96, in get_configs_from_pipeline_file
    text_format.Merge(proto_str, pipeline_config)
  File "C:\Users\vincentrm\Miniconda3\envs\obj_detect_4\lib\site-packages\google\protobuf\text_format.py", line 725, in Merge
    allow_unknown_field=allow_unknown_field)
  File "C:\Users\vincentrm\Miniconda3\envs\obj_detect_4\lib\site-packages\google\protobuf\text_format.py", line 793, in MergeLines
    return parser.MergeLines(lines, message)
  File "C:\Users\vincentrm\Miniconda3\envs\obj_detect_4\lib\site-packages\google\protobuf\text_format.py", line 818, in MergeLines
    self._ParseOrMerge(lines, message)
  File "C:\Users\vincentrm\Miniconda3\envs\obj_detect_4\lib\site-packages\google\protobuf\text_format.py", line 837, in _ParseOrMerge
    self._MergeField(tokenizer, message)
  File "C:\Users\vincentrm\Miniconda3\envs\obj_detect_4\lib\site-packages\google\protobuf\text_format.py", line 967, in _MergeField
    merger(tokenizer, message, field)
  File "C:\Users\vincentrm\Miniconda3\envs\obj_detect_4\lib\site-packages\google\protobuf\text_format.py", line 1042, in _MergeMessageField
    self._MergeField(tokenizer, sub_message)
  File "C:\Users\vincentrm\Miniconda3\envs\obj_detect_4\lib\site-packages\google\protobuf\text_format.py", line 967, in _MergeField
    merger(tokenizer, message, field)
  File "C:\Users\vincentrm\Miniconda3\envs\obj_detect_4\lib\site-packages\google\protobuf\text_format.py", line 1042, in _MergeMessageField
    self._MergeField(tokenizer, sub_message)
  File "C:\Users\vincentrm\Miniconda3\envs\obj_detect_4\lib\site-packages\google\protobuf\text_format.py", line 967, in _MergeField
    merger(tokenizer, message, field)
  File "C:\Users\vincentrm\Miniconda3\envs\obj_detect_4\lib\site-packages\google\protobuf\text_format.py", line 1042, in _MergeMessageField
    self._MergeField(tokenizer, sub_message)
  File "C:\Users\vincentrm\Miniconda3\envs\obj_detect_4\lib\site-packages\google\protobuf\text_format.py", line 934, in _MergeField
    (message_descriptor.full_name, name))
google.protobuf.text_format.ParseError: 11:5 : Message type "object_detection.protos.BoxCoder" has no field named "box_coder".

The problem is probably related to the "protoc" command which seems to do nothing every time I try (nothing shows up on the command prompt). I tried different solutions like:

#From research\object_detection
object_detection/protos/*.proto --python_out=.
#From research\object_detection
for /f %i in ('dir /b object_detection\protos\*.proto') do protoc object_detection\protos\%i --python_out=.

In addition, I was able to do the final installation without a problem:

#From research
python setup.py install

Does anyone have any idea to help me solve my problem ?

Configurations:

  • Tensorflow (with gpu) 1.12.0
  • Protocol Buff 3.11.0
  • Python 3.6
  • OS: Window 10

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.