Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
please set 'STRIDE_IN_1X1' to be 'False' when backbone uses GN (#465)
Browse files Browse the repository at this point in the history
* make pixel indexes 0-based for bounding box in pascal voc dataset

* replacing all instances of torch.distributed.deprecated with torch.distributed

* replacing all instances of torch.distributed.deprecated with torch.distributed

* add GroupNorm

* add GroupNorm -- sort out yaml files

* use torch.nn.GroupNorm instead, replace 'use_gn' with 'conv_block' and use 'BaseStem'&'Bottleneck' to simply codes

* modification on 'group_norm' and 'conv_with_kaiming_uniform' function

* modification on yaml files in configs/gn_baselines/ and reduce the amount of indentation and code duplication

* use 'kaiming_uniform' to initialize resnet, disable gn after fc layer, and add dilation into ResNetHead

* agnostic-regression for bbox

* please set 'STRIDE_IN_1X1' to be 'False' when backbone use GN
  • Loading branch information
zimenglan-sysu-512 authored and fmassa committed Feb 19, 2019
1 parent f8b0118 commit 192261d
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 6 deletions.
1 change: 1 addition & 0 deletions configs/gn_baselines/e2e_faster_rcnn_R_50_FPN_1x_gn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ MODEL:
CONV_BODY: "R-50-FPN"
OUT_CHANNELS: 256
RESNETS: # use GN for backbone
STRIDE_IN_1X1: False
TRANS_FUNC: "BottleneckWithGN"
STEM_FUNC: "StemWithGN"
FPN:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ MODEL:
CONV_BODY: "R-50-FPN"
OUT_CHANNELS: 256
RESNETS: # use GN for backbone
STRIDE_IN_1X1: False
TRANS_FUNC: "BottleneckWithGN"
STEM_FUNC: "StemWithGN"
FPN:
Expand Down Expand Up @@ -47,4 +48,4 @@ SOLVER:
MAX_ITER: 90000
IMS_PER_BATCH: 16
TEST:
IMS_PER_BATCH: 8
IMS_PER_BATCH: 8
3 changes: 2 additions & 1 deletion configs/gn_baselines/e2e_mask_rcnn_R_50_FPN_1x_gn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ MODEL:
CONV_BODY: "R-50-FPN"
OUT_CHANNELS: 256
RESNETS: # use GN for backbone
STRIDE_IN_1X1: False
TRANS_FUNC: "BottleneckWithGN"
STEM_FUNC: "StemWithGN"
FPN:
Expand Down Expand Up @@ -56,4 +57,4 @@ SOLVER:
MAX_ITER: 90000
IMS_PER_BATCH: 16
TEST:
IMS_PER_BATCH: 8
IMS_PER_BATCH: 8
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ MODEL:
CONV_BODY: "R-50-FPN"
OUT_CHANNELS: 256
RESNETS: # use GN for backbone
STRIDE_IN_1X1: False
TRANS_FUNC: "BottleneckWithGN"
STEM_FUNC: "StemWithGN"
FPN:
Expand Down Expand Up @@ -58,4 +59,4 @@ SOLVER:
MAX_ITER: 90000
IMS_PER_BATCH: 16
TEST:
IMS_PER_BATCH: 8
IMS_PER_BATCH: 8
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ MODEL:
OUT_CHANNELS: 256
FREEZE_CONV_BODY_AT: 0 # finetune all layers
RESNETS: # use GN for backbone
STRIDE_IN_1X1: False
TRANS_FUNC: "BottleneckWithGN"
STEM_FUNC: "StemWithGN"
FPN:
Expand Down Expand Up @@ -46,4 +47,4 @@ SOLVER:
MAX_ITER: 270000
IMS_PER_BATCH: 16
TEST:
IMS_PER_BATCH: 8
IMS_PER_BATCH: 8
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ MODEL:
OUT_CHANNELS: 256
FREEZE_CONV_BODY_AT: 0 # finetune all layers
RESNETS: # use GN for backbone
STRIDE_IN_1X1: False
TRANS_FUNC: "BottleneckWithGN"
STEM_FUNC: "StemWithGN"
FPN:
Expand Down Expand Up @@ -48,4 +49,4 @@ SOLVER:
MAX_ITER: 270000
IMS_PER_BATCH: 16
TEST:
IMS_PER_BATCH: 8
IMS_PER_BATCH: 8
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ MODEL:
OUT_CHANNELS: 256
FREEZE_CONV_BODY_AT: 0 # finetune all layers
RESNETS: # use GN for backbone
STRIDE_IN_1X1: False
TRANS_FUNC: "BottleneckWithGN"
STEM_FUNC: "StemWithGN"
FPN:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ MODEL:
OUT_CHANNELS: 256
FREEZE_CONV_BODY_AT: 0 # finetune all layers
RESNETS: # use GN for backbone
STRIDE_IN_1X1: False
TRANS_FUNC: "BottleneckWithGN"
STEM_FUNC: "StemWithGN"
FPN:
Expand Down Expand Up @@ -59,4 +60,4 @@ SOLVER:
MAX_ITER: 270000
IMS_PER_BATCH: 16
TEST:
IMS_PER_BATCH: 8
IMS_PER_BATCH: 8

0 comments on commit 192261d

Please sign in to comment.