03e8525394683bb5da7668330cd910c87c7d4501,data_augmentation.py,,rand_intensity_normalisation,#Any#Any#,77
Before Change
def rand_intensity_normalisation(img, irs_model):
rand_bin = np.random.randint(0, 20)
img = irs_model.transform(img, thr=rand_bin)
img = (img - np.mean(img)) / np.std(img)
return img
def __enumerate_step_points(starting, ending, win_size, step_size):
After Change
def rand_intensity_normalisation(img, irs_model):
rand_bin = np.random.randint(0, 20)
for mod_i in range(img.shape[-1]):
img[:,:,:,mod_i] = irs_model.transform(img[:,:,:,mod_i], thr=rand_bin)
img[:,:,:,mod_i] = (img[:,:,:,mod_i] - np.mean(img[:,:,:,mod_i])) / np.std(img[:,:,:,mod_i])
return img
def __enumerate_step_points(starting, ending, win_size, step_size):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: NifTK/NiftyNet
Commit Name: 03e8525394683bb5da7668330cd910c87c7d4501
Time: 2017-04-03
Author: l.fidon@ucl.ac.uk
File Name: data_augmentation.py
Class Name:
Method Name: rand_intensity_normalisation
Project Name: jhfjhfj1/autokeras
Commit Name: 71432d1890209628e189edf04d7d623160943718
Time: 2019-12-18
Author: 33369174+Davidsirui@users.noreply.github.com
File Name: autokeras/hypermodel/preprocessor.py
Class Name: TextToNgramVector
Method Name: transform