yellowisher / DeepColorization

Colorization with deep learning; tensorflow version of https://github.com/junyanz/interactive-deep-colorization

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DeepColorization

Just another copy of interactive-deep-colorization. You can find decent pytorch code and paper there.
As a purpose of study, I wrote tensorflow version of it.
I want to write down what I learned and this might be helpful for someone in someday.

Actually I didn't run full training and just checked "model basically works".
And there are a lot of things to be changed. These are just for reference :p

Note

Here are things I learned and modified.

Batch normalization layer

In original model, they used CNN -> ReLU -> BatchNorm
But after some reading, CNN -> BatchNorm -> ReLU makes more sense to me so I tweaked it.
And because of that, I don't need to add bias at the end of layers. (because BatchNormLayer includes it)

Shortcut connection

U-net, which is basic model of original network, using concatenation for shortcut connection.
But they used conv+add rather than concat
I just noticed they are equivalent; you can find some more explanation here.

X110?

We allocates one byte for each LAB color elements(L,A,B). (range of -128 ~ 127)
But you can find they multiplying result(which is range of -1.0 ~ 1.0) by 110 rather than 128.
The reason of that is out of that range is considered as "imaginary part". You can find answer about it.

TODO

Seperate model and training code with save/load feature.
Write preprocessing code for input images. (like TFRecord?)

About

Colorization with deep learning; tensorflow version of https://github.com/junyanz/interactive-deep-colorization


Languages

Language:Python 100.0%