Skip to content

Priyansi/Image-Colourisation-Project

 
 

Repository files navigation



An image colourisation model trained on 570k images using autoencoders to colourise grayscale images.


Technology Stack

  • Pytorch for building the model
  • Streamlit for building the web application
  • Heroku for deploying the web application

To Run the Notebook using Pretrained Weights

The path files for the models trained on landscapes, people, fruits, and animals are available as landscapes.pth, people.pth, fruits.pth and animals.pth.

  1. Clone the repository with git clone https://gitlab.com/twishabansal/image-colourisation.git
  2. Open image-colourization-starter.ipynb.
  3. To load a particular path file in your notebook, run -
def load_checkpoint(filepath):
    model = Encoder_Decoder()
    checkpoint = torch.load(filepath)
    model.load_state_dict(checkpoint['state_dict'])

    return model
model = load_checkpoint(filepath)

Train the Model from Scratch

  1. Clone the repository with git clone https://gitlab.com/twishabansal/image-colourisation.git
  2. Documented Code for the model is available in the repository as image-colourization-starter.ipynb as an IPython notebook.
  3. Refer to the code written to process the data, define the model, train it, and finally get a prediction.

Datasets

The following datasets were used to train the respective models-

Landscapes

  1. ImageNet
  2. Flickr
  3. Landscape Classification
  4. Scene Classification

People

  1. Clothes Classification
  2. CelebA Dataset

Fruits -

  1. Fruits360
  2. Fruit Recognition

Animals -

  1. Animals10
  2. Arthropod Taxonomy Orders Object Detection Dataset
  3. Animal Faces
  4. African Wildlife
  5. Animals Dataset
  6. The Oxford-IIIT Pet Dataset

How To Run The Web App

  1. Clone the repository with https://github.com/Priyansi/image-colouriser-streamlit.git
  2. To install Streamlit - pip install streamlit
  3. To run the app on http://localhost:8501 run streamlit run app/app.py

References

  1. Colorful Image Colorization
  2. Applications of AutoEncoders - Image Colourisation

License

All rights reserved. Licensed under the MIT License.

forthebadge forthebadge

About

A Deep Learning project made with PyTorch

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 83.5%
  • TeX 16.5%