First of all, I want to thank you for sharing your code. I use your code for my one of my projects. I made several updates according to my needs.
But I believe one of them critical for the rest of the community.
I normalized my samples between 0 and 1, then sample wise zero mean and normalization.
example code:
train_datagen = SegDataGenerator(rescale=1./255,
samplewise_center=True,
samplewise_std_normalization=True,..)
I realized that you call preprocess_input() function at line 284
batch_x = preprocess_input(batch_x)
This line causes an additional zero-center by mean (it assumes that we have a non standardized 0-255 ranged image):
x[:, :, :, 0] -= 103.939
x[:, :, :, 1] -= 116.779
x[:, :, :, 2] -= 123.68
since we already applied x = self.seg_data_generator.standardize(x) at line 258, we need to remove line 284. (or it should be done in standardize() function if needed )
Hi,
First of all, I want to thank you for sharing your code. I use your code for my one of my projects. I made several updates according to my needs. But I believe one of them critical for the rest of the community. I normalized my samples between 0 and 1, then sample wise zero mean and normalization.
example code: train_datagen = SegDataGenerator(rescale=1./255, samplewise_center=True, samplewise_std_normalization=True,..)
I realized that you call preprocess_input() function at line 284
batch_x = preprocess_input(batch_x)
This line causes an additional zero-center by mean (it assumes that we have a non standardized 0-255 ranged image): x[:, :, :, 0] -= 103.939 x[:, :, :, 1] -= 116.779 x[:, :, :, 2] -= 123.68
since we already applied x = self.seg_data_generator.standardize(x) at line 258, we need to remove line 284. (or it should be done in standardize() function if needed )