Skip to content

[object_dection] ValueError: Unknown field replace_preprocessor_with_placeholder #7107

@hoonkai

Description

@hoonkai

#6799 # System information

  • What is the top-level directory of the model you are using: object_detection
  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): OSX 10.13.6
  • TensorFlow installed from (source or binary): source
  • TensorFlow version (use command below): r1.13
  • Bazel version (if compiling from source): n/a
  • CUDA/cuDNN version: n/a
  • GPU model and memory: n/a
  • Exact command to reproduce: python object_detection/builders/model_builder_test.py

Describe the problem

I followed https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/installation.md and installed protobuf using brew install protobuf

$protoc --version
libprotoc 3.7.1

But python object_detection/builders/model_builder_test.py gives:

WARNING: The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:
  * https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
  * https://github.com/tensorflow/addons
If you depend on functionality not listed there, please file an issue.

EEEEEEEE....s...
======================================================================
ERROR: test_create_faster_rcnn_model_from_config_with_example_miner (__main__.ModelBuilderTest)
test_create_faster_rcnn_model_from_config_with_example_miner (__main__.ModelBuilderTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "object_detection/builders/model_builder_test.py", line 264, in test_create_faster_rcnn_model_from_config_with_example_miner
    model = model_builder.build(model_proto, is_training=True)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/model_builder.py", line 135, in build
    add_summaries)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/model_builder.py", line 518, in _build_faster_rcnn_model
    ) = post_processing_builder.build(frcnn_config.second_stage_post_processing)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/post_processing_builder.py", line 59, in build
    post_processing_config.batch_non_max_suppression)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/post_processing_builder.py", line 95, in _build_non_max_suppressor
    use_class_agnostic_nms=nms_config.use_class_agnostic_nms,
AttributeError: 'BatchNonMaxSuppression' object has no attribute 'use_class_agnostic_nms'

======================================================================
ERROR: test_create_faster_rcnn_models_from_config_faster_rcnn_with_matmul (__main__.ModelBuilderTest)
test_create_faster_rcnn_models_from_config_faster_rcnn_with_matmul (__main__.ModelBuilderTest)
test_create_faster_rcnn_models_from_config_faster_rcnn_with_matmul(use_matmul_crop_and_resize=False, enable_mask_prediction=False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Volumes/Data/Projects/tensorflow-models-py3/lib/python3.6/site-packages/absl/testing/parameterized.py", line 262, in bound_param_test
    test_method(self, **testcase_params)
  File "object_detection/builders/model_builder_test.py", line 255, in test_create_faster_rcnn_models_from_config
    model = model_builder.build(model_proto, is_training=True)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/model_builder.py", line 135, in build
    add_summaries)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/model_builder.py", line 518, in _build_faster_rcnn_model
    ) = post_processing_builder.build(frcnn_config.second_stage_post_processing)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/post_processing_builder.py", line 59, in build
    post_processing_config.batch_non_max_suppression)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/post_processing_builder.py", line 95, in _build_non_max_suppressor
    use_class_agnostic_nms=nms_config.use_class_agnostic_nms,
AttributeError: 'BatchNonMaxSuppression' object has no attribute 'use_class_agnostic_nms'

======================================================================
ERROR: test_create_faster_rcnn_models_from_config_faster_rcnn_without_matmul (__main__.ModelBuilderTest)
test_create_faster_rcnn_models_from_config_faster_rcnn_without_matmul (__main__.ModelBuilderTest)
test_create_faster_rcnn_models_from_config_faster_rcnn_without_matmul(use_matmul_crop_and_resize=True, enable_mask_prediction=False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Volumes/Data/Projects/tensorflow-models-py3/lib/python3.6/site-packages/absl/testing/parameterized.py", line 262, in bound_param_test
    test_method(self, **testcase_params)
  File "object_detection/builders/model_builder_test.py", line 255, in test_create_faster_rcnn_models_from_config
    model = model_builder.build(model_proto, is_training=True)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/model_builder.py", line 135, in build
    add_summaries)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/model_builder.py", line 518, in _build_faster_rcnn_model
    ) = post_processing_builder.build(frcnn_config.second_stage_post_processing)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/post_processing_builder.py", line 59, in build
    post_processing_config.batch_non_max_suppression)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/post_processing_builder.py", line 95, in _build_non_max_suppressor
    use_class_agnostic_nms=nms_config.use_class_agnostic_nms,
AttributeError: 'BatchNonMaxSuppression' object has no attribute 'use_class_agnostic_nms'

======================================================================
ERROR: test_create_faster_rcnn_models_from_config_mask_rcnn_with_matmul (__main__.ModelBuilderTest)
test_create_faster_rcnn_models_from_config_mask_rcnn_with_matmul (__main__.ModelBuilderTest)
test_create_faster_rcnn_models_from_config_mask_rcnn_with_matmul(use_matmul_crop_and_resize=False, enable_mask_prediction=True)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Volumes/Data/Projects/tensorflow-models-py3/lib/python3.6/site-packages/absl/testing/parameterized.py", line 262, in bound_param_test
    test_method(self, **testcase_params)
  File "object_detection/builders/model_builder_test.py", line 255, in test_create_faster_rcnn_models_from_config
    model = model_builder.build(model_proto, is_training=True)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/model_builder.py", line 135, in build
    add_summaries)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/model_builder.py", line 518, in _build_faster_rcnn_model
    ) = post_processing_builder.build(frcnn_config.second_stage_post_processing)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/post_processing_builder.py", line 59, in build
    post_processing_config.batch_non_max_suppression)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/post_processing_builder.py", line 95, in _build_non_max_suppressor
    use_class_agnostic_nms=nms_config.use_class_agnostic_nms,
AttributeError: 'BatchNonMaxSuppression' object has no attribute 'use_class_agnostic_nms'

======================================================================
ERROR: test_create_faster_rcnn_models_from_config_mask_rcnn_without_matmul (__main__.ModelBuilderTest)
test_create_faster_rcnn_models_from_config_mask_rcnn_without_matmul (__main__.ModelBuilderTest)
test_create_faster_rcnn_models_from_config_mask_rcnn_without_matmul(use_matmul_crop_and_resize=True, enable_mask_prediction=True)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Volumes/Data/Projects/tensorflow-models-py3/lib/python3.6/site-packages/absl/testing/parameterized.py", line 262, in bound_param_test
    test_method(self, **testcase_params)
  File "object_detection/builders/model_builder_test.py", line 255, in test_create_faster_rcnn_models_from_config
    model = model_builder.build(model_proto, is_training=True)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/model_builder.py", line 135, in build
    add_summaries)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/model_builder.py", line 518, in _build_faster_rcnn_model
    ) = post_processing_builder.build(frcnn_config.second_stage_post_processing)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/post_processing_builder.py", line 59, in build
    post_processing_config.batch_non_max_suppression)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/post_processing_builder.py", line 95, in _build_non_max_suppressor
    use_class_agnostic_nms=nms_config.use_class_agnostic_nms,
AttributeError: 'BatchNonMaxSuppression' object has no attribute 'use_class_agnostic_nms'

======================================================================
ERROR: test_create_rfcn_model_from_config (__main__.ModelBuilderTest)
test_create_rfcn_model_from_config (__main__.ModelBuilderTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "object_detection/builders/model_builder_test.py", line 275, in test_create_rfcn_model_from_config
    model = model_builder.build(model_proto, is_training=True)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/model_builder.py", line 135, in build
    add_summaries)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/model_builder.py", line 518, in _build_faster_rcnn_model
    ) = post_processing_builder.build(frcnn_config.second_stage_post_processing)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/post_processing_builder.py", line 59, in build
    post_processing_config.batch_non_max_suppression)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/post_processing_builder.py", line 95, in _build_non_max_suppressor
    use_class_agnostic_nms=nms_config.use_class_agnostic_nms,
AttributeError: 'BatchNonMaxSuppression' object has no attribute 'use_class_agnostic_nms'

======================================================================
ERROR: test_create_ssd_fpn_model_from_config (__main__.ModelBuilderTest)
test_create_ssd_fpn_model_from_config (__main__.ModelBuilderTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "object_detection/builders/model_builder_test.py", line 212, in test_create_ssd_fpn_model_from_config
    model = model_builder.build(model_proto, is_training=True)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/model_builder.py", line 132, in build
    return _build_ssd_model(model_config.ssd, is_training, add_summaries)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/model_builder.py", line 255, in _build_ssd_model
    is_training=is_training)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/model_builder.py", line 203, in _build_ssd_feature_extractor
    if feature_extractor_config.HasField('replace_preprocessor_with_placeholder'):
ValueError: Unknown field replace_preprocessor_with_placeholder.

======================================================================
ERROR: test_create_ssd_models_from_config (__main__.ModelBuilderTest)
test_create_ssd_models_from_config (__main__.ModelBuilderTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "object_detection/builders/model_builder_test.py", line 203, in test_create_ssd_models_from_config
    model = model_builder.build(model_proto, is_training=True)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/model_builder.py", line 132, in build
    return _build_ssd_model(model_config.ssd, is_training, add_summaries)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/model_builder.py", line 255, in _build_ssd_model
    is_training=is_training)
  File "/Volumes/Data/Projects/tensorflow-models-py3/src/models/research/object_detection/builders/model_builder.py", line 203, in _build_ssd_feature_extractor
    if feature_extractor_config.HasField('replace_preprocessor_with_placeholder'):
ValueError: Unknown field replace_preprocessor_with_placeholder.

----------------------------------------------------------------------
Ran 16 tests in 0.059s

FAILED (errors=8, skipped=1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions