Automatic Colorizing Autoencoder
Importing basic Python Libraries
Importing Deep learning libraries
Defining the function for converting RGB images to Gray Scale images.
Loading the CIFAR 10 dataset.
Link - https://www.cs.toronto.edu/~kriz/cifar.html
Saving the image dimenions.
32 x 32 x 3 ( 32 x 32 - resolution and 3 - RGB three color channels )
Creating a saved_images folder
Displaying sample images from the dataset.
Converting RGB images to Gray Scale images
Displaying sample Gray Scale Image
Normalize output train and test color images
Normalize input train and test grayscale images
Reshaping the train and test set of color image to feed it to that CNN model.
Reshaping the train and test set of gray_scale image to feed it to that CNN model.
Buliding the Convolutional Neural Network
Building the Encoder
Building the Decoder
Building the AutoEncoder -
Combining the Encoder and the Decoder
Making the directory to save the trained model.
Creating an instance for Reducing the learning rate if the loos doesn't improve i.e. decrease.
Creating an instance for saving the checkpoint of the models ( weights i.e. parameters).
Compling the Autoencoder with
- Loss - MSE
- Optimizer - Adam
Also defining the Callbacks
Fitting the model to the training data and validating it on the test data