From bd5cbffb9173244894adf3445d1efec04d401b74 Mon Sep 17 00:00:00 2001 From: Junpu Fan Date: Fri, 16 Dec 2022 08:37:10 +0000 Subject: [PATCH 1/2] use smaller LR and add 128GPU config --- .../e2e_mask_rcnn_R_50_FPN_1x_128GPU_4bs.yaml | 47 +++++++++++++++++++ .../e2e_mask_rcnn_R_50_FPN_1x_32GPU_4bs.yaml | 2 +- .../e2e_mask_rcnn_R_50_FPN_1x_64GPU_4bs.yaml | 2 +- 3 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 PyTorch/Segmentation/MaskRCNN/pytorch/configs/e2e_mask_rcnn_R_50_FPN_1x_128GPU_4bs.yaml diff --git a/PyTorch/Segmentation/MaskRCNN/pytorch/configs/e2e_mask_rcnn_R_50_FPN_1x_128GPU_4bs.yaml b/PyTorch/Segmentation/MaskRCNN/pytorch/configs/e2e_mask_rcnn_R_50_FPN_1x_128GPU_4bs.yaml new file mode 100644 index 000000000..cfa19d439 --- /dev/null +++ b/PyTorch/Segmentation/MaskRCNN/pytorch/configs/e2e_mask_rcnn_R_50_FPN_1x_128GPU_4bs.yaml @@ -0,0 +1,47 @@ +MODEL: + META_ARCHITECTURE: "GeneralizedRCNN" + WEIGHT: "catalog://ImageNetPretrained/MSRA/R-50" + BACKBONE: + CONV_BODY: "R-50-FPN" + OUT_CHANNELS: 256 + RPN: + USE_FPN: True + ANCHOR_STRIDE: (4, 8, 16, 32, 64) + PRE_NMS_TOP_N_TRAIN: 2000 + PRE_NMS_TOP_N_TEST: 1000 + POST_NMS_TOP_N_TEST: 1000 + FPN_POST_NMS_TOP_N_TEST: 1000 + ROI_HEADS: + USE_FPN: True + ROI_BOX_HEAD: + POOLER_RESOLUTION: 7 + POOLER_SCALES: (0.25, 0.125, 0.0625, 0.03125) + POOLER_SAMPLING_RATIO: 2 + FEATURE_EXTRACTOR: "FPN2MLPFeatureExtractor" + PREDICTOR: "FPNPredictor" + ROI_MASK_HEAD: + POOLER_SCALES: (0.25, 0.125, 0.0625, 0.03125) + FEATURE_EXTRACTOR: "MaskRCNNFPNFeatureExtractor" + PREDICTOR: "MaskRCNNC4Predictor" + POOLER_RESOLUTION: 14 + POOLER_SAMPLING_RATIO: 2 + RESOLUTION: 28 + SHARE_BOX_FEATURE_EXTRACTOR: False + MASK_ON: True +DATASETS: + TRAIN: ("coco_2017_train",) + TEST: ("coco_2017_val",) +DATALOADER: + SIZE_DIVISIBILITY: 32 +SOLVER: + BASE_LR: 0.0005 + WEIGHT_DECAY: 0.0001 + STEPS: (4320, 5760) + MAX_ITER: 1000 + IMS_PER_BATCH: 128 + WARMUP_FACTOR: 0.001 + WARMUP_ITERS: 1000 +TEST: + IMS_PER_BATCH: 64 + + diff --git a/PyTorch/Segmentation/MaskRCNN/pytorch/configs/e2e_mask_rcnn_R_50_FPN_1x_32GPU_4bs.yaml b/PyTorch/Segmentation/MaskRCNN/pytorch/configs/e2e_mask_rcnn_R_50_FPN_1x_32GPU_4bs.yaml index 64bb93067..82743f94d 100644 --- a/PyTorch/Segmentation/MaskRCNN/pytorch/configs/e2e_mask_rcnn_R_50_FPN_1x_32GPU_4bs.yaml +++ b/PyTorch/Segmentation/MaskRCNN/pytorch/configs/e2e_mask_rcnn_R_50_FPN_1x_32GPU_4bs.yaml @@ -34,7 +34,7 @@ DATASETS: DATALOADER: SIZE_DIVISIBILITY: 32 SOLVER: - BASE_LR: 0.02 + BASE_LR: 0.002 WEIGHT_DECAY: 0.0001 STEPS: (4320, 5760) MAX_ITER: 1000 diff --git a/PyTorch/Segmentation/MaskRCNN/pytorch/configs/e2e_mask_rcnn_R_50_FPN_1x_64GPU_4bs.yaml b/PyTorch/Segmentation/MaskRCNN/pytorch/configs/e2e_mask_rcnn_R_50_FPN_1x_64GPU_4bs.yaml index 86f593801..b1393b1a9 100644 --- a/PyTorch/Segmentation/MaskRCNN/pytorch/configs/e2e_mask_rcnn_R_50_FPN_1x_64GPU_4bs.yaml +++ b/PyTorch/Segmentation/MaskRCNN/pytorch/configs/e2e_mask_rcnn_R_50_FPN_1x_64GPU_4bs.yaml @@ -34,7 +34,7 @@ DATASETS: DATALOADER: SIZE_DIVISIBILITY: 32 SOLVER: - BASE_LR: 0.04 + BASE_LR: 0.001 WEIGHT_DECAY: 0.0001 STEPS: (4320, 5760) MAX_ITER: 2000 From 84948baf03002a455a96919a1350e11391d95e60 Mon Sep 17 00:00:00 2001 From: Lai Wei Date: Fri, 16 Dec 2022 08:40:26 +0000 Subject: [PATCH 2/2] update config batch size and steps --- .../pytorch/configs/e2e_mask_rcnn_R_50_FPN_1x_128GPU_4bs.yaml | 4 ++-- .../pytorch/configs/e2e_mask_rcnn_R_50_FPN_1x_32GPU_4bs.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PyTorch/Segmentation/MaskRCNN/pytorch/configs/e2e_mask_rcnn_R_50_FPN_1x_128GPU_4bs.yaml b/PyTorch/Segmentation/MaskRCNN/pytorch/configs/e2e_mask_rcnn_R_50_FPN_1x_128GPU_4bs.yaml index cfa19d439..5ec157ffd 100644 --- a/PyTorch/Segmentation/MaskRCNN/pytorch/configs/e2e_mask_rcnn_R_50_FPN_1x_128GPU_4bs.yaml +++ b/PyTorch/Segmentation/MaskRCNN/pytorch/configs/e2e_mask_rcnn_R_50_FPN_1x_128GPU_4bs.yaml @@ -37,8 +37,8 @@ SOLVER: BASE_LR: 0.0005 WEIGHT_DECAY: 0.0001 STEPS: (4320, 5760) - MAX_ITER: 1000 - IMS_PER_BATCH: 128 + MAX_ITER: 2000 + IMS_PER_BATCH: 256 WARMUP_FACTOR: 0.001 WARMUP_ITERS: 1000 TEST: diff --git a/PyTorch/Segmentation/MaskRCNN/pytorch/configs/e2e_mask_rcnn_R_50_FPN_1x_32GPU_4bs.yaml b/PyTorch/Segmentation/MaskRCNN/pytorch/configs/e2e_mask_rcnn_R_50_FPN_1x_32GPU_4bs.yaml index 82743f94d..5fffb8ed4 100644 --- a/PyTorch/Segmentation/MaskRCNN/pytorch/configs/e2e_mask_rcnn_R_50_FPN_1x_32GPU_4bs.yaml +++ b/PyTorch/Segmentation/MaskRCNN/pytorch/configs/e2e_mask_rcnn_R_50_FPN_1x_32GPU_4bs.yaml @@ -37,7 +37,7 @@ SOLVER: BASE_LR: 0.002 WEIGHT_DECAY: 0.0001 STEPS: (4320, 5760) - MAX_ITER: 1000 + MAX_ITER: 2000 IMS_PER_BATCH: 128 WARMUP_FACTOR: 0.001 WARMUP_ITERS: 1000