Skip to content

cyamahat/Photo-Colorization-DDColor

Repository files navigation

🖼️ Photo Colorization with DDColor

This repository demonstrates how to colorize black-and-white photos using DDColor, a deep learning model for high-quality automatic image colorization.
It includes a simple Jupyter Notebook to test the model on sample grayscale images.


📘 Overview

  • Framework: ModelScope (with DDColor)
  • Interface: Jupyter Notebook (tested in VS Code 1.105)
  • OS Tested: Windows 10
  • Date Tested: November 2025
  • Purpose: Simple demonstration of automatic colorization using the DDColor model through ModelScope.

🧩 Features

  • Automatically colorize black-and-white photos.
  • Uses the pre-trained DDColor model from ModelScope.
  • Simple notebook-based workflow for experimentation.
  • No manual model downloads — ModelScope handles model loading automatically.

⚙️ Installation

  1. Clone this repository

    git clone https://github.com/cyamahat/Photo-Colorization-DDColor.git
    cd Photo-Colorization-DDColor
  2. Create and activate a virtual environment

    python -m venv venv
    venv\Scripts\activate   # On Windows
  3. Install dependencies

    pip install "modelscope[cv]" timm opencv-python matplotlib

    (This includes the necessary packages for this notebook: ModelScope, DDColor, OpenCV, and Matplotlib.)

  4. Launch Jupyter Notebook

    jupyter notebook

    Then open the notebook file Photo-Colorization-DDColor.ipynb.


🧪 Usage

  1. Open the notebook in VS Code or Jupyter Lab.
  2. Run the cells step-by-step to:
    • Import the required packages.
    • Load the DDColor model from ModelScope.
    • Select a sample black-and-white image.
    • Generate and display the colorized output.

🖼️ Example

Input (B/W)Output (Colorized)

Black & White Photograph Colorized

Sample image: Bardeen, Shockley, and Brattain (1948)
(Used for demonstration under Wikipedia Commons licensing.)


Colorization examples

Other examples: Churchill (1941) | Chaplin (Modern Times) | Battle of Iwo Jima (1945) | Solvay conference (1927) | Françoise Hardy (New York, 1965) |Farm house (Carroll County, Georgia, 1941) | Sailor in Breech (1908), Bardeen, Shockley, and Brattain (1948) | Einstein (1951)


🧠 Model Reference

DDColor: Deep Colorization with Detail Decoupling


💡 Notes

  • Tested with Visual Studio Code 1.105, Python 3.12, and Jupyter on Windows 10.
  • GPU acceleration is optional — CPU works fine for small images (slower).
  • ModelScope automatically downloads the DDColor model on first use.

🪪 License

This project follows the same license as DDColor.
Sample image © Wikipedia / Wikimedia Commons.


🤝 Acknowledgements

About

Colorize black-and-white photos with DDColor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published