tensorflow / tensorflow/models

Adding explicit_padding to EfficientDet model

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

Nobody has claimed this yet.

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

Description

Prerequisites

1. The entire URL of the file you are using

https://github.com/tensorflow/models/blob/master/research/object_detection/models/ssd_efficientnet_bifpn_feature_extractor.py

2. Describe the feature you request

Currently, in ssd_efficientnet_bifpn_feature_extractor.py

https://github.com/tensorflow/models/blob/83b2ad3bf9557ec684c80d5e1760887f847b6ab6/research/object_detection/models/ssd_efficientnet_bifpn_feature_extractor.py#L101-L102

it says that using the use_explicit_padding parameter is unsupported by EfficientNetBiFPN.

I would like to be able to use the explicit_padding option with the EfficientDet model. Not sure if this is a limitation of the EfficientDet model, or it just hasn't been implemented yet.

3. Additional context

In order to make the model invariant to the input image size, I usually use a combination of FlexibleAnchorGenerator and explicit_padding. I previously used this successfully in the TF1 models such as ssd_mobilenet_v2_fpn. Now I'm trying to achieve the same behavior using TF2 OD API and EfficientDet model, but I found that use_explicit_padding is not supported in the EfficientDet model.

I tried to implement this on my own, but when I add the padding layers to efficientnet_model.py similar to how it's already done in mobilenet_v2.py, I get errors when loading the weights from the ModelZoo checkpoint, and I'm not sure how to fix it.
Additionally, the structure or the ssd_efficientnet_feature_extractor.py and bidirectional_feature_pyramid_generators.py is quite different from the corresponding files for ssd_mobilenet_v2_fpn, which makes it difficult to figure out where the padding has to be applied.

4. Are you willing to contribute it? (Yes or No)

Yes, but will need some guidance.

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.