Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
曾经的那一瞬间
Models
提交
4b617781
M
Models
项目概览
曾经的那一瞬间
/
Models
大约 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
Models
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4b617781
编写于
9月 17, 2021
作者:
A
A. Unique TensorFlower
提交者:
TF Object Detection Team
9月 17, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
INTERNAL CHANGE.
PiperOrigin-RevId: 397358689
上级
b656833a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
33 addition
and
7 deletion
+33
-7
research/object_detection/builders/model_builder.py
research/object_detection/builders/model_builder.py
+17
-6
research/object_detection/builders/model_builder_tf2_test.py
research/object_detection/builders/model_builder_tf2_test.py
+16
-1
未找到文件。
research/object_detection/builders/model_builder.py
浏览文件 @
4b617781
...
...
@@ -1182,13 +1182,24 @@ def _build_center_net_feature_extractor(feature_extractor_config, is_training):
list
(
feature_extractor_config
.
channel_stds
),
'bgr_ordering'
:
feature_extractor_config
.
bgr_ordering
,
'depth_multiplier'
:
feature_extractor_config
.
depth_multiplier
,
'use_separable_conv'
:
use_separable_conv
,
'upsampling_interpolation'
:
feature_extractor_config
.
upsampling_interpolation
,
}
if
feature_extractor_config
.
HasField
(
'depth_multiplier'
):
kwargs
.
update
({
'depth_multiplier'
:
feature_extractor_config
.
depth_multiplier
,
})
if
feature_extractor_config
.
HasField
(
'use_separable_conv'
):
kwargs
.
update
({
'use_separable_conv'
:
use_separable_conv
,
})
if
feature_extractor_config
.
HasField
(
'upsampling_interpolation'
):
kwargs
.
update
({
'upsampling_interpolation'
:
feature_extractor_config
.
upsampling_interpolation
,
})
if
feature_extractor_config
.
HasField
(
'use_depthwise'
):
kwargs
.
update
({
'use_depthwise'
:
feature_extractor_config
.
use_depthwise
,
})
return
CENTER_NET_EXTRACTOR_FUNCTION_MAP
[
feature_extractor_config
.
type
](
...
...
research/object_detection/builders/model_builder_tf2_test.py
浏览文件 @
4b617781
...
...
@@ -476,7 +476,7 @@ class ModelBuilderTF2Test(
num_classes: 10
feature_extractor {
type: "mobilenet_v2_fpn"
depth_multiplier:
1
.0
depth_multiplier:
2
.0
use_separable_conv: true
upsampling_interpolation: "bilinear"
}
...
...
@@ -513,6 +513,21 @@ class ModelBuilderTF2Test(
# Verify that there are up_sampling2d layers.
self
.
assertGreater
(
num_up_sampling2d_layers
,
0
)
# Verify that the FPN ops uses separable conv.
for
layer
in
fpn
.
layers
:
# Convolution layers with kernel size not equal to (1, 1) should be
# separable 2D convolutions.
if
'conv'
in
layer
.
name
and
layer
.
kernel_size
!=
(
1
,
1
):
self
.
assertIsInstance
(
layer
,
tf
.
keras
.
layers
.
SeparableConv2D
)
# Verify that the backbone indeed double the number of channel according to
# the depthmultiplier.
backbone
=
feature_extractor
.
get_layer
(
'model'
)
first_conv
=
backbone
.
get_layer
(
'Conv1'
)
# Note that the first layer typically has 32 filters, but this model has
# a depth multiplier of 2.
self
.
assertEqual
(
64
,
first_conv
.
filters
)
def
test_create_center_net_deepmac
(
self
):
"""Test building a CenterNet DeepMAC model."""
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录