Colorize and recolorize large images
Project description
ColorizeXL
Python implementation of the following paper by Anat Levin, Dani Lischinski, Yair Weiss, puublished in SIGGRAPH04.
We have adapted their technique to make it suitable for large images, by using overlapping patches with annotations.
Installation:
pip install colorizexl
Usage
Colorization of Black & White images
Previous to using the package, you have to setup the following:
- original black & white image
- annotation color image (please check details in the paper)
Recolorization of color images
Previous to using the package, you have to setup the following:
- original color image
- annotation image (please check details in the paper): white where the color stays the same, different colo where yo want to recolorize
Command line
Call the colorizexl.py
from command line, to colorize or recolorize images.
python colorizexl.py --annotated=<path_to_annotated_image> --grayscale=<path_to_image_to_(re)colorize> --output=<path_to_(re)colorized_image> --recolorize=True/False
Python code
from colorizexl import ColorizeXL
colorizer = ColorizeXL(
input_grayscale_name, input_annotation_name, recolorize=False
)
output = colorizer.colorize(step_size=patch_size, overlap=overlap, n=neighbour)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for colorizexl-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5570a45f244491cfa1dcd17d011aee6deccfdf79a54232dce4fe28dccf5fb595 |
|
MD5 | 7b6ce6f4d0b48bbd6f662f8e25b70504 |
|
BLAKE2b-256 | 3cf6d98a39c1e718f0f9554870672ee197ac6dcb9642f36e1a28109987caaf1d |