From acce1cf983b9dd6d49163d0716b786e46dd3327e Mon Sep 17 00:00:00 2001 From: Joshua Zhang Date: Wed, 16 Nov 2016 17:48:54 -0600 Subject: [PATCH] minor fixes for training, fix float/double initializer in mxnet --- config/config.py | 11 ++++++----- dataset/iterator.py | 2 +- mxnet | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/config/config.py b/config/config.py index ceff576..d2bdbcf 100644 --- a/config/config.py +++ b/config/config.py @@ -12,8 +12,9 @@ RandCropper(min_scale=.3, min_aspect_ratio=.5, max_aspect_ratio=2., min_overlap=.3), RandCropper(min_scale=.3, min_aspect_ratio=.5, max_aspect_ratio=2., min_overlap=.5), RandCropper(min_scale=.3, min_aspect_ratio=.5, max_aspect_ratio=2., min_overlap=.7), - RandCropper(min_scale=.3, min_aspect_ratio=.5, max_aspect_ratio=2., min_overlap=.9), - RandCropper(min_scale=.3, min_aspect_ratio=.5, max_aspect_ratio=2., min_overlap=1.0)] + RandPadder(max_scale=2., min_aspect_ratio=.5, max_aspect_ratio=2., min_gt_scale=.05), + RandPadder(max_scale=3., min_aspect_ratio=.5, max_aspect_ratio=2., min_gt_scale=.05), + RandPadder(max_scale=4., min_aspect_ratio=.5, max_aspect_ratio=2., min_gt_scale=.05),] # cfg.TRAIN.RAND_SAMPLERS = [] cfg.TRAIN.RAND_MIRROR = True cfg.TRAIN.INIT_SHUFFLE = True @@ -25,7 +26,7 @@ # validation cfg.VALID = edict() cfg.VALID.RAND_SAMPLERS = [] -cfg.VALID.RAND_MIRROR = True -cfg.VALID.INIT_SHUFFLE = True -cfg.VALID.EPOCH_SHUFFLE = True +cfg.VALID.RAND_MIRROR = False +cfg.VALID.INIT_SHUFFLE = False +cfg.VALID.EPOCH_SHUFFLE = False cfg.VALID.RAND_SEED = None diff --git a/dataset/iterator.py b/dataset/iterator.py index b3243b2..b1a04e9 100644 --- a/dataset/iterator.py +++ b/dataset/iterator.py @@ -167,7 +167,7 @@ def _data_augmentation(self, data, label): offset_x = 0 - xmin offset_y = 0 - ymin data_bak = data - data = np.full((new_height, new_width, 3), 255) + data = np.full((new_height, new_width, 3), 128.) data[offset_y:offset_y+height, offset_x:offset_x + width, :] = data_bak label = rand_crops[index][1] diff --git a/mxnet b/mxnet index ae6b072..ecdead0 160000 --- a/mxnet +++ b/mxnet @@ -1 +1 @@ -Subproject commit ae6b072ca18f24631fb9e81d65f3f36c90c68fa7 +Subproject commit ecdead06fcc9c8c7cb397f9ec7a76496316940a0