Open SamLee514 opened 4 years ago
similar situation here. @SamLee514 did you get any workaround?
@aii-jayson unfortunately not :(, just been working with other models in the meantime
I also have the same issue. What I found, however, is that you can build the model with the pad_to_multiple_resizer
.
My (temporary) fix is to train using one of the available resizer, provided the pre-processed shape is close to what you expect during inference, then export the model with a config_override
, overriding the image resizer with pad_to_multiple_resizer
. Of course, this is not really a general fix.
NB: The specific line(s) where all options are indicated: https://github.com/tensorflow/models/blob/master/research/object_detection/utils/config_util.py#L58
Prerequisites
Please answer the following questions for yourself before submitting an issue.
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:
6. System information