Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
曾经的那一瞬间
Models
提交
ed0d9c71
M
Models
项目概览
曾经的那一瞬间
/
Models
12 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
ed0d9c71
编写于
6月 07, 2022
作者:
F
Fan Yang
提交者:
A. Unique TensorFlower
6月 07, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
MobileNetV2 backbone for maskrcnn.
PiperOrigin-RevId: 453472688
上级
cb386cfb
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
108 addition
and
0 deletion
+108
-0
official/vision/configs/experiments/maskrcnn/coco_mobilenetv2_mrcnn_tpu.yaml
...figs/experiments/maskrcnn/coco_mobilenetv2_mrcnn_tpu.yaml
+20
-0
official/vision/configs/maskrcnn.py
official/vision/configs/maskrcnn.py
+88
-0
未找到文件。
official/vision/configs/experiments/maskrcnn/coco_mobilenetv2_mrcnn_tpu.yaml
0 → 100644
浏览文件 @
ed0d9c71
# Expect to reach: box mAP: 33.3%, mask mAP: 29.4% on COCO
runtime
:
distribution_strategy
:
'
tpu'
mixed_precision_dtype
:
'
bfloat16'
task
:
init_checkpoint
:
gs://**/mobilenetv2_gpu/22984194/ckpt-625500
init_checkpoint_modules
:
'
backbone'
train_data
:
parser
:
aug_rand_hflip
:
true
aug_scale_min
:
0.1
aug_scale_max
:
2.0
losses
:
l2_weight_decay
:
0.00004
model
:
anchor
:
anchor_size
:
3.0
num_scales
:
3
detection_generator
:
pre_nms_top_k
:
1000
official/vision/configs/maskrcnn.py
浏览文件 @
ed0d9c71
...
...
@@ -524,3 +524,91 @@ def cascadercnn_spinenet_coco() -> cfg.ExperimentConfig:
'task.model.max_level == task.model.backbone.spinenet.max_level'
,
])
return
config
@
exp_factory
.
register_config_factory
(
'maskrcnn_mobilenet_coco'
)
def
maskrcnn_mobilenet_coco
()
->
cfg
.
ExperimentConfig
:
"""COCO object detection with Mask R-CNN with MobileNet backbone."""
steps_per_epoch
=
232
coco_val_samples
=
5000
train_batch_size
=
512
eval_batch_size
=
512
config
=
cfg
.
ExperimentConfig
(
runtime
=
cfg
.
RuntimeConfig
(
mixed_precision_dtype
=
'bfloat16'
),
task
=
MaskRCNNTask
(
annotation_file
=
os
.
path
.
join
(
COCO_INPUT_PATH_BASE
,
'instances_val2017.json'
),
model
=
MaskRCNN
(
backbone
=
backbones
.
Backbone
(
type
=
'mobilenet'
,
mobilenet
=
backbones
.
MobileNet
(
model_id
=
'MobileNetV2'
)),
decoder
=
decoders
.
Decoder
(
type
=
'fpn'
,
fpn
=
decoders
.
FPN
(
num_filters
=
128
,
use_separable_conv
=
True
)),
rpn_head
=
RPNHead
(
use_separable_conv
=
True
,
num_filters
=
128
),
# 1/2 of original channels.
detection_head
=
DetectionHead
(
use_separable_conv
=
True
,
num_filters
=
128
,
fc_dims
=
512
),
# 1/2 of original channels.
mask_head
=
MaskHead
(
use_separable_conv
=
True
,
num_filters
=
128
),
# 1/2 of original channels.
anchor
=
Anchor
(
anchor_size
=
3
),
norm_activation
=
common
.
NormActivation
(
activation
=
'relu6'
,
norm_momentum
=
0.99
,
norm_epsilon
=
0.001
,
use_sync_bn
=
True
),
num_classes
=
91
,
input_size
=
[
512
,
512
,
3
],
min_level
=
3
,
max_level
=
6
,
include_mask
=
True
),
losses
=
Losses
(
l2_weight_decay
=
0.00004
),
train_data
=
DataConfig
(
input_path
=
os
.
path
.
join
(
COCO_INPUT_PATH_BASE
,
'train*'
),
is_training
=
True
,
global_batch_size
=
train_batch_size
,
parser
=
Parser
(
aug_rand_hflip
=
True
,
aug_scale_min
=
0.5
,
aug_scale_max
=
2.0
)),
validation_data
=
DataConfig
(
input_path
=
os
.
path
.
join
(
COCO_INPUT_PATH_BASE
,
'val*'
),
is_training
=
False
,
global_batch_size
=
eval_batch_size
,
drop_remainder
=
False
)),
trainer
=
cfg
.
TrainerConfig
(
train_steps
=
steps_per_epoch
*
350
,
validation_steps
=
coco_val_samples
//
eval_batch_size
,
validation_interval
=
steps_per_epoch
,
steps_per_loop
=
steps_per_epoch
,
summary_interval
=
steps_per_epoch
,
checkpoint_interval
=
steps_per_epoch
,
optimizer_config
=
optimization
.
OptimizationConfig
({
'optimizer'
:
{
'type'
:
'sgd'
,
'sgd'
:
{
'momentum'
:
0.9
}
},
'learning_rate'
:
{
'type'
:
'stepwise'
,
'stepwise'
:
{
'boundaries'
:
[
steps_per_epoch
*
320
,
steps_per_epoch
*
340
],
'values'
:
[
0.32
,
0.032
,
0.0032
],
}
},
'warmup'
:
{
'type'
:
'linear'
,
'linear'
:
{
'warmup_steps'
:
2000
,
'warmup_learning_rate'
:
0.0067
}
}
})),
restrictions
=
[
'task.train_data.is_training != None'
,
'task.validation_data.is_training != None'
,
])
return
config
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录