This device is not compatible.


Colorize Your Grayscale Images Using DeOldify and Gradio

In this project, we will use DeOldify for sophisticated image colorization and build a user-friendly web application for it using Gradio.

Colorize Your Grayscale Images Using DeOldify and Gradio

You will learn to:

Use DeOldify model for grayscale image colorization.

How to process Images.

Use Gradio package for creating a user-friendly interface.

Use OpenCV for splitting and merging RGB channels.


Computer Vision

GUI Development


Intermediate proficiency in Python

Basic knowledge of Matplotlib

Basic knowledge of OpenCV




Gradio logo


DeOldify logo


Project Description

In today’s digital age, we sometimes come across memories that are old black-and-white images that lack the vibrancy and realism of color. Imagine adding colors to those black-and-white memories to make them come to life.

In this project, will learn how to colorize grayscale images using DeOldify, a deep learning-based tool that colorizes and restores old black-and-white photos with remarkable accuracy.

Vintage family Christmas scene (source: unsplash)
Vintage family Christmas scene (source: unsplash)

Moreover, we will enhance the experience by creating a user-friendly graphical user interface (GUI) using Gradio, making the project easy and enjoyable to use.

Project Tasks


Getting started

Task 0: Get Started

Task 1: Import the Modules

Task 2: Read the Input Image


Image Colorization using DeOldify

Task 3: Colorize the Grayscale Image

Task 4: Transform and Scale the Image

Task 5: Split the Transformed Image into RGB Layers

Task 6: Display the RGB Channels and the Merged Image with Matplotlib


Creating User-Friendly Interface by Gradio

Task 7: Load the Sample Images

Task 8: Create the Display Image Function

Task 9: Set the Gradio Interface Parameters

Task 10: Implement Action Functionality for Interface Buttons