Image colorization is an engaging topic in the field of image-to-image translation. Even though color photography was invented in 1907, It didn't become popular for the average people until 1960s because of its expensiveness and inaccessibility. All the photography and videography up until then was done on Black and white. Colorizing these images was impossible until the DeOldify deep learning model came to life.
DeOldify
· It is an open-source deep learning model created by Jason Antic.
· It is used to add high-quality colorization to grayscale images with amazing results.
· The goal of this deep learning model is to colorize, restore, and give new life to old images and film footage.
· The old version of DeOldify used GANs, a network architecture that includes repetitive interaction between two complementary neural networks: a generator and discriminator.
· The pretrained generator model does the task of adding colors to the recognized objects and the discriminator does the task of “criticizing” the generator’s choice of color.
After the introduction of NoGAN training and combining it with GAN training, DeOldify was able to produce more stable and colorful images.
NoGAN
To address stabilization problems in the previous DeOldify model, Jason Antic developed this type of GAN training which requires less time on GAN training and more time on pretraining the generator and discriminator separately with uncomplicated, fast and reliable methods.
Now that we’ve taken a quick look at how the inside of DeOldify works, let’s look at how to get it up and running.
Setting up DeOldify
By using Google Colab –
The easiest and simplest way of trying out DeOldify is to use the Google Colab versions.
Code
Step 1: First we need to clone the DeOldify repository.
We do some setup -
Step 2 : Now we need to install the required dependencies:
Once the installation is done, open the project using the Google Colab.
Step 3: Next we create a folder called models inside the DeOldify folder and download the pre-trained weights into that folder. Then we import some files from DeOldify.
Step 4: For Video Colorizer (Artistic) -
For Watermark Images
Video Colorizer -
If an error throws (!wget), manually download the pre-trained weights using the above links.
Step 5: In below, we can see how it done colorize the video
See how well render_factor values perform on a frame here
Conclusion
I hope this steps to setting up DeOldify on your system was useful. Below is an example of DeOldify that I particularly like. Have fun colorizing your favorite grayscale content. Thank you and stay safe!
Comments