Skip to content

ZenithFlux/Movie_Colorizer

Repository files navigation

Movie_Colorizer

This program can colour B&W movies using deep learning.
Final SSIM score = 0.873

Some example images painted by this program:

Black & White Image 1    Coloured Image 1                Black & White Image 2    Coloured Image 2


Black & White Image 3    Coloured Image 3                Black & White Image 4    Coloured Image 4

Installing Dependencies

  1. Install PyTorch

  2. Type this in command line to install all dependencies except PyTorch:
    pip install -r requirements.txt

Dataset

Dataset I used for training: COCO 2017 Unlabeled images (After filtering out grayscale images)

Model trained on this dataset for 256x256 images- Download from G-Drive

How to Use

Note (For Non-Technical Users) - Users who have no knowledge of deep learning or pytorch are advised to only edit values in 'settings.py'. Most of the training and application usage can be handled using this file.

app.py - Run it to colour your images. This is basically a GUI for 'color_images.py'. A trained model should be on location MODEL_PATH mentioned in 'settings.py'.

colour_images.py - Run this file to colour your grayscale images using a trained model in python console. A trained model should be on location MODEL_PATH mentioned in 'settings.py'.

train_model.py - You can train your own image colouring model by running this script. All training settings can be adjusted from 'settings.py'.

colour_video.py - Run this file to colour your grayscale videos using a trained model. A trained model should be on location MODEL_PATH mentioned in 'settings.py'.

Credits

Heavily inspired from Colorizing black & white images with U-Net and conditional GAN