Downloads · 30 days
0
muhammadnoman76/makeitcolor
makeitcolor is a machine learning model from muhammadnoman76. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
[](https://colab.research.google.com/drive/10raIuCBUhKCPqIuLHiSQmkJJ9jbu2VC?usp=sharing)
Downloads · 30 days
0
Access
Public
Updated Apr 26, 2025
Repo size
912 MB
Likes
2
Public
Click a slice to open those files.
.pt912 MB · 100%
From the Hugging Face model README
MakeItColor is a deep learning model designed for automatic image colorization. It transforms grayscale images into vivid, realistic colorized outputs using a PyTorch-based Convolutional Neural Network (CNN) architecture integrated with the ModelScope framework.
This model builds upon the work of DDColor, utilizing a dual-encoder approach and trained on the ImageNet-Val5k dataset.
Ensure you have Python 3.7+ installed. Then, install the required dependencies:
pip install opencv-python
pip install modelscope==1.12.0
pip install datasets==2.14.7
pip install pillow
pip install numpy
import cv2
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks
from huggingface_hub import snapshot_download
# Download the model files to a local directory
snapshot_download(repo_id="muhammadnoman76/makeitcolor", local_dir="./makeitcolor", repo_type="model")
# Initialize the colorization pipeline
img_colorization = pipeline(Tasks.image_colorization, model='./makeitcolor')
# Load a grayscale image
img_path = 'input.jpg'
# Run colorization
result = img_colorization(img_path)
# Save the colorized image
cv2.imwrite('result.png', result['output_img'])
Note:
- Ensure that the input image (
input.jpg) is a proper grayscale (single-channel) image.- The output (
result.png) will be a standard RGB image.
For an interactive demonstration, try our Google Colab notebook.
The repository contains:
pytorch_model.pt: Pre-trained model weightsconfiguration.json: Model configuration file for ModelScope integrationREADME.md: Documentationmodelscopeopencv-pythontorch.png, .jpg, etc.)input.jpg)result.png) for the colorized resultThis work builds upon and was inspired by the DDColor project.
MakeItColor leverages a dual-encoder strategy from DDColor and is trained on the ImageNet-Val5k dataset.
Special thanks to the creators of DDColor for their foundational contributions.
This project is licensed under the Apache License 2.0.
For issues, questions, or feedback:
Developed by Muhammad Noman