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.
- 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.
- 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.
-
Clone this repository
git clone https://github.com/cyamahat/Photo-Colorization-DDColor.git cd Photo-Colorization-DDColor -
Create and activate a virtual environment
python -m venv venv venv\Scripts\activate # On Windows
-
Install dependencies
pip install "modelscope[cv]" timm opencv-python matplotlib(This includes the necessary packages for this notebook: ModelScope, DDColor, OpenCV, and Matplotlib.)
-
Launch Jupyter Notebook
jupyter notebook
Then open the notebook file
Photo-Colorization-DDColor.ipynb.
- Open the notebook in VS Code or Jupyter Lab.
- 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.
Input (B/W) → Output (Colorized)
| Black & White Photograph | Colorized |
|---|---|
![]() |
![]() |
Sample image: Bardeen, Shockley, and Brattain (1948)
(Used for demonstration under Wikipedia Commons licensing.)
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)
DDColor: Deep Colorization with Detail Decoupling
- Paper: https://arxiv.org/abs/2212.11613
- Official Model: https://modelscope.cn/models/damo/cv_ddcolor_image-colorization
- Original Repo: https://github.com/piddnad/DDColor
- 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.
This project follows the same license as DDColor.
Sample image © Wikipedia / Wikimedia Commons.
- DDColor implementation by piddnad/DDColor
- Model provided by ModelScope
- Sample image from Wikipedia: John Bardeen, William Shockley and Walter Brattain at Bell Labs, 1948

.png)
