neural-style icon indicating copy to clipboard operation
neural-style copied to clipboard

Can I transfer the color of the style image not its style?

Open youyou0988 opened this issue 8 years ago • 5 comments

I see there is a 'style only' option '-original_colors 1 ', Do you support a color only option?

youyou0988 avatar Jun 26 '17 02:06 youyou0988

@youyou0988 Neural-Style is a style transfer system, so you can't really avoid transferring the style. If you want to transfer the color from one image to another, I would suggest you use one of the Python scripts from my Neural-Tools project: https://github.com/ProGamerGov/Neural-Tools

ProGamerGov avatar Jun 30 '17 00:06 ProGamerGov

One can also try to use neural-style with only (some) relu1_x layers as style layers, as it is the very lowest layers that respond specifically to color. I used -style_layers relu1_1,relu1_3 -init image to color a B&W photo into this. Not perfect, but perhaps worth while to experiment.

colortest-initimage_750

htoyryla avatar Jun 30 '17 08:06 htoyryla

By the way, @ProGamerGov , I see nothing neural in the implementations of your Neural Tools. I guess the name of the project is because these statistical color manipulation tools are meant to be used together with neural style transfer? Or did I miss something?

htoyryla avatar Jun 30 '17 14:06 htoyryla

@htoyryla

I guess the name of the project is because these statistical color manipulation tools are meant to be used together with neural style transfer?

Yep, the repository contains the code I produced from: https://github.com/jcjohnson/neural-style/issues/376 along with some more modifications, and a wiki guide on how to properly use it. It is meant for use alongside style transfer projects like Neural-Style, style_transfer, CNNMRF, etc... that don't perform histogram matching or luminance transfer on their own.

I see nothing neural in the implementations of your Neural Tools.

The name was originally chosen because of the intent to use the scripts to enhance the style transfer process. But I do agree that it is misleading in because the code does not need to be used with any style transfer system. I have been thinking about whether or not it would be a good idea to change the name of the project, though that would probably break links that I and others have shared to the project.

ProGamerGov avatar Jun 30 '17 18:06 ProGamerGov

I believe what facebook is doing with its style transfer is using what @htoyryla is talking about, using the lower layers to transfer more color instead of style.

AndreJFBico avatar Sep 04 '17 10:09 AndreJFBico