{"id":15700394,"url":"https://github.com/soumik12345/colorization-using-optimization","last_synced_at":"2025-07-14T08:07:48.362Z","repository":{"id":47716491,"uuid":"396479645","full_name":"soumik12345/colorization-using-optimization","owner":"soumik12345","description":"Python and C++ implementations of a user-guided image/video colorization technique as proposed by the paper Colorization Using Optimization","archived":false,"fork":false,"pushed_at":"2021-08-18T12:11:56.000Z","size":10347,"stargazers_count":26,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-12T13:12:57.005Z","etag":null,"topics":["colorization","computer-vision","cpp14","eigen","opencv","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soumik12345.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-15T20:08:23.000Z","updated_at":"2025-04-19T02:38:16.000Z","dependencies_parsed_at":"2022-08-22T20:10:17.625Z","dependency_job_id":null,"html_url":"https://github.com/soumik12345/colorization-using-optimization","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/soumik12345/colorization-using-optimization","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soumik12345%2Fcolorization-using-optimization","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soumik12345%2Fcolorization-using-optimization/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soumik12345%2Fcolorization-using-optimization/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soumik12345%2Fcolorization-using-optimization/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soumik12345","download_url":"https://codeload.github.com/soumik12345/colorization-using-optimization/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soumik12345%2Fcolorization-using-optimization/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265262545,"owners_count":23736411,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["colorization","computer-vision","cpp14","eigen","opencv","python"],"created_at":"2024-10-03T19:48:19.021Z","updated_at":"2025-07-14T08:07:47.909Z","avatar_url":"https://github.com/soumik12345.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Colorization using Optimization\n\n\u003cimg src=\"https://github.com/soumik12345/colorization-using-optimization/workflows/test/badge.svg\" alt=\"build-failing\"\u003e\n\nPython and C++ implementations of a user-guided image/video colorization technique as proposed by the paper \n[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/).\n\n## Instructions\n\n### Instructions for running python version\n\n1. Create a virtualenv using:\n    - `virtualenv venv --python=python3`\n    - `source venv/bin/activate`\n    - `pip install -r requirements.txt`\n\n2. Colorize images using the CLI:\n    ```\n    python colorize.py\n    \n    Options:\n        --original_image TEXT    Original Image Path\n        --visual_clue TEXT       Visual Clue Image Path\n        --result_path TEXT       Colorized Image Path (without file extensions)\n        -i, --use_itercative     Use Iterative Mode\n        --epochs INTEGER         Number of epochs for Iterative Mode\n        --log_intervals INTEGER  Log Interval\n        --help                   Show this message and exit.\n    ```\n\n3. Alternatively, you can run on Google Colab using \u003ca href=\"https://colab.research.google.com/github/soumik12345/colorization-using-optimization/blob/master/Demo.ipynb\" target=\"_parent\"\u003e\u003cimg src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/\u003e\u003c/a\u003e\n\n### Instructions to build C++ version\n\n1. Install dependencies using `sh install.sh`\n\n2. Create a build directory `mkdir build \u0026\u0026 cd build`\n\n3. Generate makefiles and compile using `cmake .. \u0026\u0026 make`\n\n4. Run the executable using `./colorization [input-image] [visual-clues] [result] [gamma] [threshold]`\n\n5. 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).\n\n## Results\n\n\u003ctable style=\"width:100%\"\u003e\n    \u003ctr\u003e\n        \u003cth\u003eOriginal Image\u003c/th\u003e\n        \u003cth\u003eVisual Clues\u003c/th\u003e\n        \u003cth\u003eColorized Image\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cimg src=\"./data/original/example.png\"\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./data/visual-clues/example.png\"\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./data/results/result.png\"\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cimg src=\"./data/original/example2.png\"\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./data/visual-clues/example2_marked.png\"\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./data/results/result2.png\"\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cimg src=\"./data/original/example3.png\"\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./data/visual-clues/example3_marked.png\"\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./data/results/result3.png\"\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cimg src=\"./data/original/example4.png\"\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./data/visual-clues/example4.png\"\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./data/results/result4.png\"\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cimg src=\"./data/original/example5.png\"\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./data/visual-clues/example5.png\"\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./data/results/result5.png\"\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cimg src=\"./data/original/example6.png\"\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./data/visual-clues/example6.png\"\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./data/results/result6.png\"\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cimg src=\"./data/original/example7.png\"\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./data/visual-clues/example7.png\"\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./data/results/result7.png\"\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cimg src=\"./data/original/example8.png\"\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./data/visual-clues/example8.png\"\u003e\u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./data/results/result8.png\"\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoumik12345%2Fcolorization-using-optimization","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoumik12345%2Fcolorization-using-optimization","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoumik12345%2Fcolorization-using-optimization/lists"}