Skip to content

Image Colorizer is a Python-based project that uses deep learning to automatically colorize black and white images. It leverages OpenCV’s DNN module and a pre-trained Caffe model to predict and add realistic colors to grayscale photos.

License

Notifications You must be signed in to change notification settings

Santoshreddy-cpu/ImageColoring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ImageColorizer

ImageColorizer is a tool for automatically colorizing black and white images using deep learning. This project uses a pre-trained model to add natural colors to grayscale photos, making them look more vivid and realistic.

Features

  • Automatic colorization of black and white images
  • Utilizes state-of-the-art deep learning models
  • Easy-to-use command line interface
  • Supports common image formats (JPEG, PNG, etc.)

Installation

  1. Clone the repository

    git clone https://github.com/ayanbag/ImageColorizer.git
    cd ImageColorizer
  2. Create and activate a virtual environment (recommended)

    python3 -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install the required dependencies

    pip install -r requirements.txt

Usage

To colorize a black-and-white image:

python colorize.py --input path/to/your/image.jpg --output path/to/save/colorized.jpg

Parameters:

  • --input: Path to the input grayscale image.
  • --output: Path where the colorized image will be saved.

Example:

python colorize.py --input images/grayscale_photo.jpg --output results/colorized_photo.jpg

Demo

You can try the tool using the sample images provided in the images directory:

python colorize.py --input images/example_bw.jpg --output results/example_color.jpg

Requirements

  • Python 3.6+
  • See requirements.txt for the full list of dependencies.

Project Structure

ImageColorizer/
├── colorize.py
├── requirements.txt
├── README.md
├── images/
└── results/

Contribution

Contributions are welcome! Please open issues or submit pull requests for improvements or bug fixes.

License

This project is licensed under the MIT License. See LICENSE for details.

Acknowledgements

  • Pre-trained model and research inspiration from Zhang et al., 2016
  • Thanks to the open-source community for supporting this project.

About

Image Colorizer is a Python-based project that uses deep learning to automatically colorize black and white images. It leverages OpenCV’s DNN module and a pre-trained Caffe model to predict and add realistic colors to grayscale photos.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages