From 309c1dea1e512bc4ea3431c31933538e15789811 Mon Sep 17 00:00:00 2001 From: Chenxiaon Niu Date: Thu, 15 Oct 2020 17:17:51 +0800 Subject: [PATCH] add dynamic input for onnx part compatiability. --- .../retinanet_R_50_FPN_1x_bulb.yaml | 27 +++++++++++++++++++ detectron2/config/defaults.py | 1 + 2 files changed, 28 insertions(+) create mode 100644 configs/COCO-Detection/retinanet_R_50_FPN_1x_bulb.yaml diff --git a/configs/COCO-Detection/retinanet_R_50_FPN_1x_bulb.yaml b/configs/COCO-Detection/retinanet_R_50_FPN_1x_bulb.yaml new file mode 100644 index 0000000..bfc0775 --- /dev/null +++ b/configs/COCO-Detection/retinanet_R_50_FPN_1x_bulb.yaml @@ -0,0 +1,27 @@ +_BASE_: "../Base-RetinaNet.yaml" +MODEL: + WEIGHTS: "detectron2://ImageNetPretrained/MSRA/R-50.pkl" + RESNETS: + DEPTH: 50 + RETINANET: + NUM_CLASSES: 18 +DATASETS: + TRAIN: ("bulb_train",) + TEST: ("bulb_val",) +INPUT: + FORMAT: "RGB" + DYNAMIC: true +# MAX_SIZE_TRAIN: 1920 +# MIN_SIZE_TRAIN: (672, 736, 800, 864, 928, 992, 1056) +# MAX_SIZE_TEST: 1920 +# MIN_SIZE_TEST: 1056 +SOLVER: + IMS_PER_BATCH: 24 + LR_SCHEDULER_NAME: "WarmupCosineLR" + BASE_LR: 2.5e-4 + MAX_ITER: 364000 + CHECKPOINT_PERIOD: 3640 +TEST: + EVAL_PERIOD: 1820 +OUTPUT_DIR: "./output/retinanet_r50_bot" +VERSION: 2 diff --git a/detectron2/config/defaults.py b/detectron2/config/defaults.py index f9f40a8..521c860 100644 --- a/detectron2/config/defaults.py +++ b/detectron2/config/defaults.py @@ -85,6 +85,7 @@ # The ground truth mask format that the model will use. # Mask R-CNN supports either "polygon" or "bitmask" as ground truth. _C.INPUT.MASK_FORMAT = "polygon" # alternative: "bitmask" +_C.INPUT.DYNAMIC = False # -----------------------------------------------------------------------------