From e8f207557b4763da102d85f4aca67407cd2f9fcb Mon Sep 17 00:00:00 2001 From: iperov Date: Fri, 10 May 2019 08:11:17 +0400 Subject: [PATCH] fix bgr_shuffle --- samplelib/SampleProcessor.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/samplelib/SampleProcessor.py b/samplelib/SampleProcessor.py index 6d8ecf9..acfd7e9 100644 --- a/samplelib/SampleProcessor.py +++ b/samplelib/SampleProcessor.py @@ -235,8 +235,7 @@ class SampleProcessor(object): img = img_bgr elif mode_type == SPTF.MODE_BGR_SHUFFLE: rnd_state = np.random.RandomState (sample_rnd_seed) - img_bgr = np.take (img_bgr, rnd_state.permutation(img_bgr.shape[-1]), axis=-1) - img = np.concatenate ( (img_bgr,img_mask) , -1 ) + img = np.take (img_bgr, rnd_state.permutation(img_bgr.shape[-1]), axis=-1) elif mode_type == SPTF.MODE_G: img = np.concatenate ( (np.expand_dims(cv2.cvtColor(img_bgr, cv2.COLOR_BGR2GRAY),-1),img_mask) , -1 ) elif mode_type == SPTF.MODE_GGG: