Grayscale images get reshaped before data augmentation
some changes to plot_input, so that one can plot grayscale input pictures
changed network.py and train.py, so that the input_shape changes if rgb or grayscale images
Basically, one need to reshape the rescaled images, because cv.imread produces shapes like (240, 140 and not (240, 140, 1), which is requested by both transformation script and saving array.
To test: python hyper_tuning.py with various input NN. I also added some print orders, so that you can see how the shape changes. Feel free to delete them, if you are convinced that it works.
Attention: I did not change the input_shape of PreDogNN and PreBigDogNN, because we do not use hyper_tuning.py on them and i expect the grayscale images to be significantly worse to classify. So you will get an error, if you use hyper_tuning.py with this NNs.
I attached the input plot of grayscale images below.
Heureka, es ist gefixt!
Features:
Grayscale images get reshaped before data augmentation
some changes to
plot_input
, so that one can plot grayscale input pictureschanged
network.py
andtrain.py
, so that theinput_shape
changes if rgb or grayscale imagesBasically, one need to reshape the rescaled images, because
cv.imread
produces shapes like(240, 140
and not(240, 140, 1)
, which is requested by both transformation script and saving array.To test:
python hyper_tuning.py
with various input NN. I also added someprint
orders, so that you can see how the shape changes. Feel free to delete them, if you are convinced that it works.Attention: I did not change the
input_shape
ofPreDogNN
andPreBigDogNN
, because we do not usehyper_tuning.py
on them and i expect the grayscale images to be significantly worse to classify. So you will get an error, if you usehyper_tuning.py
with this NNs.I attached the input plot of grayscale images below.
subplot.pdf