Commit 2334ca17 authored by Yuxin Wu's avatar Yuxin Wu

[MaskRCNN] add stride1x1, update table

parent 2b94b70e
......@@ -62,16 +62,17 @@ Evaluation or prediction will need the same config used during training.
These models are trained with different configurations on trainval35k and evaluated on minival using mAP@IoU=0.50:0.95.
MaskRCNN results contain both bbox and segm mAP.
|Backbone|`FASTRCNN_BATCH`|resolution |schedule|mAP (bbox/segm)|Time |
| - | - | - | - | - | - |
|R50-C4 |64 |(600, 1024)|280k |33.1 |18h on 8 V100s|
|R50-C4 |512 |(800, 1333)|360k |36.6 |49h on 8 V100s|
|R50-FPN |512 |(800, 1333)|360k |37.5 |28h on 8 V100s|
|R50-C4 |256 |(800, 1333)|280k |36.8/32.1 |39h on 8 P100s|
|R50-C4 |512 |(800, 1333)|360k |37.8/33.1 |51h on 8 V100s|
|R50-FPN |512 |(800, 1333)|360k |38.1/34.9 |38h on 8 V100s|
|R101-C4 |512 |(800, 1333)|280k |40.1/34.4 |70h on 8 P100s|
|R101-C4 |512 |(800, 1333)|360k |40.8/35.1 |63h on 8 V100s|
| Backbone | mAP<br/>(box/mask) | Detectron mAP <br/> (box/mask) | Time | Configurations <br/> (click to expand) |
| - | - | - | - | - |
| R50-C4 | 33.1 | | 18h on 8 V100s | <details><summary>super quick</summary>`MODE_MASK=False FRCNN.BATCH_PER_IM=64 PREPROC.SHORT_EDGE_SIZE=600 PREPROC.MAX_SIZE=1024 TRAIN.LR_SCHEDULE=[150000,230000,280000]` </details> |
| R50-C4 | 36.6 | 36.5 | 49h on 8 V100s | <details><summary>standard</summary>`MODE_MASK=False` </details> |
| R50-FPN | 37.5 | 37.9<sup>[1](#ft1)</sup> | 28h on 8 V100s | <details><summary>standard</summary>`MODE_MASK=False MODE_FPN=True` </details> |
| R50-C4 | 36.8/32.1 | | 39h on 8 P100s | <details><summary>quick</summary>`MODE_MASK=True FRCNN.BATCH_PER_IM=256 TRAIN.LR_SCHEDULE=[150000,230000,280000]` </details> |
| R50-C4 | 37.8/33.1 | 37.8/32.8 | 51h on 8 V100s | <details><summary>standard</summary>`MODE_MASK=True` </details> |
| R50-FPN | 38.1/34.9 | 38.6/34.5<sup>[1](#ft1)</sup> | 38h on 8 V100s | <details><summary>standard</summary>`MODE_MASK=True MODE_FPN=True` </details> |
| R101-C4 | 40.8/35.1 | | 63h on 8 V100s | <details><summary>standard</summary>`MODE_MASK=True BACKBONE.RESNET_NUM_BLOCK=[3,4,23,3]` </details> |
<a id="ft1">1</a>: Slightly different configurations.
The two R50-C4 360k models have the same configuration __and mAP__
as the `R50-C4-2x` entries in
......
......@@ -85,8 +85,14 @@ def resnet_shortcut(l, n_out, stride, activation=tf.identity):
def resnet_bottleneck(l, ch_out, stride):
l, shortcut = l, l
l = Conv2D('conv1', l, ch_out, 1, activation=BNReLU)
shortcut = l
if cfg.BACKBONE.STRIDE_1X1:
if stride == 2:
l = l[:, :, :-1, :-1]
l = Conv2D('conv1', l, ch_out, 1, strides=stride, activation=BNReLU)
l = Conv2D('conv2', l, ch_out, 3, strides=1, activation=BNReLU)
else:
l = Conv2D('conv1', l, ch_out, 1, strides=1, activation=BNReLU)
if stride == 2:
l = tf.pad(l, [[0, 0], [0, 0], maybe_reverse_pad(0, 1), maybe_reverse_pad(0, 1)])
l = Conv2D('conv2', l, ch_out, 3, strides=2, activation=BNReLU, padding='VALID')
......
......@@ -72,6 +72,7 @@ _C.BACKBONE.NORM = 'FreezeBN' # options: FreezeBN, SyncBN
# We will eventually switch to TF_PAD_MODE=False.
# See https://github.com/tensorflow/tensorflow/issues/18213
_C.BACKBONE.TF_PAD_MODE = True
_C.BACKBONE.STRIDE_1X1 = False # True for MSRA models
# schedule -----------------------
# The schedule and learning rate here is defined for a total batch size of 8.
......@@ -82,7 +83,6 @@ _C.TRAIN.BASE_LR = 1e-2
_C.TRAIN.WARMUP = 1000 # in steps
_C.TRAIN.STEPS_PER_EPOCH = 500
# LR_SCHEDULE = [120000, 160000, 180000] # "1x" schedule in detectron
# LR_SCHEDULE = [150000, 230000, 280000] # roughly a "1.5x" schedule
_C.TRAIN.LR_SCHEDULE = [240000, 320000, 360000] # "2x" schedule in detectron
# preprocessing --------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment