Closed AlphaRalph closed 6 years ago
I get wonderful results while training (val_acc > 98%), but when i try to evaluate images it seems like rolling a dice.
Is it necessary to preprocess the images the same way, as it is done before training? I tried the following:
image = cv2.resize(image, (32, 32)) image = img_to_array(image) image = image.astype('float32') mean_image = np.mean(image, axis=0) image -= mean_image image /= 128. image = np.expand_dims(image, axis=0)
But the result is not usable at all. Thanks in advance
Had to save and use mean image over all training images
I get wonderful results while training (val_acc > 98%), but when i try to evaluate images it seems like rolling a dice.
Is it necessary to preprocess the images the same way, as it is done before training? I tried the following:
image = cv2.resize(image, (32, 32)) image = img_to_array(image) image = image.astype('float32') mean_image = np.mean(image, axis=0) image -= mean_image image /= 128. image = np.expand_dims(image, axis=0)
But the result is not usable at all. Thanks in advance