Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
768a78a
Create colortransfer.jl
juhlee Dec 27, 2021
f4e4235
Update readme
juhlee Dec 27, 2021
1804450
images to readme
juhlee Dec 27, 2021
0bfb0b8
Merge branch 'master' of https://github.com/juhlee/ColorTransfer.jl
juhlee Dec 27, 2021
26d7456
Update README.md
juhlee Dec 27, 2021
062cecb
Update README.md
juhlee Dec 27, 2021
99ff1d1
Update README.md
juhlee Dec 27, 2021
2aa2ef8
Delete colortransfer.jl
juhlee Dec 27, 2021
25e3c31
diff
juhlee Dec 27, 2021
c80baf5
new photos
juhlee Dec 27, 2021
29a7abf
dfd
juhlee Dec 27, 2021
46e0fca
dd
juhlee Dec 27, 2021
b996650
dd
juhlee Dec 27, 2021
a89bce9
images
juhlee Dec 28, 2021
956cd97
dd
juhlee Dec 29, 2021
4a6a1d6
demand
juhlee Dec 29, 2021
e8f3441
changes
juhlee Dec 30, 2021
fc939f4
Update README.md
juhlee Dec 30, 2021
9960764
changes...
juhlee Jan 1, 2022
5539164
image
juhlee Jan 1, 2022
4790faa
change image
juhlee Jan 1, 2022
20445aa
Update colortransfer.jl
juhlee Jan 1, 2022
7ebf9ef
added image
juhlee Jan 2, 2022
b21a436
delete files
juhlee Jan 2, 2022
868e31d
Merge branch 'master' of https://github.com/juhlee/ColorTransfer.jl
juhlee Jan 2, 2022
ec96d7f
code change...
juhlee Jan 2, 2022
f21fcb6
Update colortransfer.jl
juhlee Jan 2, 2022
9a68307
change in colortransfer.jl
juhlee Jan 5, 2022
308c9df
Update colortransfer.jl
juhlee Jan 10, 2022
19a6f82
Create 3klmmh.jpg
juhlee Jan 10, 2022
eb655b0
Update colortransfer.jl
juhlee Jan 10, 2022
d0932e7
change file
juhlee Jan 11, 2022
e760a38
major changes...
juhlee Jan 11, 2022
e54fce1
Update colortransfer.jl
juhlee Jan 12, 2022
f585286
Update colortransfer.jl
juhlee Jan 13, 2022
ff0b8e4
something is going wrong
juhlee Jan 13, 2022
51aca3d
project in final touch.
juhlee Jan 13, 2022
0236b7a
final touch.
juhlee Jan 14, 2022
a107516
final touch 2
juhlee Jan 14, 2022
1a72528
Deletion of unnecessary files
juhlee Jan 14, 2022
3258c70
Update readme
juhlee Jan 14, 2022
155a00f
Update README.md
juhlee Jan 14, 2022
2819e2a
removing unnecessary codes
juhlee Jan 14, 2022
10674bd
deletion file
juhlee Jan 15, 2022
07f4297
Update README.md
juhlee Jan 22, 2022
22f5041
Update README.md
juhlee Jan 22, 2022
24fe1fa
Update README.md
juhlee Jan 22, 2022
d4e8cee
Update README.md
juhlee Jan 22, 2022
d879763
update figure
juhlee Jan 22, 2022
e0110f2
Update README.md
juhlee Jan 22, 2022
47780ab
Update README.md
juhlee Jan 22, 2022
e0579ea
Update README.md
juhlee Jan 22, 2022
7394594
upload notebook
juhlee Jan 23, 2022
9e06981
delete unknown files
juhlee Jan 23, 2022
a8056ba
update file
juhlee Jan 23, 2022
99e4914
Update README.md
juhlee Jan 24, 2022
4589d6c
Update README.md
juhlee Jan 24, 2022
90875b9
Update README.md
juhlee Jan 24, 2022
51e8ff2
added unit test (basic..)
juhlee Jan 24, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 29 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
# STMO-ZOO
# STMO-ZOO : Color transfer using Optimal transportation done right

Welcome to the STMO zoo! This is your final assignment for the course Selected Topics in Mathematical Optimization. Your goal is to implement an optimization method in Julia and contribute this to this repository. To pass, you have to:
### Student name : Ju Hyung Lee

- fork this repo and create a pull request;
- add a module to `src` with **at least one function**
- add at least one unit test to the folder `test`;
- document all your functions and add a page to the documentation page;
- make a notebook in [Pluto](https://github.com/fonsp/Pluto.jl) and add it to `notebooks`;
- perform a small code review of two other students.
![alt text](https://github.com/juhlee/ColorTransfer.jl/blob/master/figs/choosing-color-scheme-368x246.png)

Depending on the project you choose some of these individual assignments might be really minimalistic, with other parts larger. For example, if you want to develop an application, say solving the graph coloring problem with Tabu Search, you might have only a single function in the source code (e.g., generating an instance) but have a fairly large notebook with a tutorial. On the other hand, if you work on a method, e.g., implementing Bee Colony Optimization, you might have many functions in the source code, while your notebook is only a demonstration on the test functions.
<h2> Welcome to the "ColorTransfer" repository in STMO zoo! </h2>

[![Build Status](https://travis-ci.org/MichielStock/STMOZOO.svg?branch=master)](https://travis-ci.org/MichielStock/STMOZOO)[![Coverage Status](https://coveralls.io/repos/github/MichielStock/STMOZOO/badge.svg?branch=master)](https://coveralls.io/github/MichielStock/STMOZOO?branch=master)
This final project is categorized as a 'tool', in which I will implement a color transportation in a different way from the one we implemented in the course (Chapter 6: Optimal Transport)!

By saying **"a different way"**, you will see:

- **No sub-sampling** of the input images
- **Clustering** of the color schemes of the original images (K-means clustering)
- **Different** formulas to calculate **color difference** between two images
- Optimal transport between the clustered color schemes **rather than** for all pixels
- Thus, **much faster execution** of the codes!

<h2> Running the code </h2>

All the necessary codes are in **notebook/colortransfer.jl** (Stand-alone pluto notebook)

![alt text](https://github.com/juhlee/ColorTransfer.jl/blob/master/figs/nutshell.png)

If you run the notebooks/colortransfer.jl code, you will see how the two images in the figure above swap the color schemes!

Of course, you have an option to use images of your own preference (There is a file upload button in the notebook).

Throughout the notebook, there are several Sliders to try out different parameter values to see how they affect the outcome of the color transfer.

Except for the clustering, all of the functions are blazing-fast, so feel free to move around the sliders!

[![Build Status](https://travis-ci.org/MichielStock/STMOZOO.svg?branch=master)](https://travis-ci.org/MichielStock/STMOZOO)[![Coverage Status](https://coveralls.io/repos/github/MichielStock/STMOZOO/badge.svg?branch=master)](https://coveralls.io/github/MichielStock/STMOZOO?branch=master)
217 changes: 210 additions & 7 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,17 +1,220 @@
### A Pluto.jl notebook ###
# v0.17.4

using Markdown
using InteractiveUtils

# ╔═╡ 36f67d36-7d13-11ec-31df-d3b214c29ec9
using Documenter

using STMOZOO
using STMOZOO.Example
# ╔═╡ 36f67d22-7d13-11ec-3a19-d9fc26ca1480
html"""
<div>Happy holiday! Remember to take care of yourself and your loved ones!</div>
<div id="snow"></div>
<style>
body:not(.disable_ui):not(.more-specificity) {
background-color:#e9ecff;
}
pluto-output{
border-radius: 0px 8px 0px 0px;
background-color:#e9ecff;
}
#snow {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
pointer-events: none;
z-index: 1000;
}
</style>
<script src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>
<script>
setTimeout(() => window.particlesJS("snow", {
"particles": {
"number": {
"value": 70,
"density": {
"enable": true,
"value_area": 800
}
},
"color": {
"value": "#ffffff"
},
"opacity": {
"value": 0.7,
"random": false,
"anim": {
"enable": false
}
},
"size": {
"value": 5,
"random": true,
"anim": {
"enable": false
}
},
"line_linked": {
"enable": false
},
"move": {
"enable": true,
"speed": 5,
"direction": "bottom",
"random": true,
"straight": false,
"out_mode": "out",
"bounce": false,
"attract": {
"enable": true,
"rotateX": 300,
"rotateY": 1200
}
}
},
"interactivity": {
"events": {
"onhover": {
"enable": false
},
"onclick": {
"enable": false
},
"resize": false
}
},
"retina_detect": true
}), 3000);
</script>
"""


# ╔═╡ 868b3d5a-ba27-4b1e-b9ca-402ceef79748
using ../src/colortransfer

# ╔═╡ fbdbcae0-ab65-4a95-abbe-5a0ff9a23cf4
makedocs(sitename="STMO ZOO",
format = Documenter.HTML(),
modules=[Example], # add your module
pages=Any[
"Example"=> "man/example.md", # add the page to your documentation
])

#=
deploydocs(
repo = "github.com/michielstock/STMOZOO.jl.git",
)
=#
# ╔═╡ 00000000-0000-0000-0000-000000000001
PLUTO_PROJECT_TOML_CONTENTS = """
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

[compat]
Documenter = "~0.27.12"
"""

# ╔═╡ 00000000-0000-0000-0000-000000000002
PLUTO_MANIFEST_TOML_CONTENTS = """
# This file is machine-generated - editing it directly is not advised

julia_version = "1.7.0"
manifest_format = "2.0"

[[deps.ANSIColoredPrinters]]
git-tree-sha1 = "574baf8110975760d391c710b6341da1afa48d8c"
uuid = "a4c015fc-c6ff-483c-b24f-f7ea428134e9"
version = "0.0.1"

[[deps.Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[deps.Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"

[[deps.DocStringExtensions]]
deps = ["LibGit2"]
git-tree-sha1 = "b19534d1895d702889b219c382a6e18010797f0b"
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
version = "0.8.6"

[[deps.Documenter]]
deps = ["ANSIColoredPrinters", "Base64", "Dates", "DocStringExtensions", "IOCapture", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Markdown", "REPL", "Test", "Unicode"]
git-tree-sha1 = "75c6cf9d99e0efc79b724f5566726ad3ad010a01"
uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
version = "0.27.12"

[[deps.IOCapture]]
deps = ["Logging", "Random"]
git-tree-sha1 = "f7be53659ab06ddc986428d3a9dcc95f6fa6705a"
uuid = "b5f81e59-6552-4d32-b1f0-c071b021bf89"
version = "0.2.2"

[[deps.InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"

[[deps.JSON]]
deps = ["Dates", "Mmap", "Parsers", "Unicode"]
git-tree-sha1 = "8076680b162ada2a031f707ac7b4953e30667a37"
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
version = "0.21.2"

[[deps.LibGit2]]
deps = ["Base64", "NetworkOptions", "Printf", "SHA"]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"

[[deps.Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

[[deps.Markdown]]
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"

[[deps.Mmap]]
uuid = "a63ad114-7e13-5084-954f-fe012c677804"

[[deps.NetworkOptions]]
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"

[[deps.Parsers]]
deps = ["Dates"]
git-tree-sha1 = "92f91ba9e5941fc781fecf5494ac1da87bdac775"
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version = "2.2.0"

[[deps.Printf]]
deps = ["Unicode"]
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[[deps.REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"]
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"

[[deps.Random]]
deps = ["SHA", "Serialization"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[[deps.SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"

[[deps.Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"

[[deps.Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"

[[deps.Test]]
deps = ["InteractiveUtils", "Logging", "Random", "Serialization"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[[deps.Unicode]]
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
"""

# ╔═╡ Cell order:
# ╟─36f67d22-7d13-11ec-3a19-d9fc26ca1480
# ╠═36f67d36-7d13-11ec-31df-d3b214c29ec9
# ╠═868b3d5a-ba27-4b1e-b9ca-402ceef79748
# ╠═fbdbcae0-ab65-4a95-abbe-5a0ff9a23cf4
# ╟─00000000-0000-0000-0000-000000000001
# ╟─00000000-0000-0000-0000-000000000002
Binary file added figs/choosing-color-scheme-368x246.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figs/cityscape.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figs/colors_everywhere.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figs/nutshell.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figs/sunset.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading