From ec5ed9351061e25c98c152a3ce340e546db5289a Mon Sep 17 00:00:00 2001 From: Rodrigo Berriel Date: Tue, 17 Sep 2019 18:42:03 +0200 Subject: [PATCH] Move horizontal flip probability to config --- maskrcnn_benchmark/config/defaults.py | 2 ++ maskrcnn_benchmark/data/transforms/build.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/maskrcnn_benchmark/config/defaults.py b/maskrcnn_benchmark/config/defaults.py index 65fbdaddd..1629a7369 100644 --- a/maskrcnn_benchmark/config/defaults.py +++ b/maskrcnn_benchmark/config/defaults.py @@ -60,6 +60,8 @@ _C.INPUT.SATURATION = 0.0 _C.INPUT.HUE = 0.0 +# Flips +_C.INPUT.HORIZONTAL_FLIP_PROB_TRAIN = 0.5 _C.INPUT.VERTICAL_FLIP_PROB_TRAIN = 0.0 # ----------------------------------------------------------------------------- diff --git a/maskrcnn_benchmark/data/transforms/build.py b/maskrcnn_benchmark/data/transforms/build.py index 52385ea7d..098da11d4 100644 --- a/maskrcnn_benchmark/data/transforms/build.py +++ b/maskrcnn_benchmark/data/transforms/build.py @@ -6,7 +6,7 @@ def build_transforms(cfg, is_train=True): if is_train: min_size = cfg.INPUT.MIN_SIZE_TRAIN max_size = cfg.INPUT.MAX_SIZE_TRAIN - flip_horizontal_prob = 0.5 # cfg.INPUT.FLIP_PROB_TRAIN + flip_horizontal_prob = cfg.INPUT.HORIZONTAL_FLIP_PROB_TRAIN flip_vertical_prob = cfg.INPUT.VERTICAL_FLIP_PROB_TRAIN brightness = cfg.INPUT.BRIGHTNESS contrast = cfg.INPUT.CONTRAST