This repository has been archived by the owner on Nov 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Add GroupNorm support to master Detectron. Reviewed By: rbgirshick Differential Revision: D7611892 fbshipit-source-id: dc4fb84a0e2167b05fd8a94ee0ff1ab1c21369b7
- Loading branch information
1 parent
0fda5f9
commit c7692eb
Showing
15 changed files
with
787 additions
and
43 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
configs/04_2018_gn_baselines/e2e_mask_rcnn_R-101-FPN_2x_gn.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
MODEL: | ||
TYPE: generalized_rcnn | ||
CONV_BODY: FPN.add_fpn_ResNet101_conv5_body | ||
NUM_CLASSES: 81 | ||
FASTER_RCNN: True | ||
MASK_ON: True | ||
NUM_GPUS: 8 | ||
SOLVER: | ||
WEIGHT_DECAY: 0.0001 | ||
LR_POLICY: steps_with_decay | ||
BASE_LR: 0.02 | ||
GAMMA: 0.1 | ||
MAX_ITER: 180000 | ||
STEPS: [0, 120000, 160000] | ||
FPN: | ||
FPN_ON: True | ||
MULTILEVEL_ROIS: True | ||
MULTILEVEL_RPN: True | ||
USE_GN: True # Note: use GN on the FPN-specific layers | ||
RESNETS: | ||
STRIDE_1X1: False # default True for MSRA; False for C2 or Torch models | ||
TRANS_FUNC: bottleneck_gn_transformation # Note: this is a GN bottleneck transform | ||
STEM_FUNC: basic_gn_stem # Note: this is a GN stem | ||
SHORTCUT_FUNC: basic_gn_shortcut # Note: this is a GN shortcut | ||
FAST_RCNN: | ||
ROI_BOX_HEAD: fast_rcnn_heads.add_roi_Xconv1fc_gn_head # Note: this is a Conv GN head | ||
ROI_XFORM_METHOD: RoIAlign | ||
ROI_XFORM_RESOLUTION: 7 | ||
ROI_XFORM_SAMPLING_RATIO: 2 | ||
MRCNN: | ||
ROI_MASK_HEAD: mask_rcnn_heads.mask_rcnn_fcn_head_v1up4convs_gn # Note: this is a GN mask head | ||
RESOLUTION: 28 # (output mask resolution) default 14 | ||
ROI_XFORM_METHOD: RoIAlign | ||
ROI_XFORM_RESOLUTION: 14 # default 7 | ||
ROI_XFORM_SAMPLING_RATIO: 2 # default 0 | ||
DILATION: 1 # default 2 | ||
CONV_INIT: MSRAFill # default GaussianFill | ||
TRAIN: | ||
WEIGHTS: https://s3-us-west-2.amazonaws.com/detectron/ImageNetPretrained/47592356/R-101-GN.pkl # Note: a GN pre-trained model | ||
DATASETS: ('coco_2014_train', 'coco_2014_valminusminival') | ||
SCALES: (800,) | ||
MAX_SIZE: 1333 | ||
BATCH_SIZE_PER_IM: 512 | ||
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level | ||
TEST: | ||
DATASETS: ('coco_2014_minival',) | ||
SCALE: 800 | ||
MAX_SIZE: 1333 | ||
NMS: 0.5 | ||
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level | ||
RPN_POST_NMS_TOP_N: 1000 | ||
OUTPUT_DIR: . |
52 changes: 52 additions & 0 deletions
52
configs/04_2018_gn_baselines/e2e_mask_rcnn_R-101-FPN_3x_gn.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
MODEL: | ||
TYPE: generalized_rcnn | ||
CONV_BODY: FPN.add_fpn_ResNet101_conv5_body | ||
NUM_CLASSES: 81 | ||
FASTER_RCNN: True | ||
MASK_ON: True | ||
NUM_GPUS: 8 | ||
SOLVER: | ||
WEIGHT_DECAY: 0.0001 | ||
LR_POLICY: steps_with_decay | ||
BASE_LR: 0.02 | ||
GAMMA: 0.1 | ||
MAX_ITER: 270000 | ||
STEPS: [0, 210000, 250000] | ||
FPN: | ||
FPN_ON: True | ||
MULTILEVEL_ROIS: True | ||
MULTILEVEL_RPN: True | ||
USE_GN: True # Note: use GN on the FPN-specific layers | ||
RESNETS: | ||
STRIDE_1X1: False # default True for MSRA; False for C2 or Torch models | ||
TRANS_FUNC: bottleneck_gn_transformation # Note: this is a GN bottleneck transform | ||
STEM_FUNC: basic_gn_stem # Note: this is a GN stem | ||
SHORTCUT_FUNC: basic_gn_shortcut # Note: this is a GN shortcut | ||
FAST_RCNN: | ||
ROI_BOX_HEAD: fast_rcnn_heads.add_roi_Xconv1fc_gn_head # Note: this is a Conv GN head | ||
ROI_XFORM_METHOD: RoIAlign | ||
ROI_XFORM_RESOLUTION: 7 | ||
ROI_XFORM_SAMPLING_RATIO: 2 | ||
MRCNN: | ||
ROI_MASK_HEAD: mask_rcnn_heads.mask_rcnn_fcn_head_v1up4convs_gn # Note: this is a GN mask head | ||
RESOLUTION: 28 # (output mask resolution) default 14 | ||
ROI_XFORM_METHOD: RoIAlign | ||
ROI_XFORM_RESOLUTION: 14 # default 7 | ||
ROI_XFORM_SAMPLING_RATIO: 2 # default 0 | ||
DILATION: 1 # default 2 | ||
CONV_INIT: MSRAFill # default GaussianFill | ||
TRAIN: | ||
WEIGHTS: https://s3-us-west-2.amazonaws.com/detectron/ImageNetPretrained/47592356/R-101-GN.pkl # Note: a GN pre-trained model | ||
DATASETS: ('coco_2014_train', 'coco_2014_valminusminival') | ||
SCALES: (800,) | ||
MAX_SIZE: 1333 | ||
BATCH_SIZE_PER_IM: 512 | ||
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level | ||
TEST: | ||
DATASETS: ('coco_2014_minival',) | ||
SCALE: 800 | ||
MAX_SIZE: 1333 | ||
NMS: 0.5 | ||
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level | ||
RPN_POST_NMS_TOP_N: 1000 | ||
OUTPUT_DIR: . |
52 changes: 52 additions & 0 deletions
52
configs/04_2018_gn_baselines/e2e_mask_rcnn_R-50-FPN_2x_gn.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
MODEL: | ||
TYPE: generalized_rcnn | ||
CONV_BODY: FPN.add_fpn_ResNet50_conv5_body | ||
NUM_CLASSES: 81 | ||
FASTER_RCNN: True | ||
MASK_ON: True | ||
NUM_GPUS: 8 | ||
SOLVER: | ||
WEIGHT_DECAY: 0.0001 | ||
LR_POLICY: steps_with_decay | ||
BASE_LR: 0.02 | ||
GAMMA: 0.1 | ||
MAX_ITER: 180000 | ||
STEPS: [0, 120000, 160000] | ||
FPN: | ||
FPN_ON: True | ||
MULTILEVEL_ROIS: True | ||
MULTILEVEL_RPN: True | ||
USE_GN: True # Note: use GN on the FPN-specific layers | ||
RESNETS: | ||
STRIDE_1X1: False # default True for MSRA; False for C2 or Torch models | ||
TRANS_FUNC: bottleneck_gn_transformation # Note: this is a GN bottleneck transform | ||
STEM_FUNC: basic_gn_stem # Note: this is a GN stem | ||
SHORTCUT_FUNC: basic_gn_shortcut # Note: this is a GN shortcut | ||
FAST_RCNN: | ||
ROI_BOX_HEAD: fast_rcnn_heads.add_roi_Xconv1fc_gn_head # Note: this is a Conv GN head | ||
ROI_XFORM_METHOD: RoIAlign | ||
ROI_XFORM_RESOLUTION: 7 | ||
ROI_XFORM_SAMPLING_RATIO: 2 | ||
MRCNN: | ||
ROI_MASK_HEAD: mask_rcnn_heads.mask_rcnn_fcn_head_v1up4convs_gn # Note: this is a GN mask head | ||
RESOLUTION: 28 # (output mask resolution) default 14 | ||
ROI_XFORM_METHOD: RoIAlign | ||
ROI_XFORM_RESOLUTION: 14 # default 7 | ||
ROI_XFORM_SAMPLING_RATIO: 2 # default 0 | ||
DILATION: 1 # default 2 | ||
CONV_INIT: MSRAFill # default GaussianFill | ||
TRAIN: | ||
WEIGHTS: https://s3-us-west-2.amazonaws.com/detectron/ImageNetPretrained/47261647/R-50-GN.pkl # Note: a GN pre-trained model | ||
DATASETS: ('coco_2014_train', 'coco_2014_valminusminival') | ||
SCALES: (800,) | ||
MAX_SIZE: 1333 | ||
BATCH_SIZE_PER_IM: 512 | ||
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level | ||
TEST: | ||
DATASETS: ('coco_2014_minival',) | ||
SCALE: 800 | ||
MAX_SIZE: 1333 | ||
NMS: 0.5 | ||
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level | ||
RPN_POST_NMS_TOP_N: 1000 | ||
OUTPUT_DIR: . |
52 changes: 52 additions & 0 deletions
52
configs/04_2018_gn_baselines/e2e_mask_rcnn_R-50-FPN_3x_gn.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
MODEL: | ||
TYPE: generalized_rcnn | ||
CONV_BODY: FPN.add_fpn_ResNet50_conv5_body | ||
NUM_CLASSES: 81 | ||
FASTER_RCNN: True | ||
MASK_ON: True | ||
NUM_GPUS: 8 | ||
SOLVER: | ||
WEIGHT_DECAY: 0.0001 | ||
LR_POLICY: steps_with_decay | ||
BASE_LR: 0.02 | ||
GAMMA: 0.1 | ||
MAX_ITER: 270000 | ||
STEPS: [0, 210000, 250000] | ||
FPN: | ||
FPN_ON: True | ||
MULTILEVEL_ROIS: True | ||
MULTILEVEL_RPN: True | ||
USE_GN: True # Note: use GN on the FPN-specific layers | ||
RESNETS: | ||
STRIDE_1X1: False # default True for MSRA; False for C2 or Torch models | ||
TRANS_FUNC: bottleneck_gn_transformation # Note: this is a GN bottleneck transform | ||
STEM_FUNC: basic_gn_stem # Note: this is a GN stem | ||
SHORTCUT_FUNC: basic_gn_shortcut # Note: this is a GN shortcut | ||
FAST_RCNN: | ||
ROI_BOX_HEAD: fast_rcnn_heads.add_roi_Xconv1fc_gn_head # Note: this is a Conv GN head | ||
ROI_XFORM_METHOD: RoIAlign | ||
ROI_XFORM_RESOLUTION: 7 | ||
ROI_XFORM_SAMPLING_RATIO: 2 | ||
MRCNN: | ||
ROI_MASK_HEAD: mask_rcnn_heads.mask_rcnn_fcn_head_v1up4convs_gn # Note: this is a GN mask head | ||
RESOLUTION: 28 # (output mask resolution) default 14 | ||
ROI_XFORM_METHOD: RoIAlign | ||
ROI_XFORM_RESOLUTION: 14 # default 7 | ||
ROI_XFORM_SAMPLING_RATIO: 2 # default 0 | ||
DILATION: 1 # default 2 | ||
CONV_INIT: MSRAFill # default GaussianFill | ||
TRAIN: | ||
WEIGHTS: https://s3-us-west-2.amazonaws.com/detectron/ImageNetPretrained/47261647/R-50-GN.pkl # Note: a GN pre-trained model | ||
DATASETS: ('coco_2014_train', 'coco_2014_valminusminival') | ||
SCALES: (800,) | ||
MAX_SIZE: 1333 | ||
BATCH_SIZE_PER_IM: 512 | ||
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level | ||
TEST: | ||
DATASETS: ('coco_2014_minival',) | ||
SCALE: 800 | ||
MAX_SIZE: 1333 | ||
NMS: 0.5 | ||
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level | ||
RPN_POST_NMS_TOP_N: 1000 | ||
OUTPUT_DIR: . |
52 changes: 52 additions & 0 deletions
52
configs/04_2018_gn_baselines/mask_rcnn_R-50-FPN_1x_gn.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# WARNING: this script uses **pre-computed** BN-based proposals, and is for quick debugging only. | ||
MODEL: | ||
TYPE: generalized_rcnn | ||
CONV_BODY: FPN.add_fpn_ResNet50_conv5_body | ||
NUM_CLASSES: 81 | ||
MASK_ON: True | ||
NUM_GPUS: 8 | ||
SOLVER: | ||
WEIGHT_DECAY: 0.0001 | ||
LR_POLICY: steps_with_decay | ||
BASE_LR: 0.02 | ||
GAMMA: 0.1 | ||
MAX_ITER: 90000 | ||
STEPS: [0, 60000, 80000] | ||
FPN: | ||
FPN_ON: True | ||
MULTILEVEL_ROIS: True | ||
MULTILEVEL_RPN: True | ||
USE_GN: True # Note: use GN on the FPN-specific layers | ||
RESNETS: | ||
STRIDE_1X1: False # default True for MSRA; False for C2 or Torch models | ||
TRANS_FUNC: bottleneck_gn_transformation # Note: this is a GN bottleneck transform | ||
STEM_FUNC: basic_gn_stem # Note: this is a GN stem | ||
SHORTCUT_FUNC: basic_gn_shortcut # Note: this is a GN shortcut | ||
FAST_RCNN: | ||
ROI_BOX_HEAD: fast_rcnn_heads.add_roi_Xconv1fc_gn_head # Note: this is a Conv GN head | ||
ROI_XFORM_METHOD: RoIAlign | ||
ROI_XFORM_RESOLUTION: 7 | ||
ROI_XFORM_SAMPLING_RATIO: 2 | ||
MRCNN: | ||
ROI_MASK_HEAD: mask_rcnn_heads.mask_rcnn_fcn_head_v1up4convs_gn # Note: this is a GN mask head | ||
RESOLUTION: 28 # (output mask resolution) default 14 | ||
ROI_XFORM_METHOD: RoIAlign | ||
ROI_XFORM_RESOLUTION: 14 # default 7 | ||
ROI_XFORM_SAMPLING_RATIO: 2 # default 0 | ||
DILATION: 1 # default 2 | ||
CONV_INIT: MSRAFill # default GaussianFill | ||
TRAIN: | ||
WEIGHTS: https://s3-us-west-2.amazonaws.com/detectron/ImageNetPretrained/47261647/R-50-GN.pkl # Note: a GN pre-trained model | ||
DATASETS: ('coco_2014_train', 'coco_2014_valminusminival') | ||
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/35998814/12_2017_baselines/rpn_R-50-FPN_1x.yaml.08_06_03.Axg0r179/output/test/coco_2014_train/generalized_rcnn/rpn_proposals.pkl', 'https://s3-us-west-2.amazonaws.com/detectron/35998814/12_2017_baselines/rpn_R-50-FPN_1x.yaml.08_06_03.Axg0r179/output/test/coco_2014_valminusminival/generalized_rcnn/rpn_proposals.pkl') | ||
SCALES: (800,) | ||
MAX_SIZE: 1333 | ||
BATCH_SIZE_PER_IM: 512 | ||
TEST: | ||
DATASETS: ('coco_2014_minival',) | ||
PROPOSAL_FILES: ('https://s3-us-west-2.amazonaws.com/detectron/35998814/12_2017_baselines/rpn_R-50-FPN_1x.yaml.08_06_03.Axg0r179/output/test/coco_2014_minival/generalized_rcnn/rpn_proposals.pkl',) | ||
PROPOSAL_LIMIT: 1000 | ||
SCALE: 800 | ||
MAX_SIZE: 1333 | ||
NMS: 0.5 | ||
OUTPUT_DIR: . |
52 changes: 52 additions & 0 deletions
52
configs/04_2018_gn_baselines/scratch_e2e_mask_rcnn_R-101-FPN_3x_gn.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
MODEL: | ||
TYPE: generalized_rcnn | ||
CONV_BODY: FPN.add_fpn_ResNet101_conv5_body | ||
NUM_CLASSES: 81 | ||
FASTER_RCNN: True | ||
MASK_ON: True | ||
NUM_GPUS: 8 | ||
SOLVER: | ||
WEIGHT_DECAY: 0.0001 | ||
LR_POLICY: steps_with_decay | ||
BASE_LR: 0.02 | ||
GAMMA: 0.1 | ||
MAX_ITER: 270000 | ||
STEPS: [0, 210000, 250000] | ||
FPN: | ||
FPN_ON: True | ||
MULTILEVEL_ROIS: True | ||
MULTILEVEL_RPN: True | ||
USE_GN: True # Note: use GN on the FPN-specific layers | ||
RESNETS: | ||
STRIDE_1X1: False # default True for MSRA; False for C2 or Torch models | ||
TRANS_FUNC: bottleneck_gn_transformation # Note: this is a GN bottleneck transform | ||
STEM_FUNC: basic_gn_stem # Note: this is a GN stem | ||
SHORTCUT_FUNC: basic_gn_shortcut # Note: this is a GN shortcut | ||
FAST_RCNN: | ||
ROI_BOX_HEAD: fast_rcnn_heads.add_roi_Xconv1fc_gn_head # Note: this is a Conv GN head | ||
ROI_XFORM_METHOD: RoIAlign | ||
ROI_XFORM_RESOLUTION: 7 | ||
ROI_XFORM_SAMPLING_RATIO: 2 | ||
MRCNN: | ||
ROI_MASK_HEAD: mask_rcnn_heads.mask_rcnn_fcn_head_v1up4convs_gn # Note: this is a GN mask head | ||
RESOLUTION: 28 # (output mask resolution) default 14 | ||
ROI_XFORM_METHOD: RoIAlign | ||
ROI_XFORM_RESOLUTION: 14 # default 7 | ||
ROI_XFORM_SAMPLING_RATIO: 2 # default 0 | ||
DILATION: 1 # default 2 | ||
CONV_INIT: MSRAFill # default GaussianFill | ||
TRAIN: | ||
# WEIGHTS: N/A | ||
DATASETS: ('coco_2014_train', 'coco_2014_valminusminival') | ||
SCALES: (800,) | ||
MAX_SIZE: 1333 | ||
BATCH_SIZE_PER_IM: 512 | ||
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level | ||
TEST: | ||
DATASETS: ('coco_2014_minival',) | ||
SCALE: 800 | ||
MAX_SIZE: 1333 | ||
NMS: 0.5 | ||
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level | ||
RPN_POST_NMS_TOP_N: 1000 | ||
OUTPUT_DIR: . |
52 changes: 52 additions & 0 deletions
52
configs/04_2018_gn_baselines/scratch_e2e_mask_rcnn_R-50-FPN_3x_gn.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
MODEL: | ||
TYPE: generalized_rcnn | ||
CONV_BODY: FPN.add_fpn_ResNet50_conv5_body | ||
NUM_CLASSES: 81 | ||
FASTER_RCNN: True | ||
MASK_ON: True | ||
NUM_GPUS: 8 | ||
SOLVER: | ||
WEIGHT_DECAY: 0.0001 | ||
LR_POLICY: steps_with_decay | ||
BASE_LR: 0.02 | ||
GAMMA: 0.1 | ||
MAX_ITER: 270000 | ||
STEPS: [0, 210000, 250000] | ||
FPN: | ||
FPN_ON: True | ||
MULTILEVEL_ROIS: True | ||
MULTILEVEL_RPN: True | ||
USE_GN: True # Note: use GN on the FPN-specific layers | ||
RESNETS: | ||
STRIDE_1X1: False # default True for MSRA; False for C2 or Torch models | ||
TRANS_FUNC: bottleneck_gn_transformation # Note: this is a GN bottleneck transform | ||
STEM_FUNC: basic_gn_stem # Note: this is a GN stem | ||
SHORTCUT_FUNC: basic_gn_shortcut # Note: this is a GN shortcut | ||
FAST_RCNN: | ||
ROI_BOX_HEAD: fast_rcnn_heads.add_roi_Xconv1fc_gn_head # Note: this is a Conv GN head | ||
ROI_XFORM_METHOD: RoIAlign | ||
ROI_XFORM_RESOLUTION: 7 | ||
ROI_XFORM_SAMPLING_RATIO: 2 | ||
MRCNN: | ||
ROI_MASK_HEAD: mask_rcnn_heads.mask_rcnn_fcn_head_v1up4convs_gn # Note: this is a GN mask head | ||
RESOLUTION: 28 # (output mask resolution) default 14 | ||
ROI_XFORM_METHOD: RoIAlign | ||
ROI_XFORM_RESOLUTION: 14 # default 7 | ||
ROI_XFORM_SAMPLING_RATIO: 2 # default 0 | ||
DILATION: 1 # default 2 | ||
CONV_INIT: MSRAFill # default GaussianFill | ||
TRAIN: | ||
# WEIGHTS: N/A | ||
DATASETS: ('coco_2014_train', 'coco_2014_valminusminival') | ||
SCALES: (800,) | ||
MAX_SIZE: 1333 | ||
BATCH_SIZE_PER_IM: 512 | ||
RPN_PRE_NMS_TOP_N: 2000 # Per FPN level | ||
TEST: | ||
DATASETS: ('coco_2014_minival',) | ||
SCALE: 800 | ||
MAX_SIZE: 1333 | ||
NMS: 0.5 | ||
RPN_PRE_NMS_TOP_N: 1000 # Per FPN level | ||
RPN_POST_NMS_TOP_N: 1000 | ||
OUTPUT_DIR: . |
Oops, something went wrong.