tensorflow / tensorflow/models

pad_to_multiple_resizer not recognized

Open
#9,502 3 comments 0 reactions 3 assignees View on GitHub

@pkulzc is already working on this.

Since Nov 26, 2020.

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

Description

Prerequisites

Please answer the following questions for yourself before submitting an issue.

  • [ x ] I am using the latest TensorFlow Model Garden release and TensorFlow 2.
  • [ x ] I am reporting the issue to the correct repository. (Model Garden official or research directory)
  • [ x ] I checked to make sure that this issue has not already been filed.

1. The entire URL of the file you are using

https://github.com/tensorflow/models/tree/master/research/object_detection/utils/config_util.py

2. Describe the bug

When I try to train EfficientD2 with pad_to_multiple_resizer as the image resizer option, I get

ValueError: Unknown image resizer type.

This traces back to the file above where it looks like pad_to_multiple_resizer isn't even a recognized option, the only options being fixed_shape_resizer, keep_aspect_ratio_resizer, identity_resizer and conditional_shape_resizer. However, pad_to_multiple_resizer is a valid option from the image resizer proto file. Is this simply something I'm missing, or is the option supposed to be there?

3. Steps to reproduce

Use model_main_tf2.py to train an EfficientDet D2 model with the following configurations for ssd:

...
num_classes: 5
image_resizer {
pad_to_multiple_resizer {
multiple: 256
}
}
...

4. Expected behavior

Images are fed through and resized according to the description of pad_to_multiple_resizer.

5. Additional context

ValueError: in user code:

/home/sam/models/research/object_detection/inputs.py:985 transform_and_pad_input_data_fn  *                                                                           
    tensor_dict = pad_input_data_to_static_shapes(
/home/sam/models/research/object_detection/utils/config_util.py:85 get_spatial_image_size  *                                                                          
    raise ValueError("Unknown image resizer type.")

ValueError: Unknown image resizer type.

6. System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 18.04
  • Mobile device name if the issue happens on a mobile device: N/A
  • TensorFlow installed from (source or binary): Binary
  • TensorFlow version (use command below): 2.3
  • Python version: 3.7.3
  • Bazel version (if compiling from source): N/A
  • GCC/Compiler version (if compiling from source): N/A
  • CUDA/cuDNN version: N/A (using Cloud TPU)
  • GPU model and memory: N/A

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.