SystemErrorWang / White-box-Cartoonization

Official tensorflow implementation for CVPR2020 paper “Learning to Cartoonize Using White-box Cartoon Representations”
3.95k stars 736 forks source link

about adaptive coloring algorithm and structure representation #46

Open JKANG94 opened 3 years ago

JKANG94 commented 3 years ago

In train.py, I found that the structure loss is not built with adaptive coloring algorithm. It is same as the content loss. So why didn't use adaptive coloring algorithm?

JKANG94 commented 3 years ago

The random color shift algorithm also is not the same as the paper described.

SystemErrorWang commented 3 years ago

@JKANG94 I am quite sure that the random color shift is the same as the paper described, it was implemented in another format, but these are mathmatically equaivalent. For adaptive coloring, as I have mentioned, it was not stable and easily causes pixel overflow. Still, you can try to use it by using pixel normalization and adding a tanh layer in the generator. I believe these have been implemented though unused.

markrmiller commented 1 year ago

clipping and tanh may help, but they don't solve the issue at all. You can make it solid though, you just have to plug in a couple work arounds to the math functions that will break due to inputs.