Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
f281248c
Commit
f281248c
authored
Apr 12, 2021
by
Ronny Votel
Committed by
TF Object Detection Team
Apr 12, 2021
Browse files
Update model builder to be backwards compatible with mobilenet_v2_fpn_sep_conv
PiperOrigin-RevId: 368024164
parent
f2d90e1a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
research/object_detection/builders/model_builder.py
research/object_detection/builders/model_builder.py
+7
-1
No files found.
research/object_detection/builders/model_builder.py
View file @
f281248c
...
...
@@ -170,6 +170,8 @@ if tf_version.is_tf2():
center_net_mobilenet_v2_feature_extractor
.
mobilenet_v2
,
'mobilenet_v2_fpn'
:
center_net_mobilenet_v2_fpn_feature_extractor
.
mobilenet_v2_fpn
,
'mobilenet_v2_fpn_sep_conv'
:
center_net_mobilenet_v2_fpn_feature_extractor
.
mobilenet_v2_fpn
,
}
FEATURE_EXTRACTOR_MAPS
=
[
...
...
@@ -1123,12 +1125,16 @@ def _build_center_net_feature_extractor(feature_extractor_config, is_training):
if
feature_extractor_config
.
type
not
in
CENTER_NET_EXTRACTOR_FUNCTION_MAP
:
raise
ValueError
(
'
\'
{}
\'
is not a known CenterNet feature extractor type'
.
format
(
feature_extractor_config
.
type
))
# For backwards compatibility:
use_separable_conv
=
(
feature_extractor_config
.
use_separable_conv
or
feature_extractor_config
.
type
==
'mobilenet_v2_fpn_sep_conv'
)
kwargs
=
{
'channel_means'
:
list
(
feature_extractor_config
.
channel_means
),
'channel_stds'
:
list
(
feature_extractor_config
.
channel_stds
),
'bgr_ordering'
:
feature_extractor_config
.
bgr_ordering
,
'depth_multiplier'
:
feature_extractor_config
.
depth_multiplier
,
'use_separable_conv'
:
feature_extractor_config
.
use_separable_conv
,
'use_separable_conv'
:
use_separable_conv
,
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment