Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/soumik12345/colorization-using-optimization
Python and C++ implementations of a user-guided image/video colorization technique as proposed by the paper Colorization Using Optimization
https://github.com/soumik12345/colorization-using-optimization
colorization computer-vision cpp14 eigen opencv python
Last synced: 22 days ago
JSON representation
Python and C++ implementations of a user-guided image/video colorization technique as proposed by the paper Colorization Using Optimization
- Host: GitHub
- URL: https://github.com/soumik12345/colorization-using-optimization
- Owner: soumik12345
- License: mit
- Created: 2021-08-15T20:08:23.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-08-18T12:11:56.000Z (about 3 years ago)
- Last Synced: 2024-10-04T19:48:18.676Z (about 1 month ago)
- Topics: colorization, computer-vision, cpp14, eigen, opencv, python
- Language: Python
- Homepage:
- Size: 9.87 MB
- Stars: 21
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Colorization using Optimization
Python and C++ implementations of a user-guided image/video colorization technique as proposed by the paper
[Colorization Using Optimization](https://dl.acm.org/doi/10.1145/1015706.1015780). The algorithm is based on a simple premise; neighboring pixels in space-time that have similar intensities should have similar colors. This premise is formalized using a quadratic cost function that obtains an optimization problem that can be solved efficiently using standard techniques. **While using this alogorithm, an artist only needs to annotate the image with a few color scribbles or visual clues, and the indicated colors are automatically propagated in both space and time to produce a fully colorized image or sequence.** The annotation can be done using any drawing tool such as [JSPaint](https://jspaint.app/) or [Gimp](https://www.gimp.org/).## Instructions
### Instructions for running python version
1. Create a virtualenv using:
- `virtualenv venv --python=python3`
- `source venv/bin/activate`
- `pip install -r requirements.txt`2. Colorize images using the CLI:
```
python colorize.py
Options:
--original_image TEXT Original Image Path
--visual_clue TEXT Visual Clue Image Path
--result_path TEXT Colorized Image Path (without file extensions)
-i, --use_itercative Use Iterative Mode
--epochs INTEGER Number of epochs for Iterative Mode
--log_intervals INTEGER Log Interval
--help Show this message and exit.
```3. Alternatively, you can run on Google Colab using
### Instructions to build C++ version
1. Install dependencies using `sh install.sh`
2. Create a build directory `mkdir build && cd build`
3. Generate makefiles and compile using `cmake .. && make`
4. Run the executable using `./colorization [input-image] [visual-clues] [result] [gamma] [threshold]`
5. Alternatively, you can download the executable from [here](https://github.com/soumik12345/colorization-using-optimization/releases/download/0.1/colorization) and run it (installation of dependencies is still needed).
## Results
Original Image
Visual Clues
Colorized Image